( skillModel: string, currentModel: string, )
| 560 | * are left untouched. |
| 561 | */ |
| 562 | export function resolveSkillModelOverride( |
| 563 | skillModel: string, |
| 564 | currentModel: string, |
| 565 | ): string { |
| 566 | if (has1mContext(skillModel) || !has1mContext(currentModel)) { |
| 567 | return skillModel |
| 568 | } |
| 569 | // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4'); |
| 570 | // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first. |
| 571 | if (modelSupports1M(parseUserSpecifiedModel(skillModel))) { |
| 572 | return skillModel + '[1m]' |
| 573 | } |
| 574 | return skillModel |
| 575 | } |
| 576 | |
| 577 | const LEGACY_OPUS_FIRSTPARTY = [ |
| 578 | 'claude-opus-4-20250514', |
no test coverage detected