-
Notifications
You must be signed in to change notification settings - Fork 771
Python: Azure AI client based on new azure-ai-projects package #1910
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
Conversation
* Renaming * Small fixes * Update python/packages/core/agent_framework/openai/_shared.py Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
…IClient (#1959) * Added use_latest_version parameter to AzureAIClient * Added unit tests * Update python/samples/getting_started/agents/azure_ai/azure_ai_use_latest_version.py Co-authored-by: Copilot <[email protected]> * Update python/packages/azure-ai/agent_framework_azure_ai/_client.py Co-authored-by: Evan Mattson <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Evan Mattson <[email protected]>
…reAIClient (#1987) * Small updates * Added support for structured outputs * Added code interpreter example * More examples and fixes * Added more examples and README * Small fix * Addressed PR feedback
* Fixed store parameter handling * Small fix
…gent (#2077) * Updated azure-ai-projects package version * Added an example of hosted MCP with approval required * Updated code interpreter example * Added file search example * Update python/samples/getting_started/agents/azure_ai/azure_ai_with_file_search.py Co-authored-by: Copilot <[email protected]> * Update python/samples/getting_started/agents/azure_ai/azure_ai_with_file_search.py Co-authored-by: Copilot <[email protected]> * Small fix --------- Co-authored-by: Copilot <[email protected]>
This reverts commit b8206a8.
* Small documentation and code fixes * Small fix in documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new Azure AI client implementation (AzureAIClient) based on the azure-ai-projects package version 2.0.0b1. The changes update the framework to support the new Azure AI Projects SDK while maintaining the existing AzureAIAgentClient for backward compatibility.
Key changes:
- New
AzureAIClientclass with agent versioning and conversation management support - Updated OpenAI base classes to support optional async client initialization
- New and updated sample files demonstrating the new client capabilities
- Test coverage for the new client implementation
Reviewed Changes
Copilot reviewed 34 out of 41 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
python/packages/azure-ai/agent_framework_azure_ai/_client.py |
New AzureAIClient implementation with agent creation, versioning, and conversation management |
python/packages/azure-ai/agent_framework_azure_ai/__init__.py |
Export new AzureAIClient class |
python/packages/azure-ai/pyproject.toml |
Updated azure-ai-projects dependency to version 2.0.0b1 |
python/packages/azure-ai/tests/test_azure_ai_client.py |
Comprehensive unit tests for AzureAIClient |
python/packages/core/agent_framework/openai/_shared.py |
Updated OpenAIBase to support optional client/model_id and async initialization |
python/packages/core/agent_framework/openai/_responses_client.py |
Refactored to use async client initialization and improved conversation ID handling |
python/packages/core/agent_framework/openai/_chat_client.py |
Updated to use async client initialization |
python/packages/core/agent_framework/openai/_assistants_client.py |
Updated to use async client initialization |
python/packages/core/agent_framework/_tools.py |
Fixed condition to check conversation_id instead of store flag |
python/packages/core/agent_framework/_clients.py |
Removed redundant warning logs |
python/packages/core/agent_framework/azure/__init__.py |
Added AzureAIClient to exports |
python/packages/core/agent_framework/azure/__init__.pyi |
Added AzureAIClient type stub |
python/samples/getting_started/agents/azure_ai_agent/* |
New sample files demonstrating AzureAIAgentClient usage (legacy client) |
python/samples/getting_started/agents/azure_ai/* |
Updated sample files to use new AzureAIClient |
python/samples/README.md |
Updated sample links (with errors to fix) |
python/packages/core/tests/openai/test_openai_responses_client.py |
Updated test to use async prepare_options method |
Introducing new
AzureAIClientbased onazure-ai-projectsversion2.0.0b1.