We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e610717 commit d18b3c9Copy full SHA for d18b3c9
src/core/task/Task.ts
@@ -1623,7 +1623,10 @@ export class Task extends EventEmitter<ClineEvents> {
1623
? this.apiConfiguration.modelMaxTokens || DEFAULT_THINKING_MODEL_MAX_TOKENS
1624
: modelInfo.maxTokens
1625
1626
- const contextWindow = modelInfo.contextWindow
+ const contextWindow =
1627
+ this.apiConfiguration.apiProvider === "gemini" && this.apiConfiguration.modelMaxContextWindow
1628
+ ? this.apiConfiguration.modelMaxContextWindow
1629
+ : modelInfo.contextWindow
1630
1631
const truncateResult = await truncateConversationIfNeeded({
1632
messages: this.apiConversationHistory,
0 commit comments