docs: document CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY for /model picker#141
Open
mateo-berri wants to merge 1 commit into
Open
docs: document CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY for /model picker#141mateo-berri wants to merge 1 commit into
mateo-berri wants to merge 1 commit into
Conversation
…picker Adds a section to the Claude Code Quickstart explaining how to enable gateway model discovery so LiteLLM-configured models appear in Claude Code's /model picker. Covers requirements (Claude Code v2.1.129+), the claude/anthropic id prefix filter, caching behavior, and how to persist the setting in ~/.claude/settings.json.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new section to the Claude Code Quickstart (
docs/tutorials/claude_responses_api.md) coveringCLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1, which is required for LiteLLM-proxy models to show up inside Claude Code's/modelpicker.Without this env var, the picker only lists Anthropic's built-in models even after
ANTHROPIC_BASE_URLis pointed at the LiteLLM gateway — discovery is off by default upstream so that gateways backed by a shared API key don't surface every accessible model to every user.The new section explains:
GET {ANTHROPIC_BASE_URL}/v1/modelsat startup and adds returned models to/model, labeled "From gateway")claude/anthropicid-prefix filter that determines which models appear (and the implication for naming entries inconfig.yaml)ANTHROPIC_AUTH_TOKEN/ANTHROPIC_API_KEY) and cache location (~/.claude/cache/gateway-models.json)api.anthropic.combase URL)~/.claude/settings.jsonTest plan
npm run buildrenders the Quickstart page cleanly:::tipadmonition render correctlyNote
Low Risk
Documentation-only change describing how to enable gateway model discovery in Claude Code; no runtime or API behavior in this repo is modified.
Overview
Adds a new Claude Code Quickstart section explaining how to make LiteLLM gateway models appear in Claude Code’s
/modelpicker viaCLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1.Documents how discovery works (startup
GET {ANTHROPIC_BASE_URL}/v1/models, auth reuse, cache location), plus version requirements, filtering/limitations (gateway-only,claude/anthropicid prefix), and how to persist the setting in~/.claude/settings.jsonwith a link to upstream Anthropic docs.Reviewed by Cursor Bugbot for commit cfaeeea. Bugbot is set up for automated code reviews on this repo. Configure here.