( skillModel: string, currentModel: string, )
| 655 | * are left untouched. |
| 656 | */ |
| 657 | export function resolveSkillModelOverride( |
| 658 | skillModel: string, |
| 659 | currentModel: string, |
| 660 | ): string { |
| 661 | if (has1mContext(skillModel) || !has1mContext(currentModel)) { |
| 662 | return skillModel |
| 663 | } |
| 664 | // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4'); |
| 665 | // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first. |
| 666 | if (modelSupports1M(parseUserSpecifiedModel(skillModel))) { |
| 667 | return skillModel + '[1m]' |
| 668 | } |
| 669 | return skillModel |
| 670 | } |
| 671 | |
| 672 | const LEGACY_OPUS_FIRSTPARTY = [ |
| 673 | 'claude-opus-4-20250514', |
no test coverage detected