Add ModelDefinitions to ModelConfigService (#22302)

This commit is contained in:
kevinjwang1
2026-03-14 14:45:21 -07:00
committed by GitHub
parent 8f2697c2e5
commit 0bf7ea60c5
19 changed files with 904 additions and 56 deletions

View File

@@ -13,6 +13,7 @@ import type {
import { getResponseText } from './partUtils.js';
import { supportsMultimodalFunctionResponse } from '../config/models.js';
import { debugLogger } from './debugLogger.js';
import type { Config } from '../config/config.js';
/**
* Formats tool output for a Gemini FunctionResponse.
@@ -48,6 +49,7 @@ export function convertToFunctionResponse(
callId: string,
llmContent: PartListUnion,
model: string,
config?: Config,
): Part[] {
if (typeof llmContent === 'string') {
return [createFunctionResponsePart(callId, toolName, llmContent)];
@@ -96,7 +98,10 @@ export function convertToFunctionResponse(
},
};
const isMultimodalFRSupported = supportsMultimodalFunctionResponse(model);
const isMultimodalFRSupported = supportsMultimodalFunctionResponse(
model,
config,
);
const siblingParts: Part[] = [...fileDataParts];
if (inlineDataParts.length > 0) {