Skip to content
inert
Sign up
Contents

Codex CLI

Codex speaks the OpenAI Responses API, which Inert serves at https://api.inert.lol/v1/responses. A custom provider entry and one env var are enough, with no proxy in between.

Config

In ~/.codex/config.toml:

~/.codex/config.toml
model = "fable-5"
model_provider = "inert"

[model_providers.inert]
name = "inert"
base_url = "https://api.inert.lol/v1"
wire_api = "responses"
env_key = "INERT_API_KEY"

Then set INERT_API_KEY in your environment. Models are fable-5 and opus-5, the same IDs GET /v1/models returns.

Startup warning

Every session prints one warning at startup:

text
Model metadata for 'fable-5' not found. Defaulting to fallback metadata

Harmless. Codex ships a built-in catalog of OpenAI model IDs and does not know Inert's aliases, so it falls back to generic metadata. Nothing needs fixing.

Tools

Regular function tools all work: shell, plan, apply-patch and the rest. Codex also sends its built-in web_search and multi-agent (namespace) tools unconditionally; the gateway accepts the request and skips those definitions, so the model never sees them.

Note
Sub-agent spawning and web search are unavailable through Inert. Nothing errors. Those capabilities are simply absent.

Non-interactive runs

codex exec blocks reading stdin outside a TTY, so redirect it in scripts and CI:

bash
codex exec "summarize this repo" < /dev/null

Statelessness

Inert stores nothing between requests, so previous_response_id is rejected. Codex already resends the full conversation on every turn against a custom provider, so multi-turn sessions work unchanged. Prompt caching still applies, so cached_tokens shows up in the usage of a repeated prefix.

Next steps