Skip to content

[Python][azure-ai-agentserver-agentframework==1.0.0b7] ServiceInitializationError: Azure credential is required when project_client is not provided #44614

@swatDong

Description

@swatDong
  • Package Name: azure-ai-agentserver-agentframework
  • Package Version: 1.0.0b7
  • Operating System: Windows
  • Python Version: 3.14.2

Describe the bug
When using azure-ai-agentserver-agentframework==1.0.0b7 with agent-framework-azure-ai==1.0.0b260107, it throws error on startup.

Task exception was never retrieved
future: <Task finished name='Task-2' coro=<AgentFrameworkCBAgent.setup_tracing_with_azure_ai_client.<locals>.setup_async() done, defined at <my-workspace>\.venv\Lib\site-packages\azure\ai\agentserver\agentframework\agent_framework.py:190> exception=ServiceInitializationError('Azure credential is required when project_client is not provided.')>
Traceback (most recent call last):
  File "<my-workspace>\.venv\Lib\site-packages\azure\ai\agentserver\agentframework\agent_framework.py", line 191, in setup_async
    async with AzureAIClient(
               ~~~~~~~~~~~~~^
        project_endpoint=project_endpoint, async_credential=self.credentials
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ) as agent_client:
        ^
  File "<my-workspace>\.venv\Lib\site-packages\agent_framework_azure_ai\_client.py", line 140, in __init__
    raise ServiceInitializationError("Azure credential is required when project_client is not provided.")
agent_framework.exceptions.ServiceInitializationError: Azure credential is required when project_client is not provided.

To Reproduce
Steps to reproduce the behavior:

  1. Run agent framework agent as server via await from_agent_framework(agent).run_async()
agent=... # create agent using agent framework `AzureAIClient`
server=from_agent_framework(agent, credentials, ...)
await server.run_async()

Expected behavior
No startup error.

Additional context
It seems azure-ai-agentserver-agentframework is still using AzureAIClient(async_credential, ...), while agent-framework-azure-ai has updated to AzureAIClient(credential, ...).

Any plan or update on new version of azure-ai-agentserver-agentframework?

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI AgentsService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions