Skip to content

Python: Bug: 1.34.0 does not answer with function calls in response #12609

Open
@mkemmerz

Description

@mkemmerz

Describe the bug
I am upgrading semantic kernel from 1.28.0 to 1.34.0 for my python application.

In 1.28.0 the SSE response started with the functions that are called, something like that for calling one of my McpSsePlugins / functions:

data: {"id":"chatcmpl-BmyfOr2zYLPZu8lqvuHiLChNQ6sGe","choices":[{"delta":{"content":null,"function_call":null,"tool_calls":[{"index":0,"id":"call_jGxzKJdvtVl0yYqkSv8kLiW2","type":"function","function":{"name":"web_search_plugin-search_web","arguments":""}}],"role":"assistant","refusal":null},"logprobs":null,"finish_reason":null,"index":0}],"created":1751012646,"model":"gpt-4.1-2025-04-14","service_tier":null,"system_fingerprint":"fp_07e970ab25","object":"chat.completion.chunk","usage":null}

I am using a ChatCompletionAgent (BaseAssistant class in my case).

config = AgentConfig(**assistant_config.model_dump(exclude={"temperature"}))
plugins = await self.__load_plugins(agent_config=config)
assistant = BaseAssistant(agent_config=config, azure_openai_async_client=self.azure_openai_async_client, plugins=plugins)
kernel_arguments = KernelArguments(temperature=assistant_config.temperature)
async for content in assistant.invoke_stream(messages=chat_history, kernel_arguments=kernel_arguments):
          yield CreateChatCompletionStreamResponse(**content.inner_content.model_dump())



MCPSsePlugin(
        name="web_search_plugin", 
        description="""
            A plugin that provides web search engine functionality.
            Take a text and search the web for search results and their content.
            """, 
        url=config.websearch_mcp_sse_endpoint_dns)

from my pyproject.toml:

    "azure-ai-projects >= 1.0.0b12",
    "azure-ai-agents >= 1.0.0",
    "semantic-kernel==1.34.0",

In 1.34.0 the function calls are no longer part of the response. They are not sent at all, even though plugins are called.

Has the behavior changed in one of the recent releases? I have seen some adjustments on the intermediate methods: https://github.com/microsoft/semantic-kernel/pull/12000/files

Expected behavior
The function calls are returned in the response with the name of the plugin, function and its arguments.

Screenshots
If applicable, add screenshots to help explain your problem.

Platform

  • Language: Python
  • Source: pip / uv
  • AI model: OpenAI Gpt-4.1
  • IDE: PyCharm
  • OS: Mac

Metadata

Metadata

Assignees

Labels

agentsbugSomething isn't workingpythonPull requests for the Python Semantic Kernel

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions