( skillModel: string, currentModel: string, )
| 612 | * are left untouched. |
| 613 | */ |
| 614 | export function resolveSkillModelOverride( |
| 615 | skillModel: string, |
| 616 | currentModel: string, |
| 617 | ): string { |
| 618 | if (has1mContext(skillModel) || !has1mContext(currentModel)) { |
| 619 | return skillModel |
| 620 | } |
| 621 | // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4'); |
| 622 | // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first. |
| 623 | if (modelSupports1M(parseUserSpecifiedModel(skillModel))) { |
| 624 | return skillModel + '[1m]' |
| 625 | } |
| 626 | return skillModel |
| 627 | } |
| 628 | |
| 629 | const LEGACY_OPUS_FIRSTPARTY = [ |
| 630 | 'claude-opus-4-20250514', |
no test coverage detected