Codex FAQ
Why is Codex failing to connect?
If running codex does not return a response or shows an error, check:
- Your environment variables or config file:
bash
echo $OPENAI_BASE_URL
# Should show: https://model-go.com/v1
echo $OPENAI_API_KEY
# Should show your tokenThe URL must include the
/v1suffixYour token group must include GPT / OpenAI-compatible models
Why is a model unavailable?
If a model is unavailable, your token group may not include it. Check the Token Group Guide or create a new token with the right group.
Why didn't my environment variables take effect?
- If you changed
~/.zshrcor~/.bashrc, runsourceagain - Or reopen the terminal window
- On Windows, restart the terminal after changing system environment variables