( skillModel: string, currentModel: string, )
| 521 | * are left untouched. |
| 522 | */ |
| 523 | export function resolveSkillModelOverride( |
| 524 | skillModel: string, |
| 525 | currentModel: string, |
| 526 | ): string { |
| 527 | if (has1mContext(skillModel) || !has1mContext(currentModel)) { |
| 528 | return skillModel |
| 529 | } |
| 530 | // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4'); |
| 531 | // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first. |
| 532 | if (modelSupports1M(parseUserSpecifiedModel(skillModel))) { |
| 533 | return skillModel + '[1m]' |
| 534 | } |
| 535 | return skillModel |
| 536 | } |
| 537 | |
| 538 | const LEGACY_OPUS_FIRSTPARTY = [ |
| 539 | 'claude-opus-4-20250514', |
no test coverage detected