docs: clarify Ollama provider routing (prefix vs. heuristic)

The local-Ollama section described provider routing as only triggering
when OPENAI_BASE_URL is set and the model name contains a `:` or `.`,
but that heuristic only applies to prefix-less model names. The example
uses the explicit `openai/` prefix, which selects the OpenAI-compatible
provider directly (and is stripped before the tag reaches Ollama).

Split the explanation into the two routing paths so the colon tag is
correctly described as an Ollama requirement, not the routing trigger.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Heo, Sung 2026-06-07 20:14:33 +09:00
parent 65e6e9795b
commit 067c91d31b
1 changed files with 6 additions and 3 deletions

View File

@ -63,9 +63,12 @@ export OPENAI_API_KEY="ollama" # any non-empty value works; Ollama ignores it
**The model name must match the Ollama tag exactly.** Ollama tags use a colon
(`name:tag`), e.g. `qwen3.5:9b` — not a hyphen (`qwen3.5-9b`), which the server
rejects with `404 ... model not found`. Routing to the OpenAI-compatible
provider only kicks in when `OPENAI_BASE_URL` is set and the model name contains
a `:` or `.`, so always pass the full tag. List the installed tags with:
rejects with `404 ... model not found`. In the command above the `openai/`
prefix is what selects the OpenAI-compatible provider (the prefix is stripped
before the tag is sent to Ollama). You can also drop the prefix and pass the
bare tag — when `OPENAI_BASE_URL` is set, claw routes a prefix-less model to the
OpenAI-compatible endpoint as long as the name contains a `:` or `.`. Either
way, always pass the full colon tag. List the installed tags with:
```bash
ollama list # native view