Lumoswitch Docs
Client setup

Codex setup

Codex connects to Lumoswitch through a custom model provider. This configuration uses the Responses API, so the API configuration must provide matching output.

Export the access key

export LUMOSWITCH_API_KEY="your-lumoswitch-access-key"

Reload your shell after adding the variable to its startup file.

Configure Codex

Add the following to ~/.codex/config.toml:

model = "your-client-facing-model-name"
model_provider = "lumoswitch"

[model_providers.lumoswitch]
name = "Lumoswitch"
base_url = "https://api.lumoswitch.com/v1"
env_key = "LUMOSWITCH_API_KEY"
wire_api = "responses"
requires_openai_auth = false

Modify existing top-level model and model_provider values instead of declaring duplicate TOML keys. requires_openai_auth = false makes Codex use the custom provider and environment credential directly instead of requesting an OpenAI sign-in.

Start and verify

test -n "$LUMOSWITCH_API_KEY" && echo "key loaded"
codex

Send a minimal prompt after Codex starts.

Troubleshooting

  • Keep wire_api = "responses"; another wire format may not match the API configuration.
  • The base URL includes /v1, but not the /responses endpoint itself.
  • A desktop launcher may not inherit shell variables. Start Codex from the configured terminal.
  • Fully restart Codex after changing the provider configuration.

To avoid changing the configuration file, use the Codex entry in the one-click command library.

References: Codex custom model providers and the configuration reference.

On this page