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

Function resolveSkillModelOverride

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

Source from the content-addressed store, hash-verified

655 * are left untouched.
656 */
657export function resolveSkillModelOverride(
658 skillModel: string,
659 currentModel: string,
660): string {
661 if (has1mContext(skillModel) || !has1mContext(currentModel)) {
662 return skillModel
663 }
664 // modelSupports1M matches on canonical IDs ('claude-opus-4-6', 'claude-sonnet-4');
665 // a bare 'opus' alias falls through getCanonicalName unmatched. Resolve first.
666 if (modelSupports1M(parseUserSpecifiedModel(skillModel))) {
667 return skillModel + '[1m]'
668 }
669 return skillModel
670}
671
672const LEGACY_OPUS_FIRSTPARTY = [
673 '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