docs: add env var needed for claude code in docs (#13721)

This commit is contained in:
Parth Sareen
2026-01-15 10:11:00 -08:00
committed by GitHub
parent 75d7b5f926
commit b1a0db547b
2 changed files with 5 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ Claude Code connects to Ollama using the Anthropic-compatible API.
1. Set the environment variables:
```shell
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_BASE_URL=http://localhost:11434
export ANTHROPIC_API_KEY=ollama
```
@@ -38,7 +39,7 @@ claude --model qwen3-coder
Or run with environment variables inline:
```shell
ANTHROPIC_BASE_URL=http://localhost:11434 ANTHROPIC_API_KEY=ollama claude --model qwen3-coder
ANTHROPIC_AUTH_TOKEN=ollama ANTHROPIC_BASE_URL=http://localhost:11434 ANTHROPIC_API_KEY=ollama claude --model qwen3-coder
```
## Connecting to ollama.com