MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / resolveSkillModelOverride

Function resolveSkillModelOverride

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

Source from the content-addressed store, hash-verified

543 * are left untouched.
544 */
545export 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
560const LEGACY_OPUS_FIRSTPARTY = [
561 '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