
A model announcement is interesting. A working script on your own computer is more useful.
As of November 4, the recent updates worth connecting to this tutorial are OpenAI's October 26 GPT-6.1 Terra release and the October 29 Codex CLI 0.166.0 update. The latter adds a network-focused diagnostic command. Those are dated releases, not claims of a new launch today. Model news (https://developers.openai.com/api/docs/changelog) · Codex release notes (https://learn.chatgpt.com/docs/changelog).
Here is a practical way to turn that interest into a result: connect a Codex-compatible RelayRouter route, ask Codex to create a tiny order-summary script, then check its output yourself.
What each part does
Codex is the coding assistant you run in a project folder. The model is the engine it asks for help. RelayRouter is the model connection configured in the supplied setup guide. Your files and terminal remain the place where the work happens.
The convenience is having the endpoint, key and chosen model in one understandable setup. Changing a model later should begin with checking that route's Codex and Responses support. A model being available for ordinary chat does not prove it can complete a Codex tool loop.
Step 1: collect three things

Register with RelayRouter (https://relayrouter.app/register?aff=xc9N), then open the token page in your account. You need an API Base URL, an API key and the exact model ID permitted for that key. The supplied guide shows a Codex-specific token group; choose the current group intended for Codex in your console. The old screenshot's model name and rate are examples, not today's guaranteed options.
The signup URL is for your browser. It is not the API address. The screenshot shows https://api.relayrouter.ai/v1 as the API Base URL. Confirm it in your current console before using the template below. If your console gives a different address, use that account-specific address. Do not guess an endpoint by adding /v1 to a registration link.
Step 2: install the CLI
With a current Node.js LTS installation and npm available, open PowerShell on Windows or Terminal on macOS/Linux:
npm install -g @openai/codex
codex --version
Keep the version number. The diagnostic command later in this article was introduced in 0.166.0. The install command follows the official Codex instructions (https://learn.chatgpt.com/docs/codex/cli); this tutorial is for the CLI, rather than every desktop app or editor that happens to use the name Codex.
Step 3: add a small user-level configuration

Windows: open %USERPROFILE%/.codex/config.toml. macOS/Linux: open ~/.codex/config.toml. Back up an existing file first. Keep unrelated settings, and merge these entries once rather than adding duplicate provider tables.
Replace the model placeholder and confirm the Base URL. Do not paste your key into this file:
Save at USER LEVEL as ~/.codex/config.toml after backing up existing settings.
Replace model; confirm Base URL against your current account console.
This Base URL comes from the supplied tutorial screenshot.
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
The provider name is a local label. base_url is the API address. env_key tells Codex which environment variable holds the key. wire_api selects Responses. This template uses the custom-provider environment-key path, so it does not need you to create or overwrite auth.json. These fields follow the current OpenAI reference (https://learn.chatgpt.com/docs/config-file/config-reference).
Step 4: give this terminal the key
On Windows PowerShell, this asks locally and hides typed characters:
$secret = Read-Host "RelayRouter API key" -AsSecureString
$ptr = Runtime.InteropServices.Marshal::SecureStringToBSTR($secret)
try {
$env:RELAYROUTER_API_KEY = Runtime.InteropServices.Marshal::PtrToStringBSTR($ptr)
} finally {
}
Confirm presence without printing the key:
[bool]$env:RELAYROUTER_API_KEY
On 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. These examples set a key for the current shell and its child processes. Opening a different terminal does not automatically carry the key over.
Step 5: give Codex one small business task

Make an empty folder called order-demo. Save this as orders.csv, or use the fixture supplied with this tutorial:
order_id,amount,status
A001,120.00,paid
A002,80.50,pending
A003,199.90,paid
A004,25.00,refunded
A005,0.10,paid
Open that folder in your terminal and run:
codex
Paste this task:
Create summarize_orders.py using only Python standard library. Read orders.csv with csv.DictReader. Sum only rows whose status is exactly paid, using Decimal, never float. Do not modify orders.csv. Accept an optional CSV file path argument. Write summary.json beside the chosen CSV with paid_orders (integer) and paid_total (two-decimal string). Expected for the provided fixture: {"paid_orders": 3, "paid_total": "320.00"}. Fail clearly on missing required columns, invalid paid amounts or unreadable files. Add unittest cases for the fixture, zero paid rows, decimal precision and missing columns. Run python -m unittest -v. Explain changed files and actual test results; do not claim a test ran if it did not.
This is a real workflow to try, not a recorded claim that a paid model already ran it. Python 3 must be installed to execute the generated script. On Windows, use py in place of python if that is your Python launcher.
Step 6: inspect what was built
The input contains three paid orders: 120.00, 199.90 and 0.10. They add to 320.00. Pending and refunded rows are excluded by the rule. The expected file is:
{"paid_orders": 3, "paid_total": "320.00"}
Run python summarize_orders.py orders.csv, then python -m unittest -v. Look at the actual output and test results. The kit includes a separately authored reference solution so you can compare behavior; it is not evidence that your RelayRouter connection works.
If the first request fails
An unset key means the terminal that launches Codex does not have the variable. A 401 points you toward authentication. A 403 calls for checking the key's permissions. For a 404 or model-not-found response, inspect the Base URL, Responses route, model ID and token group together. For a 429, inspect the stated rate or quota limit and stop repeated manual retries.
On versions that support it, codex doctor --network-only can narrow down connectivity problems. Check codex doctor --help first. A successful chat test alone still does not validate Codex's streaming and tool behavior.
Once the small task works, you have a repeatable starting point: one configuration, one fixed fixture, one task and one measurable result. That is the useful reason to try RelayRouter with Codex.
Disclosure: this post promotes RelayRouter; the registration URL is a referral link.
Sources
Codex release notes (https://learn.chatgpt.com/docs/changelog) · Provider configuration (https://learn.chatgpt.com/docs/config-file/config-advanced) · Configuration fields (https://learn.chatgpt.com/docs/config-file/config-reference) · OpenAI model news (https://developers.openai.com/api/docs/changelog)

Top comments (0)