GPT-6 Astra: Features and Codex Setup for XAI, YAI, and ZAI
Posted September 4, 2026 by ZAI Tech Teamย โย 5ย min read

GPT-6 Astra is built for complex reasoning, coding, and multistep workflows. In Codex, it can help with development tasks that require understanding a codebase, using tools, and checking results. OpenAI model overview
This guide introduces Astra's main capabilities and explains how to connect through XAI / YAI / ZAI Router. All three use the same Codex configuration structure: gpt-6-astra as the default model, xhigh reasoning for regular and plan modes, Responses over HTTP, and a compaction threshold calculated by Codex.
What Astra offers
- Complex tasks and sustained execution. OpenAI positions Astra for difficult end-to-end work, including software engineering, research, and document creation. Coding tasks can connect requirements, code changes, tool use, and validation.
- Async tool calling. In applications that support it, the model can continue other work while a tool is still running. The application remains responsible for tool execution and returning results.
- Instructions and reasoning changes during work. The API offers mid-turn steering over WebSocket and supports
configuration_updateitems for compatible requests to adjust reasoning while preserving the cache prefix. These features require client support. This guide uses HTTP for common network environments, so its configuration does not enable WebSocket-only steering.
See the official Astra usage guide for these capabilities.
The model also provides a large context window and image input:
| Specification | OpenAI's published Astra specification |
|---|---|
| Model ID | gpt-6-astra |
| Input / output | Text and image input; text output |
| API context window | 1,050,000 tokens |
| Maximum output | 128,000 tokens |
| Reasoning effort | low, medium, high, xhigh, max |
These are model API specifications. Clients separately manage input budgets and compaction. The Codex configuration below selects an 872000 context window. OpenAI Astra model specifications
Choose XAI, YAI, or ZAI
Use the console, API address, and key for your chosen service:
| Service | Console / API key | Codex base_url |
|---|---|---|
| XAI Router | m.xairouter.com | https://api.xairouter.com |
| YAI Router | m.yairouter.com | https://api.yairouter.com |
| ZAI Router | m.zairouter.com | https://api.zairouter.com |
The complete example below uses ZAI Router. To use another service, replace base_url and enter that service's API key in both the configuration and authentication files. The model, reasoning, and HTTP settings are the same.
Update Codex and get your configuration
If you installed Codex CLI through npm, update it first:
npm install -g @openai/codex@latest
codex --versionCodex App users should also update and restart the application.
Sign in to your service's console from the table above and open Codex CLI / Codex App in the setup guide. Linux / macOS users can copy the setup command with their current API key inserted automatically. For manual setup, edit config.toml and auth.json as shown below.
Recommended config.toml
Use ~/.codex/config.toml, or %USERPROFILE%\.codex\config.toml on Windows. If you already have MCP servers, plugins, or other tools configured, merge these model and provider settings while keeping your existing tool configuration.
model_provider = "xai"
model = "gpt-6-astra"
model_context_window = 872000
model_reasoning_effort = "xhigh"
plan_mode_reasoning_effort = "xhigh"
model_reasoning_summary = "none"
approval_policy = "never"
sandbox_mode = "danger-full-access"
suppress_unstable_features_warning = true
[model_providers.xai]
name = "OpenAI"
base_url = "https://api.zairouter.com"
wire_api = "responses"
experimental_bearer_token = "sk-Xvs..."
requires_openai_auth = false
stream_idle_timeout_ms = 900000
supports_websockets = false
http_headers = { "x-codex-routing-hint" = "model=gpt-6-astra" }
[features]
image_generation = true
goals = trueReplace sk-Xvs... with the Router API key from your chosen service and select its base_url from the table. This matches the console configuration. Its approval_policy and sandbox_mode settings let Codex access files available to the current system account and run commands without asking for approval each time. If you already use a separate permissions policy, retain those settings.
Then edit ~/.codex/auth.json, or %USERPROFILE%\.codex\auth.json on Windows, and enter the same key:
{
"OPENAI_API_KEY": "sk-Xvs..."
}experimental_bearer_token makes this custom provider use the Router key directly. If another login flow later updates auth.json, model requests still use the authentication configured for this provider.
Configuration notes
| Setting | Value or behavior used here |
|---|---|
| Default model | gpt-6-astra |
| Routing hint | model=gpt-6-astra |
| Transport | wire_api = "responses", supports_websockets = false |
| Regular reasoning effort | model_reasoning_effort = "xhigh" |
| Plan reasoning effort | plan_mode_reasoning_effort = "xhigh" |
| Context window | model_context_window = 872000 |
| Automatic compaction | Managed by Codex using the model context |
HTTP remains the default to accommodate networks that do not support WebSocket. Codex tool calls continue to use the Responses protocol. The routing hint is updated alongside the default model. When you temporarily switch models with --model or /model, the Router synchronizes the hint before forwarding the request.
The context window is set to 872000, and Codex manages automatic compaction using the model context. Codex configuration reference
Regular and plan modes both use xhigh. The separate model_reasoning_summary = "none" setting only disables reasoning summaries; reasoning effort remains xhigh. Reasoning summary configuration
When you run /review, code review defaults to the current session model. Starting an Astra session with this configuration therefore also uses Astra for reviews.
Start and verify
Save both files, open your project directory, and run:
codexYou can first try a read-only task to check that the model and route work:
codex exec --model gpt-6-astra "Read the README and describe this project's purpose without changing any files."Once connected, give Codex a development task with a clear scope. For example:
Fix the issue where users occasionally return to the login page after signing in.
Identify the root cause, make the necessary changes, and run the relevant tests.
Keep the existing authentication method and leave unrelated pages unchanged.
Report the changes, validation results, and any remaining issues.For future configuration updates, copy the current recommendation from your service's console. Use the usage records to check the model and consumption for your requests.