OpenAI Codex CLI Setup Guide
Install and configure Codex CLI with Wanmo Test on Windows, macOS, and Linux.
Overview
Codex CLI is OpenAI's terminal coding agent. It reads, writes, and runs code through sandboxed, reviewable patches. Point its custom provider at Wanmo Test's base URL to use any model in the catalog.
Quick Config
Paste these into the client. Your key auto-fills when signed in.
Base URL: https://testapi.wanmo.ai/v1
API Key: YOUR_API_KEYCompatibility
Step-by-step setup
- 1Install Codex CLI
Install Codex CLI globally with npm.
bashnpm install -g @openai/codex - 2Configure the model provider
Edit `~/.codex/config.toml`. Set your model id and add a custom provider with Wanmo Test's base URL using the responses wire API.
toml# ~/.codex/config.toml model = "YOUR_MODEL_ID" model_provider = "unorouter" [model_providers.unorouter] name = "UnoRouter" base_url = "https://testapi.wanmo.ai/v1" wire_api = "responses" env_key = "OPENAI_API_KEY" - 3Export your API key
Export the variable named by env_key. Codex reads a custom provider's key from the environment; auth.json is only for signing in to OpenAI.
bashexport OPENAI_API_KEY="YOUR_API_KEY" - 4Start Codex
Run `codex` in your project directory.
bashcodex - 5Codex desktop app
The desktop app reads the same `~/.codex/config.toml`, but started from the dock or Start menu it does not see your shell variables. Put the key in the provider block with `experimental_bearer_token` instead of env_key, then quit the app fully and reopen it.
toml# ~/.codex/config.toml model = "YOUR_MODEL_ID" model_provider = "unorouter" [model_providers.unorouter] name = "UnoRouter" base_url = "https://testapi.wanmo.ai/v1" wire_api = "responses" experimental_bearer_token = "YOUR_API_KEY"
$env:OPENAI_BASE_URL="https://testapi.wanmo.ai/v1"
$env:OPENAI_API_KEY="YOUR_API_KEY"
codexBest free models for Codex CLI
Free models that work here. Paste any model id into the client.
Gotchas
- On an unsupported endpoint error, confirm `wire_api` is `responses` and the base URL ends in `/v1`.
- If requests are unauthenticated, check that env_key names a variable that is actually exported in the shell running codex.
- You cannot reuse the reserved id openai for a custom provider. Any other id works, in the model_providers section and model_provider alike.
- The desktop app model picker shows OpenAI models plus one Custom entry for your top-level model. To switch models, change `model` in config.toml and relaunch the app.