diff --git a/packages/core/src/core/geminiChat.ts b/packages/core/src/core/geminiChat.ts index 6bea67dc0e..8f2c4b9267 100644 --- a/packages/core/src/core/geminiChat.ts +++ b/packages/core/src/core/geminiChat.ts @@ -581,10 +581,11 @@ export class GeminiChat { } } - // Track final request parameters for AfterModel hooks if (this.onModelChanged) { this.tools = await this.onModelChanged(modelToUse); } + + // Track final request parameters for AfterModel hooks lastModelToUse = modelToUse; lastConfig = config; lastContentsToUse = contentsToUse;