MCPcopy Index your code
hub / github.com/codeaashu/claude-code / applyModelOverrides

Function applyModelOverrides

src/utils/model/modelStrings.ts:63–76  ·  view source on GitHub ↗

* Layer user-configured modelOverrides (from settings.json) on top of the * provider-derived model strings. Overrides are keyed by canonical first-party * model ID (e.g. "claude-opus-4-6") and map to arbitrary provider-specific * strings — typically Bedrock inference profile ARNs.

(ms: ModelStrings)

Source from the content-addressed store, hash-verified

61 * strings — typically Bedrock inference profile ARNs.
62 */
63function applyModelOverrides(ms: ModelStrings): ModelStrings {
64 const overrides = getInitialSettings().modelOverrides
65 if (!overrides) {
66 return ms
67 }
68 const out = { ...ms }
69 for (const [canonicalId, override] of Object.entries(overrides)) {
70 const key = CANONICAL_ID_TO_KEY[canonicalId as CanonicalModelId]
71 if (key && override) {
72 out[key] = override
73 }
74 }
75 return out
76}
77
78/**
79 * Resolve an overridden model ID (e.g. a Bedrock ARN) back to its canonical

Callers 1

getModelStringsFunction · 0.85

Calls 2

getInitialSettingsFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected