route, models & observe
Routing introspection — preview a routing decision, list routable models, inspect the OTel exporter's state.
Three read-only views over the same routing state the daemon acts on. Use them to answer what would BitRouter do? before sending traffic.
bitrouter route
Resolve a model name through the routing table. Uses the running daemon if reachable, otherwise loads the config and resolves locally
Usage: bitrouter route [OPTIONS] <MODEL>
Arguments
| Argument | Description |
|---|---|
<MODEL> | The model name to resolve |
Options
| Flag | Description |
|---|---|
-c, --config <CONFIG> | Path to bitrouter.yaml (used as the standalone fallback and to locate the control socket) |
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
--socket <SOCKET> | Explicit control socket path. Overrides the config-derived path |
bitrouter route anthropic/claude-opus-4.8
bitrouter route @coding # presets resolve through their bound policyUses the running daemon when reachable, otherwise resolves from the config on disk — so it works in CI too.
bitrouter models
List routable models for a config, optionally filtered by provider
Usage: bitrouter models [OPTIONS]
Options
| Flag | Description |
|---|---|
-c, --config <CONFIG> | Path to bitrouter.yaml. When omitted, the binary resolves in this order: ./bitrouter.yaml → $BITROUTER_HOME/bitrouter.yaml → ~/.bitrouter/bitrouter.yaml → zero-config in-memory defaults (bitrouter init is the explicit way to scaffold a file) |
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
-p, --provider <PROVIDER> | Show only models declared by this provider |
bitrouter models # every model id routable right now
bitrouter models --provider anthropicbitrouter observe
Observability inspection (OTel exporter state, cardinality usage)
Usage: bitrouter observe [OPTIONS] <COMMAND>
Options
| Flag | Description |
|---|---|
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
bitrouter observe status
Report the OTel exporter's current state (endpoint, sampler, cardinality usage, in-flight spans). Queries the running daemon over the control socket; reports "stopped" + the compile-time OTEL_ENABLED flag when no daemon is reachable
Usage: bitrouter observe status [OPTIONS]
Options
| Flag | Description |
|---|---|
-c, --config <CONFIG> | Path to bitrouter.yaml (used to locate the control socket) |
-j, --json | Force JSON output (the default; agent-native). Conflicts with --human |
--human | Render the human-readable view to stdout instead of JSON |
--socket <SOCKET> | Explicit control socket path. Overrides the config-derived path |
Reports the OTel exporter's live state — endpoint, sampler, cardinality usage, in-flight spans. The verification step for Set up tracing.
How is this guide?