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.
This commit is contained in:
Roo Code 2025-12-04 21:04:40 +00:00
parent a2c10694e3
commit ca758def1e

View file

@ -3338,12 +3338,10 @@ export class Task extends EventEmitter<TaskEvents> 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<TaskEvents> 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,
})