(model: string)
| 21 | |
| 22 | // @[MODEL LAUNCH]: Add the new model to the allowlist if it supports the effort parameter. |
| 23 | export function modelSupportsEffort(model: string): boolean { |
| 24 | const m = model.toLowerCase() |
| 25 | if (isEnvTruthy(process.env.CLAUDE_CODE_ALWAYS_ENABLE_EFFORT)) { |
| 26 | return true |
| 27 | } |
| 28 | const supported3P = get3PModelCapabilityOverride(model, 'effort') |
| 29 | if (supported3P !== undefined) { |
| 30 | return supported3P |
| 31 | } |
| 32 | // Supported by a subset of Claude 4 models |
| 33 | if (m.includes('opus-4-6') || m.includes('sonnet-4-6')) { |
| 34 | return true |
| 35 | } |
| 36 | // Exclude any other known legacy models (haiku, older opus/sonnet variants) |
| 37 | if (m.includes('haiku') || m.includes('sonnet') || m.includes('opus')) { |
| 38 | return false |
| 39 | } |
| 40 | |
| 41 | // IMPORTANT: Do not change the default effort support without notifying |
| 42 | // the model launch DRI and research. This is a sensitive setting that can |
| 43 | // greatly affect model quality and bashing. |
| 44 | |
| 45 | // Default to true for unknown model strings on 1P. |
| 46 | // Do not default to true for 3P as they have different formats for their |
| 47 | // model strings (ex. anthropics/claude-code#30795) |
| 48 | return getAPIProvider() === 'firstParty' |
| 49 | } |
| 50 | |
| 51 | // @[MODEL LAUNCH]: Add the new model to the allowlist if it supports 'max' effort. |
| 52 | // Per API docs, 'max' is Opus 4.6 only for public models — other models return an error. |
no test coverage detected