Skip to content

Commit 89d6a79

Browse files
committed
Update README
1 parent c521589 commit 89d6a79

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Free Claude Code routes Anthropic Messages API traffic from Claude Code to NVIDI
3939
- Drop-in proxy for Claude Code's Anthropic API calls.
4040
- Six provider backends: NVIDIA NIM, OpenRouter, DeepSeek, LM Studio, llama.cpp, and Ollama.
4141
- Per-model routing: send Opus, Sonnet, Haiku, and fallback traffic to different providers.
42-
- Native Claude Code `/model` picker support through the proxy's `/v1/models` endpoint.
42+
- Native Claude Code `/model` picker support through the proxy's `/v1/models` endpoint (Claude Code must opt in to Gateway model discovery; see [Model Picker](#model-picker)).
4343
- Streaming, tool use, reasoning/thinking block handling, and local request optimizations.
4444
- Optional Discord or Telegram bot wrapper for remote coding sessions.
4545
- Optional voice-note transcription through local Whisper or NVIDIA NIM.
@@ -108,18 +108,18 @@ free-claude-code
108108

109109
### 4. Run Claude Code
110110

111-
Point `ANTHROPIC_BASE_URL` at the proxy root. Do not append `/v1`.
111+
Point `ANTHROPIC_BASE_URL` at the proxy root. Do not append `/v1`. Set `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1` if you use `/model` to list models from this proxy (see [Model Picker](#model-picker)).
112112

113113
PowerShell:
114114

115115
```powershell
116-
$env:ANTHROPIC_AUTH_TOKEN="freecc"; $env:ANTHROPIC_BASE_URL="http://localhost:8082"; claude
116+
$env:ANTHROPIC_AUTH_TOKEN="freecc"; $env:ANTHROPIC_BASE_URL="http://localhost:8082"; $env:CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY="1"; claude
117117
```
118118

119119
Bash:
120120

121121
```bash
122-
ANTHROPIC_AUTH_TOKEN="freecc" ANTHROPIC_BASE_URL="http://localhost:8082" claude
122+
ANTHROPIC_AUTH_TOKEN="freecc" ANTHROPIC_BASE_URL="http://localhost:8082" CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 claude
123123
```
124124

125125
## Choose A Provider
@@ -261,7 +261,7 @@ MODEL="nvidia_nim/z-ai/glm4.7"
261261
### Claude Code CLI
262262

263263
```bash
264-
ANTHROPIC_AUTH_TOKEN="freecc" ANTHROPIC_BASE_URL="http://localhost:8082" claude
264+
ANTHROPIC_AUTH_TOKEN="freecc" ANTHROPIC_BASE_URL="http://localhost:8082" CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 claude
265265
```
266266

267267
### VS Code Extension
@@ -271,7 +271,8 @@ Open Settings, search for `claude-code.environmentVariables`, choose **Edit in s
271271
```json
272272
"claudeCode.environmentVariables": [
273273
{ "name": "ANTHROPIC_BASE_URL", "value": "http://localhost:8082" },
274-
{ "name": "ANTHROPIC_AUTH_TOKEN", "value": "freecc" }
274+
{ "name": "ANTHROPIC_AUTH_TOKEN", "value": "freecc" },
275+
{ "name": "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY", "value": "1" }
275276
]
276277
```
277278

@@ -289,15 +290,18 @@ Set the environment for `acp.registry.claude-acp`:
289290
```json
290291
"env": {
291292
"ANTHROPIC_BASE_URL": "http://localhost:8082",
292-
"ANTHROPIC_AUTH_TOKEN": "freecc"
293+
"ANTHROPIC_AUTH_TOKEN": "freecc",
294+
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
293295
}
294296
```
295297

296298
Restart the IDE after changing the file.
297299

298300
### Model Picker
299301

300-
Claude Code 2.1.126 or later reads this proxy's `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at the proxy. Start Claude Code normally, run `/model`, and choose any discovered provider model.
302+
Claude Code 2.1.126 or later can populate `/model` from this proxy's Gateway `/v1/models` response when `ANTHROPIC_BASE_URL` points here. In **2.1.126–2.1.128** that discovery was automatic; **newer releases** require **`CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1`** in the same environment as `ANTHROPIC_*`. Omit the flag if you only set models via proxy config and never use `/model` discovery.
303+
304+
Start Claude Code with that variable set (see [Quick Start](#4-run-claude-code)), run `/model`, and choose any discovered provider model.
301305

302306
<div align="center">
303307
<img src="cc-model-picker.png" alt="Claude Code model picker showing gateway models" width="700">

0 commit comments

Comments
 (0)