Skip to content

Python: Properly handle AzureAI Search results for AzureAIAgent #12654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 8, 2025

Conversation

moonbox3
Copy link
Contributor

@moonbox3 moonbox3 commented Jul 2, 2025

Motivation and Context

After the Azure AI Agent service went to GA, there were some updates in the underlying SDK. When there are azure_ai_search results while running the agent, they no longer show up as attributes related to the tool call. They are present in the dictionary, so our current code is failing when trying to access the attribute. This PR updates how we form the FunctionCallContent or FunctionResultContent for both azure_ai_search streaming and non-streaming.

Description

Update how we form the FunctionCallContent or FunctionResultContent for both azure_ai_search streaming and non-streaming for the AzureAIAgent.

Contribution Checklist

@moonbox3 moonbox3 self-assigned this Jul 2, 2025
@moonbox3 moonbox3 requested a review from a team as a code owner July 2, 2025 00:45
@moonbox3 moonbox3 added the agents label Jul 2, 2025
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Jul 2, 2025
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
agents/azure_ai
   agent_content_generation.py27911060%74–75, 77, 95, 97, 219, 222, 262, 287–288, 296, 304, 307–309, 318–320, 328, 336, 338, 346, 353, 359–361, 363, 365–367, 376–378, 387, 427, 466–467, 469–472, 474–476, 479–480, 482, 492–493, 495, 508–509, 511, 513–519, 529–531, 540, 557–558, 560, 562–569, 578, 587, 601–602, 604, 606–608, 610–614, 624–626, 635–636, 638, 664–671, 677–680, 685, 690–691, 698
TOTAL26431451782% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3639 22 💤 0 ❌ 0 🔥 1m 54s ⏱️

@moonbox3 moonbox3 changed the title Python: Properly handle AzureAI Search results for AzureAIAgent for latest package Python: Properly handle AzureAI Search results for AzureAIAgent Jul 2, 2025
@moonbox3 moonbox3 enabled auto-merge July 7, 2025 23:17
@moonbox3 moonbox3 added this pull request to the merge queue Jul 8, 2025
Merged via the queue into microsoft:main with commit ba031e6 Jul 8, 2025
26 of 27 checks passed
@moonbox3 moonbox3 deleted the azure-ai-agent-search branch July 8, 2025 02:00
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents python Pull requests for the Python Semantic Kernel
Projects
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

Python: Bug: AttributeError in azure_ai_agent when invoking agent with RAG (Azure AI Search) on v1.32.2
4 participants