Python: Fix for Azure AI client (#2358)

* 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 commit is contained in:
Dmytro Struk
2025-11-20 12:46:28 -08:00
committed by GitHub
Unverified
parent ce738cc6bc
commit b575b631c8
4 changed files with 3450 additions and 3466 deletions
@@ -310,8 +310,8 @@ class AzureAIClient(OpenAIBaseResponsesClient):
return run_options
async def initialize_client(self) -> None:
"""Initialize OpenAI client asynchronously."""
self.client = await self.project_client.get_openai_client() # type: ignore
"""Initialize OpenAI client."""
self.client = self.project_client.get_openai_client() # type: ignore
def _update_agent_name(self, agent_name: str | None) -> None:
"""Update the agent name in the chat client.
+1 -1
View File
@@ -24,7 +24,7 @@ classifiers = [
]
dependencies = [
"agent-framework-core",
"azure-ai-projects >= 2.0.0b1",
"azure-ai-projects >= 2.0.0b2",
"azure-ai-agents == 1.2.0b5",
"aiohttp",
]
@@ -268,7 +268,7 @@ async def test_azure_ai_client_initialize_client(mock_project_client: MagicMock)
client = create_test_azure_ai_client(mock_project_client)
mock_openai_client = MagicMock()
mock_project_client.get_openai_client = AsyncMock(return_value=mock_openai_client)
mock_project_client.get_openai_client = MagicMock(return_value=mock_openai_client)
await client.initialize_client()
+3446 -3462
View File
File diff suppressed because it is too large Load Diff