Integrations/Codex CLI/Configure Model Provider
Configure Model Provider
Add a provider block to ~/.codex/config.toml.
1. Edit the config file
Open ~/.codex/config.toml (create it if missing) and add:
toml
model = "YOUR_MODEL_ID"
model_provider = "bigmodel"
[model_providers.bigmodel]
name = "StarUnion"
base_url = "https://www.starunion.net/v1"
env_key = "BIGMODEL_API_KEY"
wire_api = "chat"2. Provide the key
bash
export BIGMODEL_API_KEY=YOUR_API_KEY3. Run
bash
codex| Field | Notes |
|---|---|
base_url | the StarUnion OpenAI-compatible endpoint, no trailing slash |
env_key | name of the environment variable holding the key |
wire_api | keep chat, i.e. the /chat/completions protocol |
model | model ID from the Model Plaza, case-sensitive |
A config file can hold several [model_providers.*] blocks — switch by changing model_provider at the top.
Updated: 2026-08-24