Who it is forA developer who uses Codex and wants the same provider routing and fallback that the gateway offers Claude Code.
The problemEach coding client needs its own provider setup, so routing and fallbacks are hard to share across tools.
The outcomeCodex runs through the gateway launcher, and its requests use the models and fallbacks configured in .env.
What you need first
- Python 3.11 or newer
- A clone of the my-free-code repository
- At least one provider API key for the MODEL values you choose, or a local model server such as Ollama, LM Studio, or llama.cpp
- Claude Code or another supported client installed and on PATH
Steps
- Run
python -m venv .venv, thenpython -m pip install -r requirements.txt, thencp .env.example .envand set your MODEL and API keys. - Install Codex so that the codex command is available on PATH, since the README says the installed client must already exist.
- Run
python -m my_free_codein one terminal. - Run
python -m my_free_code.cli.mfc codexin a second terminal.
Prompt for your agent
In the my-free-code repository, confirm the codex command is on PATH, start the gateway with python -m my_free_code, then run python -m my_free_code.cli.mfc codex. Expected output: Codex starts and completes a short test task. Verify that the gateway log records the request.
Caveat. The launcher only prepares the local proxy environment and passes arguments to the installed client, so Codex must be installed separately.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page