Skip to content

Commit 112fed5

Browse files
committed
Cap Thinking Budget to prevent runaway thought loops (#12416)
1 parent 37092c5 commit 112fed5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/cli/src/config/settingsSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ const SETTINGS_SCHEMA = {
11371137
label: 'Thinking Budget',
11381138
category: 'Experimental',
11391139
requiresRestart: true,
1140-
default: -1,
1140+
default: 8192,
11411141
description:
11421142
'The thinking budget for the Codebase Investigator agent.',
11431143
showInDialog: false,

packages/core/src/config/models.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export const DEFAULT_GEMINI_MODEL_AUTO = 'auto';
1212

1313
export const DEFAULT_GEMINI_EMBEDDING_MODEL = 'gemini-embedding-001';
1414

15-
// Some thinking models do not default to dynamic thinking which is done by a value of -1
16-
export const DEFAULT_THINKING_MODE = -1;
15+
// Cap the thinking at 8192 to prevent run-away thinking loops.
16+
export const DEFAULT_THINKING_MODE = 8192;
1717

1818
/**
1919
* Determines the effective model to use, applying fallback logic if necessary.

0 commit comments

Comments
 (0)