Update docs

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Aneesh 2026-06-02 16:18:17 -04:00
parent 943e7b1762
commit 22e3763f9d
2 changed files with 8 additions and 0 deletions

View File

@ -225,6 +225,7 @@ export ANTHROPIC_AUTH_TOKEN="anthropic-oauth-or-proxy-bearer-token"
| `sk-ant-*` API key | `ANTHROPIC_API_KEY` | `x-api-key: sk-ant-...` | [console.anthropic.com](https://console.anthropic.com) |
| OAuth access token (opaque) | `ANTHROPIC_AUTH_TOKEN` | `Authorization: Bearer ...` | an Anthropic-compatible proxy or OAuth flow that mints bearer tokens |
| OpenRouter key (`sk-or-v1-*`) | `OPENAI_API_KEY` + `OPENAI_BASE_URL=https://openrouter.ai/api/v1` | `Authorization: Bearer ...` | [openrouter.ai/keys](https://openrouter.ai/keys) |
| Ollama local instance | `OLLAMA_HOST` | no auth header (Ollama requires none) | local Ollama server at `http://127.0.0.1:11434` |
**Why this matters:** if you paste an `sk-ant-*` key into `ANTHROPIC_AUTH_TOKEN`, Anthropic's API will return `401 Invalid bearer token` because `sk-ant-*` keys are rejected over the Bearer header. The fix is a one-line env var swap — move the key to `ANTHROPIC_API_KEY`. Recent `claw` builds detect this exact shape (401 + `sk-ant-*` in the Bearer slot) and append a hint to the error message pointing at the fix.

View File

@ -56,6 +56,13 @@ ollama serve
In another shell:
```bash
export OLLAMA_HOST="http://127.0.0.1:11434"
claw --model "qwen2.5-coder:7b" prompt "say hello"
```
`OLLAMA_HOST` is now the preferred env var for Ollama. The older `OPENAI_BASE_URL` + `OPENAI_API_KEY` workaround is also supported for existing setups that already rely on the OpenAI-compatible path.
```bash
export OPENAI_BASE_URL="http://127.0.0.1:11434/v1"
export OPENAI_API_KEY="local-dev-token"