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

Function resolveSkillModelOverride

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

Source from the content-addressed store, hash-verified

521 * are left untouched.
522 */
523export function resolveSkillModelOverride(
524 skillModel: string,
525 currentModel: string,
526): string {
527 if (has1mContext(skillModel) || !has1mContext(currentModel)) {
528 return skillModel
529 }
530 // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4');
531 // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first.
532 if (modelSupports1M(parseUserSpecifiedModel(skillModel))) {
533 return skillModel + '[1m]'
534 }
535 return skillModel
536}
537
538const LEGACY_OPUS_FIRSTPARTY = [
539 '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