Codex config
Set openai_base_url in ~/.codex/config.toml to the gateway origin plus /v1.
Route Codex CLI and OpenAI-compatible coding-agent traffic through one self-hosted gateway with provider fallback, telemetry, request logs, config publishing, and rollback.
If this fits your Codex routing workflow, star the repository after evaluation so other operators can find it.
Codex entry point
AI Model Gateway keeps upstream provider keys in local gateway config. Codex uses a gateway client key and sends OpenAI-compatible requests to the data-plane listener.
Set openai_base_url in ~/.codex/config.toml to the gateway origin plus /v1.
Use a gateway client key for Codex instead of copying upstream provider keys into local tool config.
Route chat-style traffic through /v1/chat/completions and related OpenAI-compatible entry points.
Keep fallback, telemetry, request logs, provider health, and rollback in one self-hosted runtime.
Local setup
For a default local runtime, use the gateway origin plus /v1. Start with one non-production request, then inspect logs, telemetry, and provider health before routing real work.
openai_base_url = "http://127.0.0.1:18080/v1"
openai_api_key = "$GATEWAY_API_KEY"
Open Codex setup details
Scope
The gateway supports OpenAI-compatible client traffic and local operations workflows around routing, fallback, telemetry, and config publishing. It does not claim to replace every OpenAI platform feature, hosted model marketplace, or Codex account workflow.
Config workflow
The CLI can print client snippets or apply supported config updates for local tools. Use dry-run mode first and keep backups enabled unless another system already owns those files.
aigw clients print and inspect the Codex config values.
aigw clients apply -tools codex -dry-run before changing local files.
Review evidence
Try the packaged v1.4.4 runtime with checksum verification, local config, runtime directories, and supervised startup commands.
Open release install pathReview CI gates, local reproduction commands, runtime smoke checks, feature proof points, and current capability boundaries.
Open quality evidenceInspect admin auth, same-origin browser writes, provider-key handling, SSRF defenses, telemetry sensitivity, and update trust.
Open security modelNext step
Use a local gateway and non-production request first. If the project fits your self-hosted coding-agent routing workflow, starring the repository helps similar teams find it.