Free

Claude Code Router: choose model providers and routes

Set up Claude Code Router for one model and test it from Codex. Check the provider, route, costs and how to disconnect the local gateway.

Tools

Installation instructions · Download the app · Download source code (ZIP)

Claude Code Router, or CCR, connects an AI client to selected providers through one local gateway: a program that forwards requests to the chosen model. Use it to compare models on your own task, manage routes and see where each request went.

What it is useful for

For example, test another model for code analysis without changing your default working profile. CCR offers separate profiles and logs for providers, models, errors and usage. An existing connection that already meets your needs does not require a gateway.

CCR is MIT-licensed. The gateway does not supply a model subscription or additional quota: the selected provider supplies access and billing. Requests passing through a local address still reach that provider. Decide who may receive project material first.

How to install and prepare the connection

The straightforward route is an official desktop release for your operating system and processor. You can also work from a terminal using the CLI, a set of commands that requires Node.js 22 or later:

npm install -g @musistudio/claude-code-router
ccr ui

Codex first checks existing installations, versions and available ports, then requests approval to install and start the service. Do not install desktop and CLI together without a reason. The npm ccr command and desktop ccr-app launcher differ; use your distribution's command. CLI reference.

The CLI management UI defaults to 127.0.0.1:3458; the model gateway defaults to 127.0.0.1:3456. An occupied port can change the actual address. Check it against the running process. A management URL containing ccr_web_token is a secret; keep it out of messages and screenshots. A CCR client key and an upstream provider key serve different purposes.

Before applying a profile, preserve the client's working configuration. Settings → Export data can back up CCR; treat the export as sensitive and keep it outside Git and the shared knowledge base. Do not copy a running SQLite database as though it were a text config.

How to test one model in Codex

  1. In Providers → Add Provider, the assistant prepares one approved provider, its official API endpoint, protocol and actual model identifier. Approve key setup or sign-in separately. Enter keys in the intended settings, not a prompt. The trial needs no fallback models, compression, extra tools or imported authorizations.
  2. Under Agent Config, the assistant creates a Codex profile with an explicit model and selects Only opened from CCR rather than System default. Codex performs accessible actions, shows affected files and waits for approval before applying. A separate CLI session is simplest for the first test. Do not leave the model blank: the profile may otherwise select a different default. Official profile guide.
  3. From the new profile, the assistant sends a short practice request without project files, such as explaining an array versus an object. It checks the actual provider, model, status and usage in Logs. Then it ends the test session and opens your normal profile, checking that its connection is unchanged.

Do not carry your full working context into another model before this check. A model list and a simple reply do not test files, tool use or response streaming for your actual task.

How to check costs and errors

Match the request to CCR's log and the provider's account. Gateway cost estimates can differ from the final bill because of pricing, caching and retries. Do not assume a provider API and your current chat subscription share one balance.

If no answer arrives, separate the causes: management UI availability, gateway process, client-key authentication, model existence and upstream acceptance. Do not enable automatic model switching to hide an error; fix one route first. Then separately test a practice file read and a safe tool call if your workflow needs them.

Before adding fallback, agree on which model will receive data, when switching is allowed and the permitted cost. After switching, check the actual model rather than the main profile's label. Inspect logs and exports for request text and credentials before sharing them.

Where it fits and how to disconnect

CCR is an optional route when choosing a tool connection. A simple request can continue using the direct connection. OmniRoute serves a similar purpose; do not chain both gateways for a first trial.

Leave the test profile and restore the client's original connection first. Stop the background CLI with ccr stop; stop a service running in an open terminal there. Removing the npm package leaves configuration, logs and keys behind. Revoke only unneeded dedicated keys at the provider and CCR, preserving other tasks' working connections.

The trial is complete when the selected model replies through a verified route, usage is located and the normal profile still works. Next, test a real tool action on practice data before moving a working task.

Prompt for Codex

Paste into Codex or Work with computer access:

Help test Claude Code Router in a separate profile while preserving my working connection. Find the operating system, available Codex CLI, existing CCR, settings and project rules. Read https://github.com/musistudio/claude-code-router and the current CLI and Codex profile pages at ccrdesk.top.
Choose one official installation route for my environment. Before installing, starting a background service, connecting a provider or changing config, show the actions and wait for approval. Do not import browser authorization, add certificates or intercept traffic. Reuse an existing working gateway instead of starting a competing process.
Ask about the approved provider, model and permitted cost only if the available decisions do not specify them. Check the official endpoint and model requirements. Handle keys through intended secure settings; do not print keys, tokenized URLs, cookies or exports into chat, Git or notes. Preserve current settings in a restorable form.
Prepare a Codex profile limited to CCR launches, not the system default. Select one explicit model without fallback, compression or extra tools. After approval, perform accessible configuration. If I must sign in or confirm a system dialog, show that one required step and continue afterward.
Send one short practice request without working files in a separate session. Check the actual provider, model, status and available usage records, comparing with the provider account when accessible. Do not conceal failure by switching models. Do not change Codex sandbox or permissions for this connection.
Return to the normal profile and check it still works. Show actual results, remaining verification gaps and how to stop the service and disable only the new test profile. Preserve unrelated keys, logs and working settings. Do not publish or run paid repeat tests beyond the approved budget.
In This Article
Saved