MCPcopy Create free account
hub / github.com/freecodexyz/free-code / resolveSkillModelOverride

Function resolveSkillModelOverride

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

Source from the content-addressed store, hash-verified

560 * are left untouched.
561 */
562export function resolveSkillModelOverride(
563 skillModel: string,
564 currentModel: string,
565): string {
566 if (has1mContext(skillModel) || !has1mContext(currentModel)) {
567 return skillModel
568 }
569 // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4');
570 // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first.
571 if (modelSupports1M(parseUserSpecifiedModel(skillModel))) {
572 return skillModel + '[1m]'
573 }
574 return skillModel
575}
576
577const LEGACY_OPUS_FIRSTPARTY = [
578 '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