claude CLI and Anthropic,
routing against either your org’s Anthropic API key or each developer’s Claude Pro/Max subscription.
Admins own the policy centrally; edits reach every developer’s agent within the hour, no redeploy.
Enterprise Model Routing is part of the enterprise plan. Installing needs only a Morph API key
from your org’s dashboard. Contact
info@morphllm.com if your org doesn’t have the plan yet.
Configure routing in Administration
Open morphllm.com/dashboard/administration and select Model Router. This is the single control point for your org’s policy; clients pull it fromGET /api/router/matrix (per-org, ETag cached, refreshed within 12 hours).
Three things live here:
- The routing matrix. Rows match on the three classifier axes (difficulty x ambiguity x domain)
and map to a model plus an effort level. First matching row wins. The default matrix routes easy
turns to
claude-haiku-4-5, medium toclaude-sonnet-4-6, hard toclaude-opus-4-8, and keeps Claude Code’s background calls on Haiku, off the Opus quota. - Permission groups. Per-user model allowlists, for example: engineers may route to any model, everyone else gets the default set. A matrix row that picks a model outside a user’s allowlist is clamped down a tier for that user.
- Seats. Which users the policy applies to.
Analytics
The Analytics tab (Administration, next to Model Router) shows what the policy is doing across the org: model mix per tier, turn volume over time, estimated savings versus routing every turn to Opus, and a per-user breakdown. Spend figures are input-token estimates at Anthropic list prices, not billed amounts. Routing events reach the dashboard through a metadata-only emitter; prompt and completion text never leave the developer’s machine.Install
Each developer runs the proxy locally. Requirements: macOS or Linux, Node 22+, and theclaude
CLI (v2.1.x).
Authenticate Claude Code
With a Claude Pro/Max subscription, log in once so the proxy can use the subscription token:Skip this if your org routes through a company Anthropic API key instead (next step).
Run the one-liner
~/.morph/ccr-router, runs its
self-tests, and wires the router into ~/.claude-code-router/config.json (your original
config is backed up). Prefer to read before running? curl -fsSLO https://morphllm.com/router/install.sh, review, then bash install.sh.Run Claude Code through it
claude pointed at it, with all your
arguments passing through (morph-claude -p "fix the tests" works). To see routing decisions
live, run bash ~/.morph/ccr-router/current/.morph-headless/watch-routing.sh in a second
terminal: one line per turn with the chosen model.disable is instant and reversible: Claude Code keeps working through the proxy on the default
model until you enable again.
Upgrade
Re-run the one-liner. It reuses the stored key (noMORPH_API_KEY needed), downloads the newer
version if there is one, and flips over atomically; re-running on the current version just
refreshes the wiring. Pin a specific release with MORPH_ROUTER_VERSION=x.y.z in front of the
same command.
Uninstall
One command undoes the install:~/.claude-code-router/config.json you had before
installing, and removes ~/.morph/ccr-router and the morph-claude command. Claude Code goes
back to talking to Anthropic directly, as if the router was never there.
Self-hosted policy
Orgs that want the routing policy on their own infrastructure can serve the matrix from a local file (MORPH_MATRIX_FILE) or their own endpoint (MORPH_MATRIX_URL) instead of the hosted
dashboard, and point metrics at their own collector or disable them (MORPH_METRICS_DISABLED=1).
The repo’s MORPH.md covers the self-hosted setup end to end.