(modelId: string)
| 3645 | * Handles model IDs with date suffixes (e.g., claude-sonnet-4-5-20250514). |
| 3646 | */ |
| 3647 | export function supportsNativeStructuredOutputs(modelId: string): boolean { |
| 3648 | const normalizedModelId = modelId.toLowerCase() |
| 3649 | |
| 3650 | for (const provider of Object.values(PROVIDER_DEFINITIONS)) { |
| 3651 | for (const model of provider.models) { |
| 3652 | if (model.capabilities.nativeStructuredOutputs) { |
| 3653 | const baseModelId = model.id.toLowerCase() |
| 3654 | // Check exact match or date-suffixed version (e.g., claude-sonnet-4-5-20250514) |
| 3655 | if (normalizedModelId === baseModelId || normalizedModelId.startsWith(`${baseModelId}-`)) { |
| 3656 | return true |
| 3657 | } |
| 3658 | } |
| 3659 | } |
| 3660 | } |
| 3661 | return false |
| 3662 | } |
| 3663 | |
| 3664 | /** |
| 3665 | * Check if a model supports thinking/reasoning features. |
no outgoing calls
no test coverage detected