From eda83fe67fd8a51ad5003d037cb2a4b2ff791ae0 Mon Sep 17 00:00:00 2001 From: "q33566 (Kurt)" Date: Thu, 20 Nov 2025 21:37:11 +0800 Subject: [PATCH 1/2] fix: Remove await from synchronous get_openai_client call in AzureAIClient The method in is synchronous. Awaiting it caused a TypeError. --- python/packages/azure-ai/agent_framework_azure_ai/_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_client.py b/python/packages/azure-ai/agent_framework_azure_ai/_client.py index 2fa54ea565..191c7a3870 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_client.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_client.py @@ -311,7 +311,7 @@ async def prepare_options( async def initialize_client(self) -> None: """Initialize OpenAI client asynchronously.""" - self.client = await self.project_client.get_openai_client() # type: ignore + 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. From 21e39a0f13628835013d0ef5375ed0301729774b Mon Sep 17 00:00:00 2001 From: "q33566 (Kurt)" Date: Thu, 20 Nov 2025 22:29:56 +0800 Subject: [PATCH 2/2] fix: require minimum azure-ai-projects version for sync get_openai_client() --- python/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/python/pyproject.toml b/python/pyproject.toml index cbe69d4634..6225d689bc 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ ] dependencies = [ "agent-framework-core[all]", + "azure-ai-projects>=2.0.0b2", ] [dependency-groups]