(modelValue: string)
| 102 | } |
| 103 | |
| 104 | export function resolveApiModel(modelValue: string): ModelName { |
| 105 | const normalized = normalizeModelOption(modelValue).toLowerCase(); |
| 106 | if (normalized in MODEL_CONFIGS) { |
| 107 | return normalized as ModelName; |
| 108 | } |
| 109 | if (normalized.includes('gemini')) { |
| 110 | return 'gemini-3-pro'; |
| 111 | } |
| 112 | throw new InvalidArgumentError( |
| 113 | `Unsupported model "${modelValue}". Choose one of: ${Object.keys(MODEL_CONFIGS).join(', ')}`, |
| 114 | ); |
| 115 | } |
| 116 | |
| 117 | export function inferModelFromLabel(modelValue: string): ModelName { |
| 118 | const normalized = normalizeModelOption(modelValue).toLowerCase(); |
no test coverage detected