Skip to content

OpenAI Codex

Create a key in API Keys on the KoboiLLM dashboard, and check its available models. Use a model compatible with Responses and tool calling for Codex.

Install and configure

Terminal window
npm install -g @openai/codex

Add this provider to your user configuration at ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml). Merge it with existing settings without duplicating TOML keys. Place the top-level model and model_provider before table sections. Adjust the model name to match your key’s access.

model = "gpt-5.6-luna"
model_provider = "koboillm"
[model_providers.koboillm]
name = "KoboiLLM"
base_url = "https://api.koboillm.com/v1"
env_key = "KOBOILLM_API_KEY"
wire_api = "responses"

env_key reads the credential from an environment variable; wire_api selects Responses. Put provider settings in the user configuration, not project configuration. See the official Codex configuration reference and provider configuration.

Set the key and run

Linux/macOS:

Terminal window
export KOBOILLM_API_KEY="sk-xxxxxx"
codex

Windows PowerShell:

Terminal window
$env:KOBOILLM_API_KEY="sk-xxxxxx"
codex

Use your team’s KoboiLLM key. The provider settings above determine where requests go; changing a base URL in an unrelated SDK example does not configure Codex.

Check usage and connection issues

  • 401: check the key, whitespace, and environment of the terminal running Codex.
  • Model not found: match the exact accessible model name and choose a model supporting Responses.
  • Budget reached: check team credit and key/member limits in the dashboard.
  • Review Logs and Usage after requests finish. Chat with Responses can help check connectivity, but does not test every Codex agent feature.