refactor(core): Require model for utility calls (#7566)

This commit is contained in:
Abhi
2025-09-01 20:28:54 -04:00
committed by GitHub
parent 4fd1113905
commit 5bac855697
4 changed files with 34 additions and 19 deletions
+3 -1
View File
@@ -18,7 +18,7 @@ import {
import { ToolErrorType } from './tool-error.js';
import { getErrorMessage } from '../utils/errors.js';
import type { Config } from '../config/config.js';
import { ApprovalMode } from '../config/config.js';
import { ApprovalMode, DEFAULT_GEMINI_FLASH_MODEL } from '../config/config.js';
import { getResponseText } from '../utils/partUtils.js';
import { fetchWithTimeout, isPrivateIp } from '../utils/fetch.js';
import { convert } from 'html-to-text';
@@ -116,6 +116,7 @@ ${textContent}
[{ role: 'user', parts: [{ text: fallbackPrompt }] }],
{},
signal,
DEFAULT_GEMINI_FLASH_MODEL,
);
const resultText = getResponseText(result) || '';
return {
@@ -193,6 +194,7 @@ ${textContent}
[{ role: 'user', parts: [{ text: userPrompt }] }],
{ tools: [{ urlContext: {} }] },
signal, // Pass signal
DEFAULT_GEMINI_FLASH_MODEL,
);
console.debug(