From c7b5dcd28fe2b0f2cfa844c7f7c616f4f5657145 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Thu, 20 Nov 2025 11:43:35 -0800 Subject: [PATCH] Change default compress threshold to 0.5 for api key users (#13517) --- docs/get-started/configuration.md | 2 +- packages/cli/src/config/settingsSchema.ts | 2 +- packages/core/src/services/chatCompressionService.ts | 2 +- schemas/settings.schema.json | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/get-started/configuration.md b/docs/get-started/configuration.md index 9565ed2e06..1d09e00548 100644 --- a/docs/get-started/configuration.md +++ b/docs/get-started/configuration.md @@ -304,7 +304,7 @@ their corresponding top-level category object in your `settings.json` file. - **`model.compressionThreshold`** (number): - **Description:** The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3). - - **Default:** `0.7` + - **Default:** `0.5` - **Requires restart:** Yes - **`model.skipNextSpeakerCheck`** (boolean): diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index 260d057203..8bde95604c 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -693,7 +693,7 @@ const SETTINGS_SCHEMA = { label: 'Compression Threshold', category: 'Model', requiresRestart: true, - default: 0.7 as number, + default: 0.5 as number, description: 'The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3).', showInDialog: true, diff --git a/packages/core/src/services/chatCompressionService.ts b/packages/core/src/services/chatCompressionService.ts index b51a2031ac..1c7868f8b3 100644 --- a/packages/core/src/services/chatCompressionService.ts +++ b/packages/core/src/services/chatCompressionService.ts @@ -19,7 +19,7 @@ import { getInitialChatHistory } from '../utils/environmentContext.js'; * Default threshold for compression token count as a fraction of the model's * token limit. If the chat history exceeds this threshold, it will be compressed. */ -export const DEFAULT_COMPRESSION_TOKEN_THRESHOLD = 0.7; +export const DEFAULT_COMPRESSION_TOKEN_THRESHOLD = 0.5; /** * The fraction of the latest chat history to keep. A value of 0.3 diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index 20f2d5d3ff..03ce51a6a6 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -419,8 +419,8 @@ "compressionThreshold": { "title": "Compression Threshold", "description": "The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3).", - "markdownDescription": "The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3).\n\n- Category: `Model`\n- Requires restart: `yes`\n- Default: `0.7`", - "default": 0.7, + "markdownDescription": "The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3).\n\n- Category: `Model`\n- Requires restart: `yes`\n- Default: `0.5`", + "default": 0.5, "type": "number" }, "skipNextSpeakerCheck": {