Installation instructions · Package and Node.js requirements · Download source code (ZIP)
OmniRoute forwards requests to different models through one address on your computer. Use it to route Codex to a selected provider, check usage and later define fallback rules.
What it is useful for
It can help compare models, share one API endpoint across clients or explicitly manage a backup connection. For the first trial, choose one model rather than an automatic catalog-based combination. This makes the request's destination and cost easier to identify.
The gateway is MIT-licensed. Providers' free quotas do not combine into your personal subscription or access to every model. Check terms, availability and billing with the specific provider. Claude Code Router is an alternative gateway; start with one.
How to install and prepare Codex
Check the official package's current Node.js requirements. Node.js 24 is supported at review time; the package also accepts the 22 branch from 22.22.2, not every Node 22 release. With compatible Node.js already installed:
npm install -g omniroute
omniroute
Installation and service startup require approval. Codex first checks for an existing instance and configuration to avoid a second process. The standard guide opens the dashboard at localhost:20128, with the compatible API under /v1. Before supplying keys, check the actual listener and restrict access to the local computer. A trial needs no public tunnel.
Under Providers, the assistant configures one approved official API provider and one model. After approval, it creates a separate OmniRoute client key; it is not the provider's own key. Use intended credential settings, not Git, notes or a prompt. The trial needs no web-cookie providers, browser-session imports, certificates or MITM interception.
Use the official Codex connection guide, checking current parameters against OpenAI documentation. The assistant preserves the working config.toml and prepares a separate test profile with the chosen model_provider, base_url and authentication method. It does not copy someone else's context limits, reasoning effort or model identifier into your working profile.
How to test one route
- Codex finds the running instance, client settings and provider decision. It shows the route “Codex → local OmniRoute → selected model,” billing conditions and affected files. After approval, it prepares a test profile without replacing your normal sign-in.
- It retrieves available models and selects the connected provider's exact identifier. If using CLI Companion or run --dry-run, it checks the current command first: copied instructions and a dry-run do not send a model request. It leaves auto-routing, compression and model switching off for the trial.
- In a separate session, it sends one short request without working data. It matches the reply to provider, model, time, status and usage in the log. If the request fails, it reports that route's error without a hidden paid fallback. It then restores the original Codex profile and checks that it still works.
A simple concept explanation is enough for the first request. Code execution, file writes, browser access and long sessions need separate checks after the basic connection works.
How to check errors, costs and data
A model list proves catalog access, not successful generation. Separate server availability, client-key authentication, model name, provider quota and response-stream failures. Do not echo a key into a report to check it; verify presence and applicability without displaying the secret.
OmniRoute keeps local logs and audit records. Review retention before sending a real project; a local gateway still forwards requests to the external provider. Its documentation distinguishes noLog for traffic from administrative audit, so one switch does not erase all records. Logging reference.
Check usage at the provider and gateway, including retries. Test compression separately for retained numbers, commands and conditions, not just shorter text. Before auto-routing, define approved providers and spending limits; a route's name does not replace reviewing its rules.
For long tasks, separately check connection stability and context continuity. Do not disable global timeouts or client protections just because a sample does so: identify the actual failure and needed change first.
Where it fits and how to disconnect
The gateway is an option when choosing a tool connection. Graphify is more relevant for examining the project's dependencies than switching providers. These tools are not a mandatory installation chain.
Restore the client's original profile and environment first, then stop your own OmniRoute process. Remove the package through the chosen manager after checking it is no longer needed. Provider keys, client keys, config and logs require separate decisions; preserve unrelated connections. Treat configuration backups as sensitive too.
The trial is complete when one request reaches an explicitly selected model, usage is checked and normal Codex works after restoration. Next, test a real action, agreeing on the provider before transferring working data.
Prompt for Codex
Paste into Codex or Work with computer access:
Help test OmniRoute on one explicit route while preserving my current Codex. Find the system, Node.js version, existing gateway, client and established decisions. Read https://github.com/diegosouzapw/OmniRoute, QUICK-START, CODEX-CLI-CONFIGURATION and current official OpenAI custom-model-provider documentation.
Before installing, starting a service, connecting a provider or changing config, show the plan and wait for approval. Use the official omniroute package and check its engines. Avoid a second instance. Check the local listener, authentication and log retention. Do not expose a port publicly, enable MITM, add certificates or import cookies or browser authorization.
Find the approved provider, model and spending limit; ask only for missing decisions. Use the provider's official API and a separate gateway client key through secure settings. Do not print keys or put them in Git, notes, prompts or public URLs. Do not treat catalog-wide free quotas as my subscription.
Preserve current configuration. Prepare a separate Codex profile for one exact model identifier without auto-routing, fallback, compression or extra capabilities. Locate paths and connection parameters yourself rather than leaving manual placeholders. Show a secret-free diff before applying; preserve my sandbox, permissions and normal sign-in.
After approval, check the model catalog, then one short real request without working data in a separate session. Distinguish a dry-run or model list from completed inference. Check provider, model, status, response streaming and available usage, comparing with the provider account when accessible. Do not hide failure behind a paid route or repeat paid requests beyond the approved budget.
Restore the normal profile and check it works. Show actual results, remaining checks and how to disable only the test profile, process and newly created keys, preserving working settings and logs until my decision. Do not publish anything.