-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
agentsIssues related to single agentsIssues related to single agentsbugSomething isn't workingSomething isn't workingpython
Description
Description
AzureOpenAIResponsesClient incorrectly handles model_id in constructor kwargs due to walrus operator precedence.
Current code:
if model_id := kwargs.pop("model_id", None) and not deployment_name:
deployment_name = str(model_id)When model_id is provided and deployment_name is not, model_id receives a boolean (True) instead of the model string.
Expected behavior:
model_id="gpt-4o"should set deployment/model id to"gpt-4o".
Code Sample
from agent_framework.azure import AzureOpenAIResponsesClient
c = AzureOpenAIResponsesClient(
model_id="gpt-4o",
endpoint="https://example.openai.azure.com",
api_key="k",
)
print(c.model_id) # observed: TrueError Messages / Stack Traces
No exception is raised; behavior is incorrect:
model_id True
Package Versions
- agent-framework-core:
1.0.0rc2 - Source commit tested:
02ba27493(main)
Python Version
Python 3.13.5
Additional Context
Likely location:
packages/core/agent_framework/azure/_responses_client.py(constructor near line 183)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
agentsIssues related to single agentsIssues related to single agentsbugSomething isn't workingSomething isn't workingpython