From 7db51fd3f09d91e1db8634958f40371dc3c4403f Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 21 Nov 2025 20:13:04 +0530 Subject: [PATCH 01/10] add grok 4 for chat role --- docs/customize/model-roles/chat.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/customize/model-roles/chat.mdx b/docs/customize/model-roles/chat.mdx index ee175829fc1..cf0ebda88ff 100644 --- a/docs/customize/model-roles/chat.mdx +++ b/docs/customize/model-roles/chat.mdx @@ -95,20 +95,20 @@ If you prefer to use a model from [OpenAI](../model-providers/top-level/openai), -### Grok-2 from xAI +### Grok-4 from xAI -If you prefer to use a model from [xAI](../model-providers/more/xAI), then we recommend Grok-2. +If you prefer to use a model from [xAI](../model-providers/more/xAI), then we recommend Grok-4. - Add the [xAI Grok-2 block](https://hub.continue.dev/xai/grok-2) from the hub + Add the [xAI Grok-4 block](https://hub.continue.dev/xai/grok-4) from the hub ```yaml title="config.yaml" models: - - name: Grok-2 + - name: Grok-4 provider: xAI - model: grok-2-latest + model: grok-4 apiKey: ``` From fd1883fe0395f162986dcf1ca58f1122479378cb Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 21 Nov 2025 20:19:30 +0530 Subject: [PATCH 02/10] support for xai grok 4.1 fast --- packages/llm-info/src/providers/cometapi.ts | 13 +++++++++++-- packages/llm-info/src/providers/xAI.ts | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/packages/llm-info/src/providers/cometapi.ts b/packages/llm-info/src/providers/cometapi.ts index 441f5bd75b8..2cc62dc9651 100644 --- a/packages/llm-info/src/providers/cometapi.ts +++ b/packages/llm-info/src/providers/cometapi.ts @@ -173,13 +173,22 @@ export const CometAPI: ModelProvider = { }, // Grok Series + { + model: "grok-4-1-fast-reasoning", + displayName: "Grok 4.1 Fast Reasoning", + contextLength: 256000, + maxCompletionTokens: 4096, + description: + "Latest Grok model with faster and improved reasoning and conversational abilities.", + recommendedFor: ["chat"], + }, { model: "grok-4-0709", displayName: "Grok 4 (07-09)", - contextLength: 128000, + contextLength: 256000, maxCompletionTokens: 4096, description: - "Latest Grok model with improved reasoning and conversational abilities.", + "Latest Grok model series with improved reasoning and conversational abilities.", recommendedFor: ["chat"], }, { diff --git a/packages/llm-info/src/providers/xAI.ts b/packages/llm-info/src/providers/xAI.ts index 17ec83fa79c..6ac38d7b1fc 100644 --- a/packages/llm-info/src/providers/xAI.ts +++ b/packages/llm-info/src/providers/xAI.ts @@ -54,6 +54,27 @@ export const xAI: ModelProvider = { recommendedFor: ["chat"], regex: /grok-4/, }, + { + model: "grok-4-1-fast-reasoning", + displayName: "Grok 4.1 Fast Reasoning", + contextLength: 256000, + recommendedFor: ["chat"], + regex: /grok-4-1-fast-reasoning/, + }, + { + model: "grok-4-1-fast-reasoning", + displayName: "Grok 4.1 Fast Non Reasoning", + contextLength: 256000, + recommendedFor: ["chat"], + regex: /grok-4-1-fast-non-reasoning/, + }, + { + model: "grok-4", + displayName: "Grok 4 Fast", + contextLength: 256000, + recommendedFor: ["chat"], + regex: /grok-4/, + }, { model: "grok-code-fast-1", displayName: "Grok Code Fast 1", From 698fa692e2a406e2fa9c98a50c68dac159c3e59d Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 21 Nov 2025 21:29:06 +0530 Subject: [PATCH 03/10] fix duplicate declaration --- packages/llm-info/src/providers/xAI.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/llm-info/src/providers/xAI.ts b/packages/llm-info/src/providers/xAI.ts index 6ac38d7b1fc..9125b90964d 100644 --- a/packages/llm-info/src/providers/xAI.ts +++ b/packages/llm-info/src/providers/xAI.ts @@ -62,19 +62,12 @@ export const xAI: ModelProvider = { regex: /grok-4-1-fast-reasoning/, }, { - model: "grok-4-1-fast-reasoning", + model: "grok-4-1-fast-non-reasoning", displayName: "Grok 4.1 Fast Non Reasoning", contextLength: 256000, recommendedFor: ["chat"], regex: /grok-4-1-fast-non-reasoning/, }, - { - model: "grok-4", - displayName: "Grok 4 Fast", - contextLength: 256000, - recommendedFor: ["chat"], - regex: /grok-4/, - }, { model: "grok-code-fast-1", displayName: "Grok Code Fast 1", From caca05c4206f56c24d49255d7d7a91025e658403 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:45:43 +0530 Subject: [PATCH 04/10] skip to grok 4.1 in chat role doc --- docs/customize/model-roles/chat.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/customize/model-roles/chat.mdx b/docs/customize/model-roles/chat.mdx index cf0ebda88ff..ff6cc3b7f1b 100644 --- a/docs/customize/model-roles/chat.mdx +++ b/docs/customize/model-roles/chat.mdx @@ -101,14 +101,14 @@ If you prefer to use a model from [xAI](../model-providers/more/xAI), then we re - Add the [xAI Grok-4 block](https://hub.continue.dev/xai/grok-4) from the hub + Add the [xAI Grok-4.1 block](https://hub.continue.dev/xai/grok-4-1-fast-non-reasoning) from the hub ```yaml title="config.yaml" models: - - name: Grok-4 + - name: Grok-4.1 provider: xAI - model: grok-4 + model: grok-4-1-fast-non-reasoning apiKey: ``` From bde45f9886786d692754fb65d13d01a78e4458f6 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:46:58 +0530 Subject: [PATCH 05/10] change wording in cometapi --- packages/llm-info/src/providers/cometapi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/llm-info/src/providers/cometapi.ts b/packages/llm-info/src/providers/cometapi.ts index 2cc62dc9651..e7b41e75e71 100644 --- a/packages/llm-info/src/providers/cometapi.ts +++ b/packages/llm-info/src/providers/cometapi.ts @@ -188,7 +188,7 @@ export const CometAPI: ModelProvider = { contextLength: 256000, maxCompletionTokens: 4096, description: - "Latest Grok model series with improved reasoning and conversational abilities.", + "Latest Grok model with improved reasoning and conversational abilities.", recommendedFor: ["chat"], }, { From 35751e2499406d4f64a18bbc95dbb7db4cdeb941 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:49:37 +0530 Subject: [PATCH 06/10] add grok 4.1 to add model form --- gui/src/pages/AddNewModel/configs/models.ts | 28 +++++++++++++++++++ .../pages/AddNewModel/configs/providers.ts | 2 ++ 2 files changed, 30 insertions(+) diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index c9e0c049f56..228b8657470 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -1908,6 +1908,34 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["xAI"], isOpenSource: false, }, + grok41FastReasoning: { + title: "Grok 4.1 Fast Reasoning", + description: + "xAI's upgraded reasoning model offering strong performance in complex tasks.", + refUrl: "https://docs.x.ai/docs/models/grok-4-1-fast-reasoning", + params: { + title: "Grok 4.1 Fast Reasoning", + model: "grok-4-1-fast-reasoning", + contextLength: 2_000_000, + }, + icon: "xAI.png", + providerOptions: ["xAI"], + isOpenSource: false, + }, + grok41FastNonReasoning: { + title: "Grok 4.1 Fast Non-Reasoning", + description: + "xAI's upgraded non-reasoning model optimized for speed and efficiency.", + refUrl: "https://docs.x.ai/docs/models/grok-4-1-fast-non-reasoning", + params: { + title: "Grok 4.1 Fast Non-Reasoning", + model: "grok-4-1-fast-non-reasoning", + contextLength: 2_000_000, + }, + icon: "xAI.png", + providerOptions: ["xAI"], + isOpenSource: false, + }, grok4: { title: "Grok 4", description: diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index f988ff80563..cbbbacff2b7 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -624,6 +624,8 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n models.grokCodeFast1, models.grok4FastReasoning, models.grok4FastNonReasoning, + models.grok41FastReasoning, + models.grok41FastNonReasoning, models.grok4, models.grok3, models.grok3Mini, From 862914aa3827b262590d85d5fc189bce8a1620fc Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:54:05 +0530 Subject: [PATCH 07/10] add grok 4.1 to recommended agent model --- core/llm/toolSupport.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index a101779b979..675bca80b1b 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -396,6 +396,7 @@ export function isRecommendedAgentModel(modelName: string): boolean { [/claude/, /sonnet/, /3\.7|3-7|-4/], [/claude/, /opus/, /-4/], [/grok-code/], + [/grok-4-1|grok-4\.1/], [/claude/, /4-5/], ]; for (const combo of recs) { From 0129d85b96f92de6a51e41f852979f9e27137351 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:58:37 +0530 Subject: [PATCH 08/10] add support for grok 4.1 in the cli --- extensions/cli/src/utils/modelCapability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/cli/src/utils/modelCapability.ts b/extensions/cli/src/utils/modelCapability.ts index 1dca2417f82..a827da0ce4d 100644 --- a/extensions/cli/src/utils/modelCapability.ts +++ b/extensions/cli/src/utils/modelCapability.ts @@ -10,7 +10,7 @@ export function isModelCapable( const normalizedName = name.toLowerCase(); const normalizedModel = model ? model.toLowerCase() : ""; - const patterns = [/gemini/, /claude/, /gpt/, /o\d/, /kimi/, /qwen/]; + const patterns = [/gemini/, /claude/, /gpt/, /o\d/, /kimi/, /qwen/, /grok/]; // If either name OR model matches any of the patterns, consider it capable if (patterns.some((pattern) => pattern.test(normalizedName))) { From 5777c887701116ac3a7e5a27de400c136f3e89e1 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 24 Nov 2025 19:01:48 +0530 Subject: [PATCH 09/10] also add to tool support --- core/llm/toolSupport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index 675bca80b1b..daf82b6d448 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -120,7 +120,7 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> = }, xAI: (model) => { const lowerCaseModel = model.toLowerCase(); - return ["grok-3", "grok-4", "grok-code"].some((val) => + return ["grok-3", "grok-4", "grok-4-1", "grok-code"].some((val) => lowerCaseModel.includes(val), ); }, From 79848341b69a92f73dd736529ca52bba7bc66ea6 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 24 Nov 2025 21:46:31 +0530 Subject: [PATCH 10/10] correct regex for grok 4 --- packages/llm-info/src/providers/xAI.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/llm-info/src/providers/xAI.ts b/packages/llm-info/src/providers/xAI.ts index 9125b90964d..d0b7173e486 100644 --- a/packages/llm-info/src/providers/xAI.ts +++ b/packages/llm-info/src/providers/xAI.ts @@ -52,7 +52,7 @@ export const xAI: ModelProvider = { displayName: "Grok 4 Fast", contextLength: 256000, recommendedFor: ["chat"], - regex: /grok-4/, + regex: /^grok-4$/, }, { model: "grok-4-1-fast-reasoning",