MCPcopy
hub / github.com/claude-code-best/claude-code / resolveSkillModelOverride

Function resolveSkillModelOverride

src/utils/model/model.ts:614–627  ·  view source on GitHub ↗
(
  skillModel: string,
  currentModel: string,
)

Source from the content-addressed store, hash-verified

612 * are left untouched.
613 */
614export 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
629const LEGACY_OPUS_FIRSTPARTY = [
630 'claude-opus-4-20250514',

Callers 2

contextModifierFunction · 0.85
executeUserInputFunction · 0.85

Calls 3

has1mContextFunction · 0.85
modelSupports1MFunction · 0.85
parseUserSpecifiedModelFunction · 0.85

Tested by

no test coverage detected