Python: Fix for Azure AI client#2358
Merged
dmytrostruk merged 2 commits intomicrosoft:mainfrom Nov 20, 2025
Merged
Conversation
Member
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues #2338 and #2294 by updating the Azure AI client to work with version 2.0.0b2 of the azure-ai-projects package, where the get_openai_client() method changed from asynchronous to synchronous.
Key Changes:
- Updated
azure-ai-projectsdependency from version 2.0.0b1 to 2.0.0b2 - Removed
awaitkeyword fromget_openai_client()call to match the new synchronous API - Updated test mock from
AsyncMocktoMagicMockto reflect the synchronous behavior
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/packages/azure-ai/pyproject.toml | Bumps azure-ai-projects dependency to version 2.0.0b2 |
| python/packages/azure-ai/agent_framework_azure_ai/_client.py | Removes await from get_openai_client() call in initialize_client method |
| python/packages/azure-ai/tests/test_azure_ai_client.py | Updates mock from AsyncMock to MagicMock to match synchronous API behavior |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4 tasks
eavanvalkenburg
approved these changes
Nov 20, 2025
TaoChenOSU
approved these changes
Nov 20, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
* Fix for Azure AI client * Update python/packages/azure-ai/agent_framework_azure_ai/_client.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Resolves: #2338
Resolves: #2294
Contribution Checklist