Skip to content

Codex FAQ

Why is Codex failing to connect?

If running codex does not return a response or shows an error, check:

  1. 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 token
  1. The URL must include the /v1 suffix

  2. Your 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 ~/.zshrc or ~/.bashrc, run source again
  • Or reopen the terminal window
  • On Windows, restart the terminal after changing system environment variables