Export your key once, in whichever shell you use to start these tools.
LithosAI validates tool schemas strictly. An agent that loads an MCP server whose tool
parameters are not a JSON Schema object is rejected with
invalid 'parameters' schema.
Disable that server or correct its schema.Codex
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.
1
Install LiteLLM
LiteLLM bridges the Responses API to Chat Completions.
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. 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/config.toml
env_key names the variable holding the proxy’s master_key, so export that too.Troubleshooting
Claude Code
Claude Code speaks the Anthropic Messages API, so its proxy needs a different configuration from the one Codex uses. Run it on a second port to use both agents at once.1
Install LiteLLM
LiteLLM bridges the Anthropic Messages API to Chat
Completions.
2
Configure the proxy
Give each model the
hosted_vllm/ prefix. It routes /v1/messages straight to Chat
Completions and maps replies, including reasoning, back into Anthropic content blocks.claude-code.litellm.yaml
3
Start the proxy
127.0.0.1 and do not expose it to a network.4
Point Claude Code at it
ANTHROPIC_SMALL_FAST_MODEL handles background work such as session titles. Without it,
those requests fail against a model the proxy does not serve.Check the Models console page for each model’s
context window.
Troubleshooting
OpenCode
OpenCode reaches LithosAI directly, with no proxy and nothing to install. Declare the provider inopencode.json, either in a project or at ~/.config/opencode/opencode.json.
opencode.json
@ai-sdk/openai-compatible is the package for Chat Completions providers, and OpenCode
bundles it. Start OpenCode as usual.