Codex
How to Use Another GPT Model in Codex
Open config.toml and find:
model = "gpt-5.5"Change it to the model you want to enable, then save the file.
After saving, restart the client you are using for the change to take effect: Codex CLI, Codex App, or the editor extension.
Important: after enabling it, do not switch models inside the same long-running conversation. If you already switched models, restart Codex with an explicit command.
CLI Usage
Start Codex with:
codex -m gpt-5.5 -c model_reasoning_effort="xhigh"If codex is already open, press Ctrl + C to exit, then restart it with the command above.
Codex Still Calls the Official Endpoint
Check your environment:
echo $OPENAI_BASE_URL
echo $OPENAI_API_KEYWindows PowerShell:
$env:OPENAI_BASE_URL
$env:OPENAI_API_KEYThe base URL should be:
https://api.fhrouter.com/v1Model Not Found
Use one of the model ids returned by:
curl https://api.fhrouter.com/v1/models \
-H "Authorization: Bearer YOUR_FHROUTER_API_KEY"Common GPT/Codex ids:
gpt-5.4-mini
gpt-5.4
gpt-5.5Windows Command Problems
If codex fails in PowerShell, try:
codex.cmdIf output is garbled:
chcp 65001
Better Prompts for Coding Tasks
Codex works best when the task is scoped. Instead of asking it to build a whole system at once, split the task into smaller steps:
- inspect the current code path
- explain the likely change
- edit one module
- run the relevant tests
- summarize the diff
Start with read-only work before allowing edits:
codex exec "Explain the project structure without changing files."Context Gets Too Large
If Codex starts losing focus in a long session, start a new session and provide the current task, relevant file paths, and the latest error. Very long sessions can become harder to control.
