Overview
Point a coding agent or runtime at BitRouter — Claude Code, Codex, OpenCode, DeepSeek Harness, Pi — and run it on any model in the registry.
A harness is the agent runtime that drives the loop — the CLI or service that reads your prompt, calls tools, and edits files. Each one already speaks some model API; the move is always the same: point it at BitRouter's endpoint (local proxy at http://127.0.0.1:4356, or Cloud at https://api.bitrouter.ai) instead of the vendor's, and address models by their provider/model id. From there the same harness can run on Anthropic, OpenAI, Google, or an open model — with provider selection and fallback underneath.
Claude Code
Anthropic Messages via ANTHROPIC_BASE_URL
Codex
Spawn wrapper or custom provider
OpenCode
Provider block in opencode.json
DeepSeek Harness
Custom provider route in settings.yaml
Pi
Minimal terminal coding harness via models.json
Harness vs. model source
Two of these share a name with a model source, and it's worth keeping them straight:
| You want to… | Use |
|---|---|
| Run the Claude Code CLI on any model | Claude Code (harness) |
| Spend your Claude plan as tokens | Claude subscription (model) |
| Run the Codex CLI on any model | Codex (harness) |
| Spend your ChatGPT plan as tokens | Codex subscription (model) |
A harness is what runs; a model source is where the tokens come from. You can combine them freely — e.g. drive Claude Code (harness) against your ChatGPT plan (Codex subscription), or against a local Ollama model.
New to BitRouter?
Start with the Quick Start to get the proxy running, then come back and point your harness at it.
How is this guide?
Web fetch
A built-in web_fetch server tool — give any model routed through BitRouter a BYOK URL-content fetcher, served by an extraction backend you bring keys for.
Claude Code
Route Anthropic's Claude Code through BitRouter — every model in the registry, behind the Anthropic Messages API it already speaks.