(raw: string)
| 186 | if (url) s = url[1]!; |
| 187 | return s.replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, ''); |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * Normalize an OpenAI-compatible base URL so the SDK can append `/chat/completions`. |
| 192 | * |
| 193 | * The base URL must be the root (e.g. `https://integrate.api.nvidia.com/v1`). Users very |
| 194 | * commonly paste a deeper path instead — the model-list URL (`…/v1/models`) or the full |
| 195 | * chat URL (`…/v1/chat/completions`) — and then EVERY request hits `…/v1/models/chat/completions` |
no outgoing calls
no test coverage detected