Skip to main content

Before you begin

Create a key on the API Keys page, confirm the model ID on the Models page, and export the key in the shell where you start Codex or its local proxy.
Codex no longer speaks Chat Completions. wire_api = "chat" is rejected at startup, and responses is the only accepted value, so Codex reaches LithosAI through a proxy that accepts Responses API requests.
This is a compatibility path, not native Responses API support. LiteLLM translates common text and function-tool requests, but Responses-only tools and metadata may not map to Chat Completions. If your workflow depends on a specific Codex tool, verify it before relying on this setup.
1

Install LiteLLM

LiteLLM bridges the Responses API to Chat Completions.
Install a current release. LiteLLM 1.82.7 and 1.82.8 were briefly replaced on PyPI in March 2026 by a credential stealer.
2

Configure the proxy

Give the model the openai/ prefix and set use_chat_completions_api, which bridges incoming /v1/responses requests to LithosAI’s /v1/chat/completions.
codex.litellm.yaml
drop_params discards parameters a model does not accept rather than failing the request. additional_drop_params removes reasoning_effort: Codex asks for a reasoning summary, LiteLLM forwards that request in this field in a form LithosAI rejects, and Codex works without it. master_key is the token Codex sends to the proxy, not your LithosAI key.
3

Start the proxy

Leave it running, and confirm it is up. The proxy holds your LithosAI key, so keep it bound to 127.0.0.1 and do not expose it to a network.
4

Point Codex at it

~/.codex/config.toml
env_key names the variable holding the proxy’s master_key, so export that too.

Troubleshooting

Issues common to every agent are listed under Common issues.