Claude Opus 5.5 is live on SeedRouter

GPT-6 in Codex: setup, tested configs and common errors

How to run GPT-6 Astra, Sol and Luna in OpenAI Codex CLI with a SeedRouter key: the config.toml, the context window setting, test results and common errors.

Read as Markdown

GPT-6 Astra, GPT-6 Sol and GPT-6 Luna all work as the model in OpenAI's Codex CLI with a SeedRouter key. Add SeedRouter to ~/.codex/config.toml, export your key and start Codex with gpt-6-astra, gpt-6-sol or gpt-6-luna. You pay per token from your SeedRouter balance, with no ChatGPT plan involved. In our test runs on September 29, 2026 with Codex CLI 0.157.0, all three models created a file, ran it, edited it, ran it again and reported both outputs correctly.

How do I use GPT-6 in Codex?

Add SeedRouter to your user-level ~/.codex/config.toml:

model = "gpt-6-astra"
model_provider = "seedrouter"

[model_providers.seedrouter]
name = "SeedRouter"
base_url = "https://api.seedrouter.ai/v1"
env_key = "SEEDROUTER_API_KEY"
wire_api = "responses"

Then export the key and start Codex:

export SEEDROUTER_API_KEY=sk-your-seedrouter-key
codex

To switch model for one session, pass it on the command line, for example codex -m gpt-6-sol. Codex's configuration reference says responses is the only supported value for wire_api, and the default when it is omitted. GPT-6 uses the Responses API for tools, which is what Codex relies on to read, edit and run files.

Put these settings in ~/.codex/config.toml, not in a project's .codex/config.toml. OpenAI's advanced configuration guide says Codex ignores model_provider and model_providers in project-local config "and prints a startup warning when it sees them".

Which GPT-6 model should I pick in Codex?

Model IDBest forEffort Codex sent by default in our test
gpt-6-astraThe hardest coding and reasoning taskslow
gpt-6-solEveryday coding workmedium
gpt-6-lunaFast, cheaper stepsmedium

Codex 0.157.0 already knows all three model IDs, so it starts without warnings and applies its own defaults for each. When model_reasoning_effort is not set, it still sends an effort level with each request: in our runs that was low for GPT-6 Astra and medium for Sol and Luna. The comparison of Astra, Sol and Luna covers the differences in more detail, and each model page shows live rates: Astra, Sol, Luna.

How do I set the reasoning effort for GPT-6 in Codex?

Set model_reasoning_effort in config.toml:

model_reasoning_effort = "medium"

Codex's configuration reference describes it as "Reasoning effort advertised by the selected model, such as low, medium, high, xhigh, max, or ultra. Available levels depend on the model and client." For GPT-6 Astra, Codex also lists ultra, which it labels "Maximum reasoning with automatic task delegation". That is a Codex setting, not an API effort level: in our test run with ultra, the requests Codex sent carried xhigh.

Higher effort means more reasoning tokens, and reasoning is billed as output. For a coding agent that runs many steps, start at the default and raise it only for tasks that need it.

What does model_context_window do for GPT-6 in Codex?

Codex's configuration reference describes it as "Context window tokens available to the active model." GPT-6 Astra, Sol and Luna have a 1.05M-token context window with up to 922K input tokens (see the GPT-6 Astra docs), but Codex uses its own smaller figure unless you change it.

What we measured in Codex 0.157.0:

SettingUsable window Codex reported
Not set258,400 tokens
model_context_window = 1050000828,400 tokens

Without the setting, Codex works with a 272,000-token window. Setting it higher raised the window, but not to the value we set: Codex's built-in profile for GPT-6 caps it at 872,000 tokens. So the useful maximum is:

model_context_window = 872000

Keep the cost in mind before you raise it. A GPT-6 request with more than 272K input tokens is billed at the long-context rates for the whole request, and Codex's default window keeps a session below that point. Context window vs max output tokens explains how the two limits differ. Codex has no setting for the output limit.

What did we test?

We gave each model the same four-step task in codex exec: create fib.py to print the first 10 Fibonacci numbers, run it with python3, change it to print 15, run it again and report both outputs.

ModelRequestsResult
gpt-6-luna2Both outputs reported correctly; wrote and ran both versions in one shell command
gpt-6-astra4Both outputs reported correctly; edited the file with Codex's patch tool and ran it with the shell tool
gpt-6-sol5Both outputs reported correctly; two patches and two runs

Every model reported the same two lines:

0 1 1 2 3 5 8 13 21 34
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377

The token counts Codex reported matched the usage records in our SeedRouter account request for request, which confirms every call went through the SeedRouter key.

The first request of a Codex session is the largest: Codex sends its instructions and tool definitions, about 15,000 to 20,000 input tokens in our runs, before the model does any work. Later turns re-send the same prefix, and in our GPT-6 Astra run more than 98% of each later turn's input was read from the cache. That makes the first turn the most expensive one in a session: the prefix is written to the cache, and cache writes are billed at 1.25 times the input rate, as the GPT-6 pricing guide explains.

Why does Codex say GPT-6 is not available?

The message depends on how you sign in.

With a SeedRouter key, a model ID that does not exist fails. When we started Codex with -m gpt-6, which is not one of the three model IDs, Codex printed:

warning: Model metadata for `gpt-6` not found. Defaulting to fallback metadata; this can degrade performance and cause issues.
ERROR: Reconnecting... 1/5
...
ERROR: Reconnecting... 5/5
ERROR: unexpected status 503 Service Unavailable: The requested model is not available.

We trimmed the request URL and ID from the last line. Codex retries five times before it gives up. Use the exact model ID: gpt-6-astra, gpt-6-sol or gpt-6-luna. The Model metadata ... not found line is only a warning that Codex does not recognise the name; the request failed because the model ID does not exist, as the last line says.

With a ChatGPT sign-in, access depends on your plan and your Codex version. OpenAI's help article GPT-5.6 and GPT-6 Pro in ChatGPT says: "Plus plans include GPT‑6 Astra in ChatGPT Work and Codex." and "For the Codex CLI, Astra requires version 0.153.0 or later." Check your version with codex --version and update if it is older. A SeedRouter key does not depend on a ChatGPT plan.

Do I need a ChatGPT subscription to use GPT-6 in Codex?

No. OpenAI's Codex authentication docs list two ways to sign in: "Sign in with ChatGPT for subscription access" and "Sign in with an API key for usage-based access". A SeedRouter key works the second way: Codex sends each request to SeedRouter and you pay per token from your balance. The same page notes that "Codex cloud requires signing in with ChatGPT", so the cloud tasks feature is not available with an API key. Local Codex CLI sessions, which is what our runs used, work.

Frequently asked questions

Which Codex version do I need for GPT-6?

Our runs used Codex CLI 0.157.0. For ChatGPT sign-in, OpenAI requires version 0.153.0 or later for GPT-6 Astra. Running a current version also gives you Codex's built-in settings for the GPT-6 models.

Can I use GPT-6 in Codex with the Chat Completions API?

No. Codex only speaks the Responses API, and GPT-6 Astra does not support function calling on Chat Completions, so tools need the Responses API anyway. Keep wire_api = "responses".

Can I use temperature with GPT-6 Astra in Codex?

No. GPT-6 Astra always reasons and does not accept temperature or top_p. Adjust model_reasoning_effort instead.

How do I get a SeedRouter key?

Sign up, create a key in your dashboard and add funds. Every new account starts with a small free balance, enough to try a short Codex session on GPT-6 Luna; a GPT-6 Astra session costs more, since its first turn alone writes about 20,000 tokens to the cache. The GPT-6 API guide covers calling the models from your own code.

Related guides