@devries-cameron20 / t3code Mirror · read-only / commits / 5f89a05610
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 23:15 UTC

fix(models): Claude Haiku 4.5 shows thinking on by default (#14445)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Cameron committed Oct 20, 2026 at 05:12 UTC 5f89a05610eb6662dbd10df93d01525e634370db
4 files changed +25 -16
apps/server/src/provider/ClaudeModelCatalog.testFixtures.ts
+3 -1
@@ -71,7 +71,9 @@ export const SYNTHETIC_CLAUDE_MODEL_CATALOG: ClaudeModelCatalog = {
71 name: "Claude Synthetic Thinking",
72 isCustom: false,
73 capabilities: {
74 - optionDescriptors: [{ id: "thinking", label: "Thinking", type: "boolean" }],
74 + optionDescriptors: [
75 + { id: "thinking", label: "Thinking", type: "boolean", currentValue: true },
76 + ],
77 },
78 },
79 runtime: {},
apps/server/src/provider/model-manifest.json
+3 -2
@@ -1,6 +1,6 @@
1 {
2 "version": 1,
3 - "updatedAt": "2026-10-09T23:31:10Z",
3 + "updatedAt": "2026-10-19T07:21:38Z",
4 "compatibility": [
5 {
6 "driver": "codex",
@@ -653,7 +653,8 @@
653 {
654 "id": "thinking",
655 "label": "Thinking",
656 - "type": "boolean"
656 + "type": "boolean",
657 + "currentValue": true
658 }
659 ]
660 },
apps/server/src/textGeneration/ClaudeTextGeneration.test.ts
+14 -12
@@ -224,7 +224,11 @@ it.layer(layerClaudeTextGenerationTest)("ClaudeTextGeneration", (it) => {
224 }),
225 );
226
227 - it.effect("forwards Claude thinking settings without passing unsupported effort", () =>
227 + it.effect.each([
228 + { thinking: true, settings: '{"disableAllHooks":true,"alwaysThinkingEnabled":true}' },
229 + { thinking: false, settings: '{"disableAllHooks":true,"alwaysThinkingEnabled":false}' },
230 + { thinking: undefined, settings: '{"disableAllHooks":true}' },
231 + ])("forwards only the explicit thinking choice ($thinking)", ({ thinking, settings }) =>
232 withFakeClaudeEnv(
233 {
234 output: JSON.stringify({
@@ -233,7 +237,7 @@ it.layer(layerClaudeTextGenerationTest)("ClaudeTextGeneration", (it) => {
237 body: "",
238 },
239 }),
236 - argsMustContain: '--settings {"disableAllHooks":true,"alwaysThinkingEnabled":false}',
240 + argsMustContain: `--settings ${settings}`,
241 argsMustNotContain: "--effort",
242 },
243 (textGeneration) =>
@@ -243,16 +247,14 @@ it.layer(layerClaudeTextGenerationTest)("ClaudeTextGeneration", (it) => {
247 branch: "feature/claude-effect",
248 stagedSummary: "M README.md",
249 stagedPatch: "diff --git a/README.md b/README.md",
246 - modelSelection: {
247 - ...createModelSelection(
248 - ProviderInstanceId.make("claudeAgent"),
249 - SYNTHETIC_CLAUDE_THINKING_MODEL,
250 - [
251 - { id: "thinking", value: false },
252 - { id: "effort", value: "high" },
253 - ],
254 - ),
255 - },
250 + modelSelection: createModelSelection(
251 + ProviderInstanceId.make("claudeAgent"),
252 + SYNTHETIC_CLAUDE_THINKING_MODEL,
253 + [
254 + ...(thinking === undefined ? [] : [{ id: "thinking", value: thinking }]),
255 + { id: "effort", value: "high" },
256 + ],
257 + ),
258 });
259
260 expect(generated.subject).toBe("Add important change");
apps/server/src/textGeneration/ClaudeTextGeneration.ts
+5 -1
@@ -14,6 +14,7 @@ import {
14 toJsonSchemaObject,
15 } from "@t3tools/provider-core/server/textGenerationUtils";
16 import {
17 + getModelSelectionBooleanOptionValue,
18 getModelSelectionStringOptionValue,
19 getProviderOptionDescriptors,
20 } from "@t3tools/shared/model";
@@ -167,8 +168,11 @@ export const makeClaudeTextGeneration = Effect.fn("makeClaudeTextGeneration")(fu
168 const ultracode = isClaudeCatalogUltracodeEffort(resolvedEffort);
169 const thinkingDescriptor = findDescriptor("thinking");
170 const fastModeDescriptor = findDescriptor("fastMode");
171 + // Only a chosen value; otherwise Claude Code's own default applies, as in chat turns.
172 const thinking =
171 - thinkingDescriptor?.type === "boolean" ? thinkingDescriptor.currentValue : undefined;
173 + thinkingDescriptor?.type === "boolean"
174 + ? getModelSelectionBooleanOptionValue(resolvedModelSelection, "thinking")
175 + : undefined;
176 const fastMode =
177 fastModeDescriptor?.type === "boolean" ? fastModeDescriptor.currentValue : undefined;
178 const settings = {