diff --git a/docs/get-started/configuration.md b/docs/get-started/configuration.md index e2e2621b78..224c6353e2 100644 --- a/docs/get-started/configuration.md +++ b/docs/get-started/configuration.md @@ -548,7 +548,7 @@ their corresponding top-level category object in your `settings.json` file. - **`experimental.codebaseInvestigatorSettings.thinkingBudget`** (number): - **Description:** The thinking budget for the Codebase Investigator agent. - - **Default:** `-1` + - **Default:** `8192` - **Requires restart:** Yes - **`experimental.codebaseInvestigatorSettings.model`** (string): diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index ad71e1728d..bada965a14 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -1253,7 +1253,7 @@ const SETTINGS_SCHEMA = { label: 'Thinking Budget', category: 'Experimental', requiresRestart: true, - default: -1, + default: 8192, description: 'The thinking budget for the Codebase Investigator agent.', showInDialog: false, diff --git a/packages/core/src/config/models.ts b/packages/core/src/config/models.ts index d1f07d60d6..9add9fa736 100644 --- a/packages/core/src/config/models.ts +++ b/packages/core/src/config/models.ts @@ -12,8 +12,8 @@ export const DEFAULT_GEMINI_MODEL_AUTO = 'auto'; export const DEFAULT_GEMINI_EMBEDDING_MODEL = 'gemini-embedding-001'; -// Some thinking models do not default to dynamic thinking which is done by a value of -1 -export const DEFAULT_THINKING_MODE = -1; +// Cap the thinking at 8192 to prevent run-away thinking loops. +export const DEFAULT_THINKING_MODE = 8192; /** * Determines the effective model to use, applying fallback logic if necessary. diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index c3b8844796..47a4d18534 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -832,8 +832,8 @@ "thinkingBudget": { "title": "Thinking Budget", "description": "The thinking budget for the Codebase Investigator agent.", - "markdownDescription": "The thinking budget for the Codebase Investigator agent.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `-1`", - "default": -1, + "markdownDescription": "The thinking budget for the Codebase Investigator agent.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `8192`", + "default": 8192, "type": "number" }, "model": {