claude-code - 💡(How to fix) Fix [DOCS] Model configuration docs omit `_MODEL_NAME`/`_DESCRIPTION` support for custom `ANTHROPIC_BASE_URL` gateways [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52198Fetched 2026-04-23 07:33:58
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Code Example

export ANTHROPIC_BASE_URL='https://gateway.example.com'
export ANTHROPIC_DEFAULT_SONNET_MODEL='my-gateway/claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_SONNET_MODEL_NAME='Sonnet via Gateway'
export ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION='Claude Sonnet 4.6 routed through the internal gateway'
RAW_BUFFERClick to expand / collapse

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/model-config

Section/Topic

Customize pinned model display and capabilities in Model configuration, plus Model selection in LLM gateway configuration

Current Documentation

The docs currently say:

These variables only take effect on third-party providers such as Bedrock, Vertex AI, and Foundry. They have no effect when using the Anthropic API directly.

And the gateway page says:

If you have configured custom model names in your gateway, use the environment variables documented in Model configuration to match your custom names.

What's Wrong or Missing?

Changelog v2.1.118 says: The /model picker now honors ANTHROPIC_DEFAULT_*_MODEL_NAME/_DESCRIPTION overrides when using a custom ANTHROPIC_BASE_URL gateway.

The current docs do not explain that these display-label overrides now work for custom gateways configured through ANTHROPIC_BASE_URL. Instead, the Model configuration page still scopes the _NAME and _DESCRIPTION variables to Bedrock, Vertex AI, and Foundry-style third-party providers, which makes the current behavior for custom gateways unclear or misleading.

That leaves gateway administrators without explicit guidance on how to make gateway-routed models show friendly names and descriptions in /model.

Suggested Improvement

Update the Model configuration page to explicitly include custom ANTHROPIC_BASE_URL gateways in the scope of ANTHROPIC_DEFAULT_{OPUS,SONNET,HAIKU}_MODEL_NAME and _DESCRIPTION.

Add a short gateway example such as:

export ANTHROPIC_BASE_URL='https://gateway.example.com'
export ANTHROPIC_DEFAULT_SONNET_MODEL='my-gateway/claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_SONNET_MODEL_NAME='Sonnet via Gateway'
export ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION='Claude Sonnet 4.6 routed through the internal gateway'

Also update the LLM gateway Model selection section to say that these variables can control both the routed model ID and the /model picker's display label/description for custom gateway deployments.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageContext
https://code.claude.com/docs/en/model-configDefines _MODEL_NAME and _DESCRIPTION behavior, but currently limits the scope to Bedrock, Vertex AI, and Foundry
https://code.claude.com/docs/en/llm-gatewayTells gateway users to use Model configuration env vars, but does not say these overrides now affect /model labels for custom ANTHROPIC_BASE_URL gateways
https://code.claude.com/docs/en/env-varsLists ANTHROPIC_DEFAULT_{OPUS,SONNET,HAIKU}_MODEL_{NAME,DESCRIPTION} but does not clarify gateway-specific usage

Total scope: 3 pages affected

Source: Changelog v2.1.118

Exact changelog entry: The /model picker now honors ANTHROPIC_DEFAULT_*_MODEL_NAME/_DESCRIPTION overrides when using a custom ANTHROPIC_BASE_URL gateway

extent analysis

TL;DR

Update the Model configuration page to include custom ANTHROPIC_BASE_URL gateways in the scope of ANTHROPIC_DEFAULT_{OPUS,SONNET,HAIKU}_MODEL_NAME and _DESCRIPTION variables.

Guidance

  • Review the current documentation on the Model configuration page and the LLM gateway Model selection section to understand the outdated information.
  • Update the Model configuration page to explicitly state that the _MODEL_NAME and _DESCRIPTION variables apply to custom ANTHROPIC_BASE_URL gateways, not just Bedrock, Vertex AI, and Foundry.
  • Add an example to the documentation, such as the provided export commands, to illustrate how to use these variables with a custom gateway.
  • Verify that the updates are reflected on the affected pages, including the Model configuration page, LLM gateway Model selection section, and the environment variables page.

Example

export ANTHROPIC_BASE_URL='https://gateway.example.com'
export ANTHROPIC_DEFAULT_SONNET_MODEL='my-gateway/claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_SONNET_MODEL_NAME='Sonnet via Gateway'
export ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION='Claude Sonnet 4.6 routed through the internal gateway'

Notes

The updates should be made to the following pages: https://code.claude.com/docs/en/model-config, https://code.claude.com/docs/en/llm-gateway, and https://code.claude.com/docs/en/env-vars.

Recommendation

Apply the suggested updates to the documentation to clarify the usage of _MODEL_NAME and _DESCRIPTION variables with custom ANTHROPIC_BASE_URL gateways, as this will improve the understanding and usability of the feature.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [DOCS] Model configuration docs omit `_MODEL_NAME`/`_DESCRIPTION` support for custom `ANTHROPIC_BASE_URL` gateways [1 participants]