From a7ac5d9fd356d6d4c90e9fa6b825288c1d9edbe2 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 14 Aug 2026 22:07:10 -0700 Subject: [PATCH] fix(catalog): route main's grok-4.6 through first-party Responses origin/main added grok-4.6 as Chat Completions on paid xai and as an uncurated SuperGrok row. Keep the Responses migration complete by allowlisting the id, seeding xai-oauth, and baking the same 4-tier effort map as grok-4.5. --- packages/catalog/CHANGELOG.md | 1 + packages/catalog/src/identity/family.ts | 8 +++- packages/catalog/src/models.json | 40 ++++++++++++++++--- .../src/provider-models/openai-compat.ts | 1 + packages/catalog/test/identity-family.test.ts | 1 + 5 files changed, 45 insertions(+), 6 deletions(-) diff --git a/packages/catalog/CHANGELOG.md b/packages/catalog/CHANGELOG.md index 71792a843..25cac79f6 100644 --- a/packages/catalog/CHANGELOG.md +++ b/packages/catalog/CHANGELOG.md @@ -20,6 +20,7 @@ - Removed unsupported `xhigh` (and `max`) thinking tiers from first-party Grok 4.5 / 4.3 / 3-mini Responses rows; leftover `xhigh`/`max` requests clamp to `high`. `grok-4.20-multi-agent*` still advertises unmapped `xhigh` (16-agent mode). - Stopped baking `reasoningEffortMap` on first-party xAI catalog rows that omit `reasoning.effort` (`omitReasoningEffort: true`). - Suppressed presence/frequency penalties on every first-party xAI Responses model, including non-reasoning ids such as `grok-2`; xAI's `/v1/responses` marks those fields unsupported. +- Routed `grok-4.6` (added on main) through first-party xAI Responses with the same 4-tier effort allowlist as `grok-4.5`, instead of leaving the paid row on Chat Completions. ## [17.3.4] - 2026-08-14 diff --git a/packages/catalog/src/identity/family.ts b/packages/catalog/src/identity/family.ts index 216293b0b..25b185a00 100644 --- a/packages/catalog/src/identity/family.ts +++ b/packages/catalog/src/identity/family.ts @@ -110,7 +110,13 @@ export const isGrokModelId = memo((modelId: string): boolean => { return /(?:^|[./_-])grok(?:[-.]|$)/i.test(modelId); }); -const GROK_EFFORT_CAPABLE_PREFIXES = ["grok-3-mini", "grok-4.20-multi-agent", "grok-4.3", "grok-4.5"] as const; +const GROK_EFFORT_CAPABLE_PREFIXES = [ + "grok-3-mini", + "grok-4.20-multi-agent", + "grok-4.3", + "grok-4.5", + "grok-4.6", +] as const; /** * Grok SKUs that expose the wire `reasoning.effort` dial. Other Grok reasoners diff --git a/packages/catalog/src/models.json b/packages/catalog/src/models.json index 78597d4d2..e75455e90 100644 --- a/packages/catalog/src/models.json +++ b/packages/catalog/src/models.json @@ -104446,7 +104446,7 @@ "grok-4.6": { "id": "grok-4.6", "name": "Grok 4.6", - "api": "openai-completions", + "api": "openai-responses", "provider": "xai", "baseUrl": "https://api.x.ai/v1", "reasoning": true, @@ -104469,7 +104469,19 @@ "low", "medium", "high" - ] + ], + "effortMap": { + "minimal": "low" + } + }, + "compat": { + "reasoningEffortMap": { + "minimal": "low", + "xhigh": "high", + "max": "high" + }, + "supportsReasoningEffort": true, + "omitReasoningEffort": false } }, "grok-beta": { @@ -104781,13 +104793,31 @@ }, "contextWindow": 500000, "maxTokens": 500000, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high" + ], + "effortMap": { + "minimal": "low" + } + }, "supportsComputerUse": false, "supportsComputerUseConfig": false, "compat": { - "includeEncryptedReasoning": false, - "filterReasoningHistory": true, + "reasoningEffortMap": { + "minimal": "low", + "xhigh": "high", + "max": "high" + }, + "includeEncryptedReasoning": true, + "filterReasoningHistory": false, "supportsImageDetailOriginal": false, - "omitReasoningEffort": true + "omitReasoningEffort": false, + "supportsReasoningEffort": true } }, "grok-build": { diff --git a/packages/catalog/src/provider-models/openai-compat.ts b/packages/catalog/src/provider-models/openai-compat.ts index a5629279e..347811244 100644 --- a/packages/catalog/src/provider-models/openai-compat.ts +++ b/packages/catalog/src/provider-models/openai-compat.ts @@ -1332,6 +1332,7 @@ export const XAI_OAUTH_CURATED_MODELS: readonly XAICuratedModel[] = [ }, { id: "grok-4.3", contextWindow: 1_000_000, name: "Grok 4.3", input: ["text", "image"] }, { id: "grok-4.5", contextWindow: 500_000, name: "Grok 4.5", input: ["text", "image"] }, + { id: "grok-4.6", contextWindow: 500_000, name: "Grok 4.6", input: ["text", "image"] }, // grok-4.20-multi-agent-0309 is text-only per the bundled catalog; omit `input` for the default. { id: "grok-4.20-multi-agent-0309", contextWindow: 2_000_000, name: "Grok 4.20 (Multi-Agent)" }, { diff --git a/packages/catalog/test/identity-family.test.ts b/packages/catalog/test/identity-family.test.ts index c920b04c2..1cfc0d2fe 100644 --- a/packages/catalog/test/identity-family.test.ts +++ b/packages/catalog/test/identity-family.test.ts @@ -340,6 +340,7 @@ describe("isGrokReasoningEffortCapable", () => { expect(isGrokReasoningEffortCapable("grok-4.20-multi-agent")).toBe(true); expect(isGrokReasoningEffortCapable("xai-oauth/grok-4.3")).toBe(true); expect(isGrokReasoningEffortCapable("xai-oauth/grok-4.5")).toBe(true); + expect(isGrokReasoningEffortCapable("xai-oauth/grok-4.6")).toBe(true); expect(isGrokReasoningEffortCapable("openrouter/xai/grok-3-mini")).toBe(true); });