(model: string)
| 25 | * Supports colons in the model ID (e.g., "ollama:gpt-oss:20b"). |
| 26 | */ |
| 27 | export function isValidModelFormat(model: string): boolean { |
| 28 | const colonIndex = model.indexOf(":"); |
| 29 | return colonIndex > 0 && colonIndex < model.length - 1; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Normalize gateway model strings to canonical provider:model format when possible. |
no outgoing calls
no test coverage detected