From 8b097f2c3b50b265da20f2b122cf8d789ab6ea6c Mon Sep 17 00:00:00 2001 From: lang-911 Date: Tue, 19 May 2026 02:44:38 -0700 Subject: [PATCH] fix(model-heuristics): register Grok family with reasoningEffort support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Grok model IDs (e.g. `grok-4.3`, `grok-3-mini`) were missing from `HEURISTIC_MODEL_FAMILY_REGISTRY`, so `resolveCompatibleModelSettings` returned an "unknown family" result for them. The `chat.params` hook treats unknown families as "no reasoning support" and deletes `output.options.reasoningEffort` before the request leaves the plugin, so users routing Grok via OpenAI-compatible endpoints never saw their reasoning effort forwarded — even with `forceReasoning: true`. Add a `grok` family entry that includes any model ID containing "grok", exposes `low | medium | high` variants, and sets `reasoningEfforts` so the heuristic surfaces the same capability flag used by the `chat.params` hook. Extend the family table-driven test in `model-settings-compatibility.test.ts` to cover `grok-4.3`. --- src/shared/model-capability-heuristics.ts | 6 ++++++ src/shared/model-settings-compatibility.test.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/src/shared/model-capability-heuristics.ts b/src/shared/model-capability-heuristics.ts index 61d9e5cbc..ec0dbf5ac 100644 --- a/src/shared/model-capability-heuristics.ts +++ b/src/shared/model-capability-heuristics.ts @@ -45,6 +45,12 @@ export const HEURISTIC_MODEL_FAMILY_REGISTRY: ReadonlyArray { hasReasoningEffort: boolean }> = [ { name: "Gemini", modelID: "gemini-3.1-pro", expectedVariants: ["low", "medium", "high"], hasReasoningEffort: false }, + { name: "Grok", modelID: "grok-4.3", expectedVariants: ["low", "medium", "high"], hasReasoningEffort: true }, { name: "Kimi (kimi)", modelID: "kimi-k2.5", expectedVariants: ["low", "medium", "high"], hasReasoningEffort: false }, { name: "Kimi (k2)", modelID: "k2-v2", expectedVariants: ["low", "medium", "high"], hasReasoningEffort: false }, { name: "GLM", modelID: "glm-5", expectedVariants: ["low", "medium", "high"], hasReasoningEffort: false },