Skip to content

Commit ca758de

Browse files
committed
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.
1 parent a2c1069 commit ca758de

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/core/task/Task.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3338,12 +3338,10 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
33383338
const { profileThresholds = {} } = state ?? {}
33393339

33403340
const { contextTokens } = this.getTokenUsage()
3341-
// Get the actual model info from the API handler which includes 1M context updates
3342-
const actualModel = this.api.getModel()
3343-
const modelInfo = actualModel.info
3341+
const modelInfo = this.api.getModel().info
33443342

33453343
const maxTokens = getModelMaxOutputTokens({
3346-
modelId: actualModel.id,
3344+
modelId: this.api.getModel().id,
33473345
model: modelInfo,
33483346
settings: this.apiConfiguration,
33493347
})
@@ -3485,12 +3483,10 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
34853483
const { contextTokens } = this.getTokenUsage()
34863484

34873485
if (contextTokens) {
3488-
// Get the actual model info from the API handler which includes 1M context updates
3489-
const actualModel = this.api.getModel()
3490-
const modelInfo = actualModel.info
3486+
const modelInfo = this.api.getModel().info
34913487

34923488
const maxTokens = getModelMaxOutputTokens({
3493-
modelId: actualModel.id,
3489+
modelId: this.api.getModel().id,
34943490
model: modelInfo,
34953491
settings: this.apiConfiguration,
34963492
})

0 commit comments

Comments
 (0)