🤖 feat: add Grok 4.5 priority processing - #3798
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
@codex review Please review the Grok 4.5 model registry, reasoning policy, and xAI Priority Processing request path. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fd9e85e8f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8fd9e85 to
401bdb5
Compare
|
@codex review Updated the stale compaction integration expectation after removing the legacy Grok model. The focused integration test and |
401bdb5 to
7b23429
Compare
|
Addressed Codex finding “Account for priority-tier xAI billing”:
Validated with focused billing tests, the compaction integration test, the full Grok regression set, and @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b23429349
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7b23429 to
08820bd
Compare
|
@codex review Final update: removed the stale model-filter assertion for the retired Grok alias. Exact xAI billing, focused integration coverage, and |
08820bd to
f20a5b6
Compare
|
Addressed Codex finding “Preserve Grok live search when routing to Responses”:
Validated with focused native-tool tests, the full Grok regression set, the compaction integration test, and @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f20a5b6965
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f20a5b6 to
0ef7130
Compare
|
Added a real xAI integration test to the existing IPC integration harness. CI now receives Local live execution reached xAI but the provided key currently returns @codex review |
|
Addressed Codex finding “Route Grok 4.5 aliases to Responses”:
Validated with focused alias tests and @codex review |
0ef7130 to
79b96eb
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79b96eb6a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
The new real Grok 4.5 integration test is wired into CI and is reaching xAI successfully, but xAI returns The key was also shared in chat, so it should be rotated; update the |
|
Addressed the latest Codex findings:
Validated with the focused tests and @codex review |
79b96eb to
9808662
Compare
9808662 to
a16ac55
Compare
|
Addressed the latest Codex findings:
@codex review |
878d75e to
76bce20
Compare
|
Applied the Nix fixed-output hash reported by CI for the updated xAI SDK and Bun patch. Local @codex review |
76bce20 to
f79ec33
Compare
|
Bun patch files are now included in the published package and the lockfile-free CLI validation fixture. The package manifest changed, so CI will calculate one final Nix fixed-output hash update. @codex review |
f79ec33 to
90ab583
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90ab58380f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the latest Codex findings:
Validated with focused hardening tests, @codex review |
90ab583 to
794844e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 794844e633
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed Codex finding “Validate xAI date filters before forwarding”:
Validated with focused tests and @codex review |
794844e to
0e15cd3
Compare
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
--- _Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `high` • Cost: `$152.19`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=high costs=152.19 -->
0e15cd3 to
80a3582
Compare
|
@codex review Rebased onto current |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80a3582370
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // cost metadata (including Priority Processing). Keep older custom model | ||
| // strings on Chat Completions for legacy search_parameters compatibility. | ||
| return Ok( | ||
| isGrok45Model(`xai:${modelId}`) ? provider.responses(modelId) : provider.chat(modelId) |
There was a problem hiding this comment.
Route mapped Grok 4.5 aliases through Responses
Fresh evidence here is that configured mappedToModel aliases still take the Grok 4.5 provider-options branch while this route check stays raw-id based: with providers.xai.models: [{ id: "team-grok", mappedToModel: "xai:grok-4.5" }], buildProviderOptions suppresses legacy searchParameters, but this creates a Chat Completions model and the native-tool registration uses the same raw predicate. Those requests get neither legacy Live Search nor Responses-native web_search/x_search; use the same mapped capability predicate for routing/tools, or keep legacy search for aliases that remain on chat.
Useful? React with 👍 / 👎.
## Summary Honor configured `mappedToModel` aliases that target Grok 4.5, and make Grok 4.5 usage meters/pricing resolve known context limits for family aliases. ## Background #3798 added Grok 4.5 Responses routing and native search tools, but some checks used the raw runtime model id. A provider entry like `{ id: "team-grok", mappedToModel: "xai:grok-4.5" }` still took the Grok 4.5 provider-options path while model creation stayed on Chat Completions, so those requests lost both legacy Live Search and Responses-native `web_search`/`x_search`. Separately, context usage could show "Unknown model limits" for Grok 4.5 when the selected/runtime id used a rolling alias (`-latest`) or mixed case, because stats lookup only hit the exact `xai/grok-4.5` key. ## Implementation - resolve mapped Grok 4.5 capability through `resolveModelForMetadata` before choosing Responses vs Chat Completions - pass the capability model into tool construction and forced first-step search so native xAI tools and prompt allowlists stay aligned - let Fast mode treat mapped Grok aliases as xAI priority-capable on direct routes - harden model-stats lookup for `-latest` and case variants, and publish Grok 4.5 `max_output_tokens` - add regression coverage for mapped alias routing, native tools, Fast mode availability, and context-limit resolution ## Validation - `bun test src/browser/utils/fastModeServiceTier.test.ts src/common/utils/tools/tools.test.ts src/node/services/providerModelFactory.test.ts src/common/utils/tokens/modelStats.test.ts src/common/utils/compaction/contextLimit.test.ts` - `make static-check` ## Risks Low. Behavior only expands known Grok 4.5 metadata resolution and mapped-alias capability inheritance; unmapped legacy Grok strings remain on Chat Completions. --- _Generated with `mux` • Model: `xai:grok-4.5` • Thinking: `high` • Cost: `$159.82`_ <!-- mux-attribution: model=xai:grok-4.5 thinking=high costs=159.82 -->
Summary
Adds Grok 4.5 as the sole curated xAI model and integrates xAI Priority Processing with Mux's shared thinking and Fast mode controls, exact billed-cost tracking, and native web/X search.
Background
xAI exposes
grok-4.5with configurable low/medium/high reasoning effort. Earlier built-in Grok entries were retired on May 15, 2026 and now redirect to newer models, so keeping them in Mux's curated index is misleading. xAI Priority Processing usesservice_tier: "priority"and is billed at 2× standard token rates when granted.Implementation
xai:grok-4.5ThinkingSelector; the configured minimum-thinking floor controls whether Low is shown, and Grok never exposes Off or Pro modeservice_tierrequest field through the provider fetch wrappercostInUsdTicksbilling metadata across multi-step turnsmode: "on"on direct xAI routesValidation
make static-checkRisks
Moderate but localized. Grok 4.5 moves to xAI's Responses implementation and the shared Fast mode UI now resolves provider state from the selected model. Route-aware gates keep provider-native options off gateway paths, and older custom Grok model strings retain the legacy Chat Completions path.
Generated with
mux• Model:openai:gpt-5.6-sol• Thinking:high• Cost:$152.19