The fast claude adapter routes Claude Code through Fast Inference's native
Anthropic-compatible /v1/messages surface. It maps Claude Code's model slots
to one callable catalog model and keeps a snapshot of your original settings.
Connect Claude Code
Install and sign in
npm install -g @inference/fast fast loginEnable the adapter
fast claude onThe command creates or reuses this machine's project API key, writes the gateway and model map to
~/.claude/settings.json, and saves the original file under~/.inference-fast/backups. Restart Claude Code after it completes.Verify the route
fast claude statusStart a new Claude Code session and send a short prompt. The request should appear under Usage with the selected Fast Inference model.
Model slots
Claude Code uses six named model slots. The adapter points all six at the model
you select, which defaults to glm-5.2.
| Slot | Claude Code setting | Default |
|---|---|---|
| Main | ANTHROPIC_MODEL | glm-5.2 |
| Opus | ANTHROPIC_DEFAULT_OPUS_MODEL | glm-5.2 |
| Sonnet | ANTHROPIC_DEFAULT_SONNET_MODEL | glm-5.2 |
| Haiku | ANTHROPIC_DEFAULT_HAIKU_MODEL | glm-5.2 |
| Fable | ANTHROPIC_DEFAULT_FABLE_MODEL | glm-5.2 |
| Subagents | CLAUDE_CODE_SUBAGENT_MODEL | glm-5.2 |
Choose another callable model from the model catalog:
fast claude on --model <catalog-id>Running on again updates the managed settings while retaining the original
restoration snapshot.
Key handling
Your first agent connection creates one machine-scoped API key for the first project in your personal workspace. The CLI stores that key in its owner-private state and reuses it across supported adapters. Raw key values are not printed.
Restore your settings
fast claude offoff restores the original settings.json snapshot and removes the backup.
Restart Claude Code after restoring it.
Troubleshooting
- If status says
off, rerunfast claude onand restart Claude Code. - If requests return 401, run
fast statusand reconnect the agent. - If a model is rejected, choose a currently callable ID from the model catalog.
- If the config cannot be parsed, repair
settings.jsonbefore reconnecting.