(modelString: string)
| 119 | * @returns The provider part (before the colon), or empty string if no colon is found |
| 120 | */ |
| 121 | export function getModelProvider(modelString: string): string { |
| 122 | const normalized = normalizeToCanonical(modelString); |
| 123 | const colonIndex = normalized.indexOf(":"); |
| 124 | if (colonIndex === -1) { |
| 125 | return ""; |
| 126 | } |
| 127 | return normalized.substring(0, colonIndex); |
| 128 | } |
| 129 | |
| 130 | export type Anthropic1MContextMode = "none" | "beta" | "native"; |
| 131 |
no test coverage detected