Regression: v2.1.173 strips [1m] suffix from custom inferenceGateway model names
Summary
Claude Code v2.1.173 introduced logic to strip the [1m] suffix from model names. This correctly handles first-party Anthropic model names (e.g. claude-fable-5[1m]), but it also strips the suffix from custom gateway model names configured via inferenceModels in managed plist config — breaking 1M context routing for enterprise/custom gateway setups.
Environment
- Claude Code inside Claude Desktop (managed plist config)
inferenceProvider: gatewayinferenceGatewayBaseUrl: custom enterprise gatewayinferenceModels: custom model names using[1m]suffix for 1M context routing
Plist config (redacted)
<key>inferenceModels</key>
<string>["Claude 4.6 Sonnet v1[1m]","Claude 4.8 Opus[1m]","Claude 4.7 Opus[1m]","Claude 4.5 Haiku 20251001-v1"]</string>
<key>inferenceProvider</key>
<string>gateway</string>
<key>inferenceGatewayBaseUrl</key>
<string>https://[redacted]/llm/api</string>
What happened
Before v2.1.173, the model picker showed both plain and [1m] variants as configured. The gateway used the [1m] suffix in the model name string to route requests to 1M context endpoints.
After v2.1.173:
[1m]is stripped from all model names before they are sent to the gateway- The model picker shows only the stripped names (no 1M variants visible)
- Requests are routed to 200k context instead of 1M context
- Using
[1M](uppercase) also gets stripped - Using any other suffix like
-1mcauses the gateway to fail (it only recognizes[1m])
Expected behavior
The [1m] stripping should only apply to first-party Anthropic model names, not to arbitrary model name strings configured via inferenceModels for custom inferenceGateway setups. Custom gateway model names should pass through to the gateway exactly as configured.
Workaround
None currently available without changes to the enterprise gateway routing logic.
Related changelog entries
- v2.1.173: "Fixed Fable 5 model names with a
[1m]suffix not being normalized" - v2.1.172: "Fixed model IDs getting a doubled 1M-context suffix (
[1M][1m])"
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗