Codex CLI
The Codex CLI defaults to OpenAI’s Responses API (/v1/responses), which llmprof
captures natively - so you just point Codex at the proxy, no wire-protocol changes.
-
Start the proxy (one instance handles OpenAI and Anthropic):
Terminal window llmprof up -
Point Codex at the proxy in
~/.codex/config.toml. Codex ignores theOPENAI_BASE_URLenvironment variable, so the base URL has to go in the config as a custom provider (the built-inopenaiprovider cannot be overridden):model_provider = "llmprof"[model_providers.llmprof]name = "llmprof"base_url = "http://localhost:4000/v1"wire_api = "responses"env_key = "OPENAI_API_KEY"Then run Codex with an
OPENAI_API_KEYin the environment (API-key auth, not ChatGPT login - the login flow talks to a backend the proxy does not sit in front of):Terminal window export OPENAI_API_KEY=sk-...codex -
Open http://localhost:4000 and watch each Codex request break down by component. The timeline view shows how a coding session’s context grows.