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.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.
1
Install LiteLLM
LiteLLM bridges the Responses API to Chat Completions.
2
Configure the proxy
The model below is an example, not the full LithosAI catalog. For another model
or tier, replace the ID after
openai/ with one from Models.
Keep the proxy’s model_name and the Codex model setting consistent.Give the model the openai/ prefix and set use_chat_completions_api, which bridges
incoming /v1/responses requests to LithosAI’s /v1/chat/completions.LiteLLM proxy configuration
LiteLLM proxy configuration
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. It also removes client_metadata, which LithosAI does not
accept as a Chat Completions parameter. master_key is the token Codex sends to the proxy, not your
LithosAI key.3
Start the proxy
127.0.0.1 and do not expose it to a network.4
Point Codex at it
Codex configuration
Codex configuration
~/.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.