(model: string)
| 123 | |
| 124 | // Context management is supported on Claude 4+ models |
| 125 | export function modelSupportsContextManagement(model: string): boolean { |
| 126 | const canonical = getCanonicalName(model) |
| 127 | const provider = getAPIProvider() |
| 128 | if (provider === 'foundry') { |
| 129 | return true |
| 130 | } |
| 131 | if (provider === 'firstParty') { |
| 132 | return !canonical.includes('claude-3-') |
| 133 | } |
| 134 | return ( |
| 135 | canonical.includes('claude-opus-4') || |
| 136 | canonical.includes('claude-sonnet-4') || |
| 137 | canonical.includes('claude-haiku-4') |
| 138 | ) |
| 139 | } |
| 140 | |
| 141 | // @[MODEL LAUNCH]: Add the new model ID to this list if it supports structured outputs. |
| 142 | export function modelSupportsStructuredOutputs(model: string): boolean { |
no test coverage detected