-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Labels
Description
Description
when I use AzureAIClient with use_latest_version=True to call a exist foundry agent, sdk always show warning: "AzureAIClient does not support runtime tools or structured_output overrides after agent creation. Use AzureOpenAIResponsesClient instead."
the root cause is when use_latest_version=True, tools_changed is only dependy on runtime_tools is not None, but runtime_tools always not None
Code Sample
async def main() -> None:
async with (
DefaultAzureCredential() as credential,
AIProjectClient(endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"], credential=credential) as project_client,
Agent(
client=AzureAIClient(
project_client=project_client,
agent_name="aiagent",
model_deployment_name="gpt-4.1",
use_latest_version=True,
),
) as agent,
):
# Process user messages
for user_input in USER_INPUTS:
print(f"\n# User: '{user_input}'")
printed_tool_calls = set()
async for chunk in agent.run([user_input], stream=True):
# log tool calls if any
function_calls = [
c for c in chunk.contents
if c.type == "function_call"
]
for call in function_calls:
if call.call_id not in printed_tool_calls:
print(f"Tool calls: {call.name}")
printed_tool_calls.add(call.call_id)
if chunk.text:
print(chunk.text, end="")
print("")Error Messages / Stack Traces
Package Versions
agent-framework:1.0.0rc3
Python Version
Python 3.13.7
Additional Context
No response
Reactions are currently unavailable