9Router setup: providers, model combos and request checks
Quick answer: start your 9Router setup with one provider and one checked request, then add model combos, fallback tests and cost comparisons.
9Router sits between a coding tool and its model providers, with an OpenAI-compatible endpoint and a dashboard for providers, keys, combos and usage, according to the official site. This 9Router setup guide takes you from installation to a request you can account for. The goal is a clear record of where a prompt went and what came back.
My videos cover How to Use 9Router: setup and request checks, 9Router Setup: Providers, Fallbacks & Connection Limits, and 9Router Cost Tracking: Model Combos & Auto-Fallback. The instructions below come from current official documentation; they are not a claim that every combination was tested in those recordings.
9Router setup: install and open the dashboard
The official CLI README gives this npm installation and launch sequence, with the dashboard at http://localhost:20128:
npm install -g 9router
9router
Run these in a terminal where npm is already available. Keep that terminal visible while checking the dashboard. If installation fails, save the first error rather than repeatedly reinstalling. Separate an installation problem from a provider problem: there is no reason to change credentials before the application starts.
For this exercise, keep the gateway and client on the same machine. Write down the installed version and the date. Save your client’s existing configuration before editing it, so restoring the previous setup is straightforward. This article is documentation-checked, not a report of a live installation on every operating system.
Add one provider and verify one request
The official setup overview describes provider connections using OAuth or an API key. Choose a provider you already have access to and follow its connection flow. Keep the upstream credential and the key given to your coding client clearly labeled.
- Open the provider area and connect just one account.
- Choose a model shown by that connection. Copy the identifier exactly.
- Record the endpoint, client key and model together in private setup notes.
- Send a short prompt such as “Reply with the word ready.” Note the time.
- Inspect the returned text and look for the corresponding request before proceeding.
The README API reference documents GET /v1/models for models and combos, and POST /v1/chat/completions for chat requests with bearer authentication. Use those routes when checking an OpenAI-compatible client. A model list is a discovery check; follow it with an actual generation request.
If API requests are unfamiliar, practice with the first API request guide first. Keep the initial prompt identical across attempts. Changing the prompt, provider and client together makes the result harder to interpret.
Point Claude Code, Codex and other tools at 9Router
Claude Code
Anthropic’s gateway connection guide uses ANTHROPIC_BASE_URL and a gateway credential such as ANTHROPIC_AUTH_TOKEN. Begin with temporary shell settings. Its verification request appends /v1/messages to the base URL, so check the complete request path rather than adding /v1 twice.
Set the base URL to your local gateway’s Anthropic-compatible root and the token to your gateway key, then select the intended Claude model. Check the active credential with /status, as the connection guide recommends. The exact end-to-end behavior still needs a request check in your installed versions.
Anthropic explicitly does not support routing Claude Code to non-Claude models through a gateway. Keep that boundary in mind when choosing a combo for this client. See its gateway support guidance.
Codex
OpenAI documents custom providers in advanced configuration. Put provider configuration in the user-level file, not a project-local file. Its gateway setup guide explains merging configuration without duplicating existing keys. This illustrative block uses a placeholder model that you must replace:
model = "REPLACE_WITH_GATEWAY_MODEL_ID"
model_provider = "nine_router"
[model_providers.nine_router]
name = "9Router"
base_url = "http://localhost:20128/v1"
env_key = "NINE_ROUTER_API_KEY"
wire_api = "responses"
Set NINE_ROUTER_API_KEY in the environment that launches Codex to your gateway key. The configuration reference defines these fields and specifies Responses as the supported wire protocol. A successful chat-completions test alone is insufficient: verify a Codex request too. Check model recognition and metadata against the gateway setup requirements before using a custom model or combo.
Other clients
The 9Router integration examples configure Cline, Continue and RooCode with an OpenAI-compatible provider, http://localhost:20128/v1, a dashboard key and a model identifier. Start with one client. Preserve a working configuration before adapting another tool, and inspect its first request separately.
Model combos and auto-fallback
The README combo instructions describe creating a named model sequence under Combos → Create New, then requesting that name from the client. They describe fallback on exhausted quota or errors.
Build a small sequence from models you have already checked individually. Give it a descriptive name, record the intended order, and decide which destinations you are willing to use. Avoid adding an unfamiliar destination just to make the chain longer.
Test in a disposable session. First confirm the primary route. Then, if your installed interface allows temporarily disabling that connection, do so and repeat the same short prompt. Record whether another route answered, whether an error reached the client, and which model handled the request. Restore the connection afterward. Do not deliberately exhaust an account to manufacture a failure.
After a successful routing test, repeat a small representative task and review the result. A response from the next model is evidence of a route change; it does not establish equivalent quality for your work. The cost tracking and model combos video is the companion walkthrough.
Connection limits: establish your own working baseline
A universal simultaneous-connection ceiling was not verified in the reviewed official documentation. This guide therefore gives no maximum account count, parallel-request allowance or promise of unlimited use.
When a connection fails, record the exact message and where it appeared: the client, the gateway or the upstream response. Distinguish a failed login from a failed generation. Then repeat a single short request with other work paused. If that succeeds, increase parallel work gradually and record when failure returns.
Keep a simple worksheet: client, provider, model, active requests, time, result and error text. That gives you something concrete to compare with the providers and connection limits walkthrough. Do not infer an account allowance from one successful burst.
Cost tracking: compare estimates with billing
The official feature list describes token tracking, quota reset countdowns and cost estimates per provider. Use estimates as a signal to investigate, and reconcile charges with the provider’s own billing record.
For a useful comparison, save one fixed task and its acceptance check. Run it on the primary model, inspect the result, then repeat on a candidate fallback. Record the displayed usage, estimated cost and whether the output passed. Keep the task small enough to review manually.
Do not announce a saving from a lower number alone. Note failed attempts and repeated work alongside successful output. This guide supplies no provider prices, subscription allowances or percentage savings because those figures were not independently verified against the relevant providers.
Troubleshoot one layer at a time
- Dashboard unavailable: inspect the launch terminal and confirm the address before touching provider settings.
- Authentication failure: check which credential is failing and whether the client is sending the gateway key you intended.
- Model rejected: compare the requested identifier with the current model list; remove the combo while isolating the problem.
- No matching usage: inspect the client’s active destination and repeat a uniquely worded short prompt.
- Fallback fails: test each member individually, then test the sequence again.
The README troubleshooting section recommends reconnecting a provider when OAuth trouble persists and checking quota for exhausted-provider errors. Save a redacted error report with versions and reproduction steps if the problem remains. Do not include keys in a screenshot or shared log.
FAQ
What is 9Router?
9Router is a gateway between coding tools and model providers. Its official site describes a dashboard for managing providers, keys, combos and usage.
What should I test first?
Test one provider and one model with a short prompt. Record the time, inspect the response, and find the corresponding request before adding fallbacks.
What is a model combo?
The README describes a named sequence of models that can switch when quota is exhausted or an error occurs. Use the combo name as the requested model.
How many connections can I run?
A universal simultaneous-connection limit was not verified in the reviewed documentation. Start with one active request and investigate the exact error before increasing parallel work.
Does the cost dashboard prove savings?
No. Compare a fixed task, its result, and the provider’s billing record before claiming savings. Keep measured charges separate from estimates.
Sources
- 9Router README: API, integrations, combos and troubleshooting
- 9Router CLI README: installation
- 9Router official site: gateway and dashboard features
- Anthropic: connect Claude Code to a gateway
- Anthropic: gateway support boundaries
- OpenAI: advanced configuration
- OpenAI: configuration reference
- OpenAI: gateway configuration and verification