Skip to content

.Net: Bug: Google Gemini unable to perform Multiple Function calls in single request #12554

Open
@MustafaJamal

Description

@MustafaJamal

Problem

I am using IChatCompletionService with Google Gemini, but in any request where multiple function calls are going to be performed assistant is not able to do it and ends the stream without any exception. Here are my code snippets:

promptExecutionSettings = new GeminiPromptExecutionSettings()
{
    ToolCallBehavior = GeminiToolCallBehavior.AutoInvokeKernelFunctions,
    Temperature = (reasoningEffort == null || reasoningEffort == string.Empty)
        ? (float?)temperature
        : null,
    ModelId = modelId,
    ResponseMimeType = (convertToJSON == null || convertToJSON == false)
        ? null
        : "application/json",
    ThinkingConfig = new GeminiThinkingConfig()
    {
        ThinkingBudget = -1
    }
};

It works fine if there is one function call to be performed

Platform

  • Language: C# ASP.NET Core 8
  • Source:
    Microsoft.SemanticKernel 1.57.0
    Microsoft.SemanticKernel.Connectors.Google 1.57.0-alpha
    Microsoft.Extensions.AI 9.6.0
  • AI model: Google Gemini: gemini-2.5-pro

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codebugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions