Log when flash model decided to continue (#4698)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Sandy Tao
2025-07-22 17:31:57 -07:00
committed by GitHub
parent 30c68922a3
commit 67008d4643
4 changed files with 40 additions and 1 deletions
+5
View File
@@ -43,6 +43,8 @@ import { ProxyAgent, setGlobalDispatcher } from 'undici';
import { DEFAULT_GEMINI_FLASH_MODEL } from '../config/models.js';
import { LoopDetectionService } from '../services/loopDetectionService.js';
import { ideContext } from '../services/ideContext.js';
import { ClearcutLogger } from '../telemetry/clearcut-logger/clearcut-logger.js';
import { FlashDecidedToContinueEvent } from '../telemetry/types.js';
function isThinkingSupported(model: string) {
if (model.startsWith('gemini-2.5')) return true;
@@ -386,6 +388,9 @@ export class GeminiClient {
signal,
);
if (nextSpeakerCheck?.next_speaker === 'model') {
ClearcutLogger.getInstance(this.config)?.logFlashDecidedToContinueEvent(
new FlashDecidedToContinueEvent(prompt_id),
);
const nextRequest = [{ text: 'Please continue.' }];
// This recursive call's events will be yielded out, but the final
// turn object will be from the top-level call.