Codex CLI
Codex CLI talks to UberLLM through the
Responses API at https://api.uberllm.dev/v1. Codex 0.95 and later
only speak the Responses API (wire_api = "chat" was removed), and UberLLM serves it
on every chat model. Tested with Codex 0.166.0 on 2026-10-30: shell commands, file
edits and multi-step tasks.
Setup
Create a key in Dashboard → Keys and add credit.
Export it in your shell profile (
~/.zshrcor~/.bashrc):export UBERLLM_API_KEY="ull_..."Add to
~/.codex/config.toml:model = "deepseek/deepseek-v4.1-flash" model_provider = "uberllm" web_search = "disabled" [model_providers.uberllm] name = "UberLLM" base_url = "https://api.uberllm.dev/v1" env_key = "UBERLLM_API_KEY" wire_api = "responses"Open a new terminal and run
codexin your project.
base_url must end in /v1: Codex adds /responses. env_key is the name of the
environment variable that holds the key.
Live model picks with today's prices: Codex setup guide.
Options
| Setting | Why |
|---|---|
model |
Any chat model id from the catalog. Override per run with codex -m <id>. |
model_context_window |
Codex assumes 272,000 tokens for models outside OpenAI's own list. Set the model's real context size so Codex compacts the conversation in time. |
model_reasoning_effort |
"low", "medium" or "high", passed on to models that think. |
web_search = "disabled" |
Codex's web search runs on OpenAI's servers and is not offered by other providers; UberLLM leaves the tool out either way. |
Non-interactive runs for scripts and CI:
codex exec --skip-git-repo-check "fix the failing test in tests/test_api.py"
How it works
- Codex sends the whole conversation on every turn with
store: false. UberLLM keeps nothing between calls and Codex needs nothing kept. - Codex's tools (
exec_command,apply_patch,update_plan, MCP servers you add) are function and custom tools from the API's side, so they work on any model with tool calls. - Each call appears in Dashboard → Activity with the app name
codexand its cost.
Troubleshooting
| Symptom | Fix |
|---|---|
wire_api = "chat" is no longer supported |
Set wire_api = "responses". |
Missing environment variable: UBERLLM_API_KEY or 401 |
Export the key in the terminal Codex runs in. |
404 on every turn |
base_url must be https://api.uberllm.dev/v1. |
| "Model metadata for … not found. Defaulting to fallback metadata" | Harmless for models outside OpenAI's list; set model_context_window. |
| The model answers but never runs commands | Use a model with reliable tool calls (DeepSeek, GLM, Kimi, Qwen Coder, Claude, GPT). |
402 |
Add credit, or raise the key's spend limit. |