From 0dbf2b76fe7919d5fe4184523898507b4ae19ee0 Mon Sep 17 00:00:00 2001 From: Milosz Jankiewicz <25470423+Jaaneek@users.noreply.github.com> Date: Fri, 4 Sep 2026 10:18:26 +0200 Subject: [PATCH] fix(ai): remove Grok Build 0.1 from built-in xAI model catalog (#9093) Add grok-build-0.1 to XAI_BUILTIN_EXCLUDED_MODEL_IDS so the generated xAI catalog only lists grok-4.3, grok-4.5 and grok-4.6. Update the exclusion test and drop the thinking-level assertion for the removed model. Co-authored-by: Jaaneek --- packages/ai/scripts/generate-models.ts | 5 +++-- packages/ai/test/xai-responses.test.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/ai/scripts/generate-models.ts b/packages/ai/scripts/generate-models.ts index 2b4658337..8e019e39b 100644 --- a/packages/ai/scripts/generate-models.ts +++ b/packages/ai/scripts/generate-models.ts @@ -419,6 +419,7 @@ const XAI_BUILTIN_EXCLUDED_MODEL_IDS = new Set([ "grok-3-fast", "grok-4.20-0309-non-reasoning", "grok-4.20-0309-reasoning", + "grok-build-0.1", "grok-code-fast-1", ]); const XAI_RESPONSES_COMPAT: OpenAIResponsesCompat = { @@ -876,8 +877,8 @@ function applyThinkingLevelMetadata(model: Model): void { ) { mergeThinkingLevelMap(model, { off: "none" }); } - // xAI models without verified effort options (e.g. grok-build-0.1) must not - // send the undocumented "none"/"minimal" efforts. + // xAI models without verified effort options must not send the undocumented + // "none"/"minimal" efforts. if (model.provider === "xai" && model.api === "openai-responses" && model.thinkingLevelMap === undefined) { mergeThinkingLevelMap(model, { off: null, minimal: null }); } diff --git a/packages/ai/test/xai-responses.test.ts b/packages/ai/test/xai-responses.test.ts index 601b5359d..80937eb65 100644 --- a/packages/ai/test/xai-responses.test.ts +++ b/packages/ai/test/xai-responses.test.ts @@ -118,6 +118,7 @@ describe("xAI Responses provider", () => { "grok-3-fast", "grok-4.20-0309-non-reasoning", "grok-4.20-0309-reasoning", + "grok-build-0.1", "grok-code-fast-1", ]) { expect(Object.keys(XAI_MODELS)).not.toContain(modelId); @@ -131,7 +132,6 @@ describe("xAI Responses provider", () => { expect(getSupportedThinkingLevels(XAI_MODELS["grok-4.5"])).toEqual(["low", "medium", "high"]); expect(getSupportedThinkingLevels(XAI_MODELS["grok-4.6"])).toEqual(["low", "medium", "high", "xhigh"]); expect(getSupportedThinkingLevels(XAI_MODELS["grok-4.3"])).toEqual(["off", "low", "medium", "high"]); - expect(getSupportedThinkingLevels(XAI_MODELS["grok-build-0.1"])).toEqual(["low", "medium", "high"]); }); it("uses /responses with bearer auth and xAI-compatible request fields", async () => {