1. Create a gateway key
In the console, open API keys and create one. It belongs to the workspace you are in, and can reach the providers and models enabled there.2. Add Nemu as a provider
Edit~/.codex/config.toml:
model takes a gateway name exactly as GET /v1/models reports it. Run this to
see yours:
3. Run it
Choosing a wire API
Nemu implements the Responses API for every model, including ones whose upstream
provider only speaks chat completions, so
responses is safe even when the
target is not an OpenAI model.
Notes
- Nemu accepts the key as
Authorization: Bearerorx-api-key; Codex sends the bearer header, which is whatenv_keywires up. - The base URL must include
/v1. Codex appends/responsesitself. - If you want a short name in config, create a mapping in the console and use the
mapped name as
model. - Reasoning effort passes through. Nemu translates it into whatever the target model supports rather than rejecting the request.
Silencing the model metadata warning
Codex prints this on every turn when it does not recognise the model slug:GET /v1/models
for a normal env_key provider, so the gateway cannot supply it over the wire.
Set the context window yourself, at the top level of ~/.codex/config.toml:
codex-rs/models-manager/models.json in the Codex repository and
change slug, display_name, context_window, max_context_window and
supported_reasoning_levels. Set visibility to "list" for it to appear in
/models.
model_max_output_tokens and model_supports_reasoning_summaries were removed
from Codex. Setting them today does nothing.