( modelId: string )
| 3666 | * Returns the thinking capability config if supported, null otherwise. |
| 3667 | */ |
| 3668 | export function getThinkingCapability( |
| 3669 | modelId: string |
| 3670 | ): { levels: string[]; default?: string } | null { |
| 3671 | const normalizedModelId = modelId.toLowerCase() |
| 3672 | |
| 3673 | for (const provider of Object.values(PROVIDER_DEFINITIONS)) { |
| 3674 | for (const model of provider.models) { |
| 3675 | if (model.capabilities.thinking) { |
| 3676 | const baseModelId = model.id.toLowerCase() |
| 3677 | if (normalizedModelId === baseModelId || normalizedModelId.startsWith(`${baseModelId}-`)) { |
| 3678 | return model.capabilities.thinking |
| 3679 | } |
| 3680 | } |
| 3681 | } |
| 3682 | } |
| 3683 | return null |
| 3684 | } |
| 3685 | |
| 3686 | /** |
| 3687 | * Get all models that support thinking capability |
no outgoing calls
no test coverage detected