mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-26 18:07:54 +08:00
docs: document TrustedRouter OpenAI-compatible gateway setup (#3403)
Adds a TrustedRouter section to docs/local-openai-compatible-providers.md: OPENAI_BASE_URL/OPENAI_API_KEY setup, the local/ hatch for vendor-prefixed ids (incl. trustedrouter/auto), the 64k output-token note, and the public /v1/models listing.
This commit is contained in:
1 parent
ca8752613b
commit
ecd697f9f2
1 file changed
+24
@@ -354,6 +354,30 @@ curl -sS "https://api.teamorouter.com/v1/models/pricing" \
|
||||
|
||||
See the [TeamoRouter docs](https://teamorouter.com/docs) for keys and account setup.
|
||||
|
||||
## TrustedRouter
|
||||
|
||||
[TrustedRouter](https://trustedrouter.com) is an OpenAI-compatible gateway that routes to Anthropic, OpenAI, Google, DeepSeek and other providers behind one key. Set `OPENAI_BASE_URL` to `https://api.trustedrouter.com/v1` and `OPENAI_API_KEY` to your TrustedRouter key.
|
||||
|
||||
```bash
|
||||
export TRUSTEDROUTER_API_KEY="your-trustedrouter-api-key"
|
||||
export OPENAI_BASE_URL="https://api.trustedrouter.com/v1"
|
||||
export OPENAI_API_KEY="$TRUSTEDROUTER_API_KEY"
|
||||
claw --model "local/deepseek/deepseek-v4-flash" prompt "Reply exactly HELLO_WORLD_123"
|
||||
```
|
||||
|
||||
TrustedRouter ids are vendor-prefixed (`deepseek/deepseek-v4-flash`, `anthropic/claude-sonnet-4.5`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the catalog id goes out unchanged. Without it, an `anthropic/` id picks the native Anthropic route and asks for `ANTHROPIC_API_KEY`. The routed model `trustedrouter/auto`, which picks a model per request, takes the same hatch: `--model "local/trustedrouter/auto"`.
|
||||
|
||||
Claw asks for up to 64,000 output tokens on these routes, so pick a model whose output limit is at least that. `deepseek/deepseek-v4-flash` allows 393,216. Each model's limit is listed as `top_provider.max_completion_tokens` in the catalog below.
|
||||
|
||||
The public model list does not need a key:
|
||||
|
||||
```bash
|
||||
curl -sS "https://api.trustedrouter.com/v1/models" \
|
||||
| jq -r '.data[] | "\(.id)\t\(.context_length)\t\(.top_provider.max_completion_tokens)"'
|
||||
```
|
||||
|
||||
See the [TrustedRouter docs](https://trustedrouter.com/docs) for keys and account setup.
|
||||
|
||||
## Local skills install from disk
|
||||
|
||||
Skills are discovered from Claw skill roots such as `.claw/skills/` in a workspace and `~/.claw/skills/` for user-level installs. Legacy `.codex/skills/` roots may also be scanned for compatibility, but new local Claw projects should prefer `.claw/skills/`.
|
||||
|
||||
Reference in new issue
Block a user