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