Fix tool output fragmentation by encapsulating content in functionResponse (#13082)

This commit is contained in:
Abhi
2025-12-15 15:36:34 -05:00
committed by GitHub
parent 13944b9bb1
commit d236df5b21
8 changed files with 276 additions and 83 deletions
+12 -1
View File
@@ -99,8 +99,19 @@ export function getEffectiveModel(
* Checks if the model is a Gemini 2.x model.
*
* @param model The model name to check.
* @returns True if the model is a Gemini 2.x model.
* @returns True if the model is a Gemini-2.x model.
*/
export function isGemini2Model(model: string): boolean {
return /^gemini-2(\.|$)/.test(model);
}
/**
* Checks if the model supports multimodal function responses (multimodal data nested within function response).
* This is supported in Gemini 3.
*
* @param model The model name to check.
* @returns True if the model supports multimodal function responses.
*/
export function supportsMultimodalFunctionResponse(model: string): boolean {
return model.startsWith('gemini-3-');
}