From ca758def1e32771e7725baeb52aaa98c9e2e7fdf Mon Sep 17 00:00:00 2001 From: Roo Code Date: Thu, 4 Dec 2025 21:04:40 +0000 Subject: [PATCH] revert: remove no-op changes that did not fix the issue The previous changes were functionally equivalent to the original code. The api.getModel().info already returns the correct 1M context window when awsBedrock1MContext is enabled (see bedrock.ts lines 1074-1081). The issue #9831 requires further investigation to find the actual root cause. --- src/core/task/Task.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 23651498e1..493263b9d4 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -3338,12 +3338,10 @@ export class Task extends EventEmitter implements TaskLike { const { profileThresholds = {} } = state ?? {} const { contextTokens } = this.getTokenUsage() - // Get the actual model info from the API handler which includes 1M context updates - const actualModel = this.api.getModel() - const modelInfo = actualModel.info + const modelInfo = this.api.getModel().info const maxTokens = getModelMaxOutputTokens({ - modelId: actualModel.id, + modelId: this.api.getModel().id, model: modelInfo, settings: this.apiConfiguration, }) @@ -3485,12 +3483,10 @@ export class Task extends EventEmitter implements TaskLike { const { contextTokens } = this.getTokenUsage() if (contextTokens) { - // Get the actual model info from the API handler which includes 1M context updates - const actualModel = this.api.getModel() - const modelInfo = actualModel.info + const modelInfo = this.api.getModel().info const maxTokens = getModelMaxOutputTokens({ - modelId: actualModel.id, + modelId: this.api.getModel().id, model: modelInfo, settings: this.apiConfiguration, })