( skillModel: string, currentModel: string, )
| 543 | * are left untouched. |
| 544 | */ |
| 545 | export function resolveSkillModelOverride( |
| 546 | skillModel: string, |
| 547 | currentModel: string, |
| 548 | ): string { |
| 549 | if (has1mContext(skillModel) || !has1mContext(currentModel)) { |
| 550 | return skillModel |
| 551 | } |
| 552 | // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4'); |
| 553 | // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first. |
| 554 | if (modelSupports1M(parseUserSpecifiedModel(skillModel))) { |
| 555 | return skillModel + '[1m]' |
| 556 | } |
| 557 | return skillModel |
| 558 | } |
| 559 | |
| 560 | const LEGACY_OPUS_FIRSTPARTY = [ |
| 561 | 'claude-opus-4-20250514', |
no test coverage detected