POST /v1/responses, so pointing Codex at it is a provider entry in Codex’s
config.toml. No Tracelane SDK is involved.
Setup
Mint a key with thechat scope in Settings → API keys. Add the key for the
model’s provider under Settings → LLM providers, because the gateway calls that
provider with your own key. Then add this to ~/.codex/config.toml:
Authorization: Bearer $TRACELANE_API_KEY to {base_url}/responses.
Each call becomes one gateway span, with the same keys, budgets, rate limits and
guardrails as every other route.
Using a model that is not OpenAI’s
Setmodel to any model the gateway routes, for example a claude-* or gemini-*
model:
Translated calls have these limits:
- No stored state.
previous_response_id,backgroundandconversationreturn400 unsupported_parameter. Codex withstore = false, its default, sends the full conversation on every turn and is not affected. - Hosted search is dropped, not run. Codex’s
web_searchandtool_searchtools are removed before the call, and the response headerx-tracelane-dropped-toolslists them. Other hosted tools, such ascode_interpreter,file_searchandcomputer_use, return400. - Reasoning items are not returned. Encrypted reasoning from an earlier OpenAI turn means nothing to another provider, so the gateway drops it and counts it on the span.
- Reasoning effort, structured output and file inputs are translated into the
provider’s own controls where it has them, for example adaptive thinking on Claude
or
thinkingLevelon Gemini. A value the provider cannot honour returns400 unsupported_parameternaming the field. - Two hints are dropped, and the drop is reported.
text.verbosityhas no equivalent outside OpenAI.parallel_tool_calls: falseis dropped on providers that have no such switch, so the model may return more than one call in a turn. Both appear inx-tracelane-dropped-tools. Nothing is ignored silently.
apply_patch tool is passed to the provider as a tool that takes a
single string. The call comes back to Codex as a custom_tool_call, the shape Codex
expects.
Errors
Gateway errors use the OpenAI shape,{"error": {"message", "type", "code", "param"}}.
For a relayed provider, an upstream error keeps its status and body, with credentials
scrubbed. A rejected provider key is reported as provider_key_rejected and the
upstream body is not returned.