Codex Setup
Codex is OpenAI's official coding assistant CLI. model-go speaks the OpenAI API format, so you can connect it directly.
Prerequisites
- You have created an API token in model-go
- You have installed Node.js 18+ Environment Check
Install
bash
npm install -g @openai/codexpowershell
npm install -g @openai/codexVerify the installation:
bash
codex --versionConfiguration
Codex can read API settings from a config file.
toml
model_provider = "model-go"
model = "replace with a model name from the Models page"
[model_providers.model-go]
name = "model-go"
base_url = "https://model-go.com/v1"
wire_api = "responses"
requires_openai_auth = truetoml
# 1. Press Win+R, type %USERPROFILE%, and press Enter
# 2. Create the .codex folder
# 3. Create config.toml and auth.json inside that folder
model_provider = "model-go"
model = "replace with a model name from the Models page"
[model_providers.model-go]
name = "model-go"
base_url = "https://model-go.com/v1"
wire_api = "responses"
requires_openai_auth = trueYou also need an auth.json file in the same directory as config.toml:
json
{
"OPENAI_API_KEY": "your model-go token"
}json
{
"OPENAI_API_KEY": "your model-go token"
}Creating the .codex folder on Windows
powershell
mkdir "%USERPROFILE%\.codex"Configuration Notes
| Setting | Purpose |
|---|---|
base_url | model-go OpenAI-compatible endpoint: https://model-go.com/v1 |
OPENAI_API_KEY | The API token you created in model-go |
model | The model name shown in the Models page |
WARNING
Codex requires the /v1 suffix. Make sure you use https://model-go.com/v1, not https://model-go.com.
Launch
bash
cd your-project-folder
codexCommon Issues
See the Codex FAQ.