From de128bc1720f5da336e1767c7f6c512980e994a4 Mon Sep 17 00:00:00 2001 From: Sehoon Shon Date: Wed, 1 Apr 2026 01:26:38 -0400 Subject: [PATCH] fix(core): revert defaultModelConfigs.ts and fix formatting --- packages/core/src/config/defaultModelConfigs.ts | 15 +-------------- packages/core/src/core/geminiChat.ts | 9 +++------ 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/core/src/config/defaultModelConfigs.ts b/packages/core/src/config/defaultModelConfigs.ts index 152078d7b7..84c2478a5f 100644 --- a/packages/core/src/config/defaultModelConfigs.ts +++ b/packages/core/src/config/defaultModelConfigs.ts @@ -66,14 +66,9 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = { }, }, 'gemini-3-flash-preview': { - extends: 'base', + extends: 'chat-base-3', modelConfig: { model: 'gemini-3-flash-preview', - generateContentConfig: { - temperature: 0, - topP: 0.95, - topK: 64, - }, }, }, 'gemini-2.5-pro': { @@ -182,14 +177,6 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = { }, }, }, - 'web-search-internal': { - extends: 'gemini-3-flash-base', - modelConfig: { - generateContentConfig: { - tools: [{ googleSearch: {} }], - }, - }, - }, 'web-fetch': { extends: 'gemini-3-flash-base', modelConfig: { diff --git a/packages/core/src/core/geminiChat.ts b/packages/core/src/core/geminiChat.ts index 73663330e2..f9703bdc5d 100644 --- a/packages/core/src/core/geminiChat.ts +++ b/packages/core/src/core/geminiChat.ts @@ -182,9 +182,7 @@ function extractCuratedHistory(comprehensiveHistory: Content[]): Content[] { } // Text parts must be non-empty strings if (part.text !== undefined) { - return ( - typeof part.text === 'string' && (part.text).trim() !== '' - ); + return typeof part.text === 'string' && part.text.trim() !== ''; } // Keep other parts (functionCall, functionResponse, etc.) return true; @@ -215,8 +213,8 @@ function extractCuratedHistory(comprehensiveHistory: Content[]): Content[] { // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion const lastText = existingTextPart.text as string; const separator = lastText.endsWith('\n') ? '' : '\n'; - - existingTextPart.text = lastText + separator + (part.text); + + existingTextPart.text = lastText + separator + part.text; } else { lastEntryParts.push({ ...part }); } @@ -1119,7 +1117,6 @@ export class GeminiChat { const thoughtPart = content.parts[0]; if (thoughtPart.text) { - const rawText = thoughtPart.text; const subjectStringMatches = rawText.match(/\*\*(.*?)\*\*/s); const subject = subjectStringMatches