Area
Provider adapters
What are you trying to accomplish?
Use Codex Fast mode with Grok models routed through the built-in xai provider when that provider is using an xAI API key. xAI documents Priority Processing for text inference by sending service_tier: "priority" on both Chat Completions and Responses requests.
The expected workflow is that selecting Fast in Codex, or enabling the existing OpenCodex Fast setting, makes an xAI API-key request use xAI Priority Processing while Standard leaves the field absent/default.
What prevents this today?
OpenCodex now has provider/model-scoped service-tier capability resolution, catalog publication, and Chat serialization, but the built-in xai registry entry declares neither chatServiceTier nor modelSupportsServiceTier. Consequently xai/* catalog rows do not advertise Fast and the runtime does not inject or forward the priority tier.
The preset also multiplexes two transports under one provider id:
- API-key mode stays on
https://api.x.ai/v1, where Priority Processing is officially documented.
- OAuth mode is rewritten to
https://cli-chat-proxy.grok.com/v1, where the same capability is not established by the public API documentation.
A provider-wide unconditional opt-in would therefore overstate the unverified OAuth transport.
What should OpenCodex do?
OpenCodex should make service-tier capability sensitive to the effective xAI authentication transport:
- enable verified
service_tier support for the canonical xAI API-key transport;
- publish the Codex Standard/Fast selector for eligible
xai/* rows only in API-key mode;
- inject/forward
service_tier: "priority" when Fast is selected and remove it when Fast is explicitly disabled;
- keep the Grok OAuth/CLI subscription transport unadvertised and uninjected unless that exact endpoint is separately verified;
- preserve explicit user opt-outs and keep catalog/runtime decisions driven by the same capability resolver;
- avoid inferring support merely from a Grok model name or from the shared
openai-chat adapter.
Example usage or interface
Given an xAI API-key configuration:
{
"defaultProvider": "xai",
"providers": {
"xai": {
"adapter": "openai-chat",
"baseUrl": "https://api.x.ai/v1",
"authMode": "key"
}
},
"fastMode": true
}
the routed catalog entry for xai/grok-4.6 should advertise the priority/Fast tier and the effective Chat Completions body should contain:
{
"model": "grok-4.6",
"service_tier": "priority"
}
With authMode: "oauth", the same preset should not advertise Fast and should not send service_tier until the CLI subscription endpoint has its own evidence.
Alternatives or workarounds
Users on current dev can manually declare modelSupportsServiceTier or chatServiceTier, but those settings are not automatically constrained to API-key mode. They can survive an auth-mode switch and cause the unverified OAuth transport to receive the field.
A separate custom API-key provider can also opt in manually, but that duplicates the canonical xAI preset and loses the intended built-in provider experience.
Additional context
Checks
Area
Provider adapters
What are you trying to accomplish?
Use Codex Fast mode with Grok models routed through the built-in
xaiprovider when that provider is using an xAI API key. xAI documents Priority Processing for text inference by sendingservice_tier: "priority"on both Chat Completions and Responses requests.The expected workflow is that selecting Fast in Codex, or enabling the existing OpenCodex Fast setting, makes an xAI API-key request use xAI Priority Processing while Standard leaves the field absent/default.
What prevents this today?
OpenCodex now has provider/model-scoped service-tier capability resolution, catalog publication, and Chat serialization, but the built-in
xairegistry entry declares neitherchatServiceTiernormodelSupportsServiceTier. Consequentlyxai/*catalog rows do not advertise Fast and the runtime does not inject or forward the priority tier.The preset also multiplexes two transports under one provider id:
https://api.x.ai/v1, where Priority Processing is officially documented.https://cli-chat-proxy.grok.com/v1, where the same capability is not established by the public API documentation.A provider-wide unconditional opt-in would therefore overstate the unverified OAuth transport.
What should OpenCodex do?
OpenCodex should make service-tier capability sensitive to the effective xAI authentication transport:
service_tiersupport for the canonical xAI API-key transport;xai/*rows only in API-key mode;service_tier: "priority"when Fast is selected and remove it when Fast is explicitly disabled;openai-chatadapter.Example usage or interface
Given an xAI API-key configuration:
{ "defaultProvider": "xai", "providers": { "xai": { "adapter": "openai-chat", "baseUrl": "https://api.x.ai/v1", "authMode": "key" } }, "fastMode": true }the routed catalog entry for
xai/grok-4.6should advertise thepriority/Fast tier and the effective Chat Completions body should contain:{ "model": "grok-4.6", "service_tier": "priority" }With
authMode: "oauth", the same preset should not advertise Fast and should not sendservice_tieruntil the CLI subscription endpoint has its own evidence.Alternatives or workarounds
Users on current
devcan manually declaremodelSupportsServiceTierorchatServiceTier, but those settings are not automatically constrained to API-key mode. They can survive an auth-mode switch and cause the unverified OAuth transport to receive the field.A separate custom API-key provider can also opt in manually, but that duplicates the canonical xAI preset and loses the intended built-in provider experience.
Additional context
xai/*; this proposal restores it only where the final transport is verified.Checks