Gemini 4 Carbon is the current headline model. Artificial Analysis reported it at number one on its Intelligence Index v5 on October 28. Google then announced broader availability on November 10. The official launch guidance is more useful than the ranking alone: Carbon is intended for the hardest problems, while Google still recommends Gemini 4 Argon for most software engineering and knowledge work.
That distinction is the point of this tutorial. A benchmark can tell us which models deserve attention. It cannot tell us which model should handle every task, whether a route is available in a RelayRouter account, or whether that route supports the Responses and tool behavior Codex needs.
So we will use a fixed business task: connect Codex through RelayRouter and ask it to build a renewal-risk report from six synthetic customer records.
What RelayRouter does in this workflow
Codex works inside your project folder. RelayRouter is the configured model connection. The selected model helps Codex understand the task and produce the files. The generated Python script applies the business rules every time it runs.
The practical convenience is not a magical “best model” switch. It is having the connection described in one user-level provider definition, then choosing an exact compatible model ID from the current console.
Collect the three connection values
Register at https://relayrouter.app/register?aff=xc9N, then open the current RelayRouter console. Collect:
- API Base URL: where Codex sends the request.
- API key: the credential for the route.
- Model ID: the exact model your token group permits.
The registration URL is not the API endpoint. The supplied tutorial screenshot uses https://api.relayrouter.ai/v1, but confirm the value in your current console. A model appearing in a benchmark or an official launch post does not prove that it is available through your RelayRouter account or compatible with Codex.
Install or update Codex
With a current Node.js LTS installation:
npm install -g @openai/codex
codex --version
The current release context is Codex CLI 0.167.2, dated November 11. The November 6 release also added codex agents --no-daemon. Those client updates do not automatically add a third-party model route; the provider still needs a compatible Responses endpoint.
Configure the provider
Open %USERPROFILE%/.codex/config.toml on Windows, or ~/.codex/config.toml on macOS/Linux. Back up the existing file and merge the following entries without removing unrelated settings:
User-level file: ~/.codex/config.toml
Back up existing settings first. Confirm Base URL and model ID in your current console.
model_provider = "relayrouter"
model = "REPLACE_WITH_CODEX_COMPATIBLE_MODEL_ID"
[model_providers.relayrouter]
name = "RelayRouter"
base_url = "https://api.relayrouter.ai/v1"
wire_api = "responses"
env_key = "RELAYROUTER_API_KEY"
requires_openai_auth = false
Replace the model placeholder. Keep the API key out of this file. The current official Codex reference supports base_url, env_key and wire_api for a custom provider; responses is the supported wire protocol.
Set the key in the launching terminal
Windows PowerShell:
$secret = Read-Host "RelayRouter API key" -AsSecureString
$ptr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secret)
try { $env:RELAYROUTER_API_KEY = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($ptr) }
finally { [Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ptr) }
[bool]$env:RELAYROUTER_API_KEY
macOS/Linux:
printf 'RelayRouter API key: '
IFS= read -r -s RELAYROUTER_API_KEY
printf '\n'
export RELAYROUTER_API_KEY
[ -n "$RELAYROUTER_API_KEY" ] && printf 'Key is set\n'
Start Codex from that same terminal. The example keeps the key in the current shell and its child process rather than writing it into the project.
Give Codex a renewal-risk task
Create an empty folder and save this as renewals.csv:
customer_id,days_to_renewal,health_score,open_tickets
C001,14,52,4
C002,28,85,0
C003,45,68,2
C004,20,72,3
C005,75,74,1
C006,90,82,0
The rules are intentionally explicit. A customer is high risk when renewal is within 30 days and either health is below 60 or open tickets are at least 3. Otherwise, the customer is medium risk when renewal is within 60 days, health is below 75, or open tickets are at least 2. Everyone else is low.
For this fixture, the expected summary is high 2, medium 3 and low 1.
Run codex in the folder and paste:
Create renewal_risk.py using only the Python standard library. Read renewals.csv with csv.DictReader. Do not modify the CSV. Validate the required columns and integer values. Assign risk using these exact rules in order: high if days_to_renewal <= 30 and (health_score < 60 or open_tickets >= 3); otherwise medium if days_to_renewal <= 60 or health_score < 75 or open_tickets >= 2; otherwise low. Write renewal_risk.json beside the selected CSV. Include summary counts in high, medium, low order, plus a customers list containing customer_id, risk and reasons. Sort customers by risk priority high, medium, low and then days_to_renewal ascending. Accept an optional CSV path argument. Expected counts for the fixture: high=2, medium=3, low=1. Add unittest cases for the fixture, rule boundaries, missing columns and invalid integers. Run python -m unittest -v and report actual results.
This task requests a reusable deliverable: a script, a JSON report, reasons for every classification and tests. It also asks Codex to run those tests instead of merely creating them.
Inspect the output yourself
The expected counts are:
{"high": 2, "medium": 3, "low": 1}
Run the generated program and test suite:
python renewal_risk.py renewals.csv
python -m unittest -v
On Windows, use py if that is your Python launcher. Open renewal_risk.json and check that C001 and C004 are high, C002/C003/C005 are medium and C006 is low. Confirm renewals.csv was not changed.
The downloadable kit includes an independently written reference implementation. It proves the fixture and rules are internally consistent; it is not evidence that a live RelayRouter route has been tested.
Where Carbon belongs in the decision
If your RelayRouter console exposes a Carbon route that is compatible with Codex, it may be worth testing on a genuinely difficult variation: ask for a written risk memo that reconciles several messy data sources, explains uncertainty and proposes follow-up questions.
The six-row deterministic script may not need the heaviest model. Start with a compatible route appropriate for ordinary coding work. Escalate when the task becomes hard enough to justify deeper reasoning, longer runtime or higher cost.
Compare routes without moving the goalposts
Keep renewals.csv, TASK.txt and the tests unchanged. Change only the compatible model ID. Record:
- Did Codex create the requested files?
- Did the tests pass?
- Were all reasons traceable to the rules?
- How many corrections were required?
- How long did review take?
This turns “number one” into a useful experiment. RelayRouter is convenient when it lets your team evaluate available routes without redesigning the work every time a leaderboard changes.
Troubleshooting
If codex is not recognized, check installation and PATH. If the key is missing, launch Codex from the terminal where it was set. A 401 or 403 points toward credential validity or permissions. A 404 or model-not-found response calls for checking Base URL, exact model ID, token group and Responses compatibility. A 429 points toward the stated quota or rate limit.
Start with the route you can verify: https://relayrouter.app/register?aff=xc9N
Disclosure: this post promotes RelayRouter; the registration URL is a referral link.
Sources
Artificial Analysis Carbon evaluation ({AA}) · Google Carbon availability ({CARBON}) · Codex release notes ({CODEX_NEWS}) · Codex configuration reference ({CONFIG_REF})




Top comments (0)