From 897ba46fc1d5d3f7cff895ccb0724906d9a17231 Mon Sep 17 00:00:00 2001 From: Tao Chen Date: Wed, 18 Feb 2026 16:53:22 -0800 Subject: [PATCH] Fix workflow samples for bugbash: part 2 --- .../agents/azure_chat_agents_tool_calls_with_feedback.py | 2 ++ .../03-workflows/declarative/customer_support/main.py | 2 ++ .../handoff_with_tool_approval_checkpoint_resume.py | 7 +------ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/python/samples/03-workflows/agents/azure_chat_agents_tool_calls_with_feedback.py b/python/samples/03-workflows/agents/azure_chat_agents_tool_calls_with_feedback.py index 1e37b79f1e..fb50e26491 100644 --- a/python/samples/03-workflows/agents/azure_chat_agents_tool_calls_with_feedback.py +++ b/python/samples/03-workflows/agents/azure_chat_agents_tool_calls_with_feedback.py @@ -174,6 +174,8 @@ def create_writer_agent() -> Agent: """Creates a writer agent with tools.""" return AzureOpenAIResponsesClient( project_endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"], + # This sample has been tested only on `gpt-5.1` and may not work as intended on other models + # This sample is known to fail on `gpt-5-mini` reasoning input (GH issue #4059) deployment_name=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], credential=AzureCliCredential(), ).as_agent( diff --git a/python/samples/03-workflows/declarative/customer_support/main.py b/python/samples/03-workflows/declarative/customer_support/main.py index cbb4eefb9e..8c9940c33c 100644 --- a/python/samples/03-workflows/declarative/customer_support/main.py +++ b/python/samples/03-workflows/declarative/customer_support/main.py @@ -167,6 +167,8 @@ async def main() -> None: # Create Azure OpenAI client client = AzureOpenAIResponsesClient( project_endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"], + # This sample has been tested only on `gpt-5.1` and may not work as intended on other models + # This sample is known to fail on `gpt-5-mini` reasoning input (GH issue #4059) deployment_name=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], credential=AzureCliCredential(), ) diff --git a/python/samples/03-workflows/orchestrations/handoff_with_tool_approval_checkpoint_resume.py b/python/samples/03-workflows/orchestrations/handoff_with_tool_approval_checkpoint_resume.py index 7fb9daef13..31ad62f609 100644 --- a/python/samples/03-workflows/orchestrations/handoff_with_tool_approval_checkpoint_resume.py +++ b/python/samples/03-workflows/orchestrations/handoff_with_tool_approval_checkpoint_resume.py @@ -8,7 +8,6 @@ from agent_framework import ( Agent, - AgentResponseUpdate, Content, FileCheckpointStorage, Workflow, @@ -120,7 +119,6 @@ def print_handoff_agent_user_request(request: HandoffAgentUserRequest, request_i print(f"\n{'=' * 60}") print("User input needed") print(f"Request ID: {request_id}") - print(f"Awaiting agent: {request.agent_response.agent_id}") response = request.agent_response if not response.messages: @@ -207,7 +205,7 @@ async def main() -> None: # This creates a new workflow instance to simulate a fresh process start, # but points it to the same checkpoint storage while request_events: - print("=" * 60) + print("\n" + "=" * 60) print("Simulating process restart...") print("=" * 60) @@ -240,11 +238,8 @@ async def main() -> None: # Iterate through streamed events and collect request_info events request_events: list[WorkflowEvent] = [] async for event in results: - event: WorkflowEvent if event.type == "request_info": request_events.append(event) - elif event.type == "output" and isinstance(event.data, AgentResponseUpdate): - print(event.data.text, end="", flush=True) print("\n" + "=" * 60) print("DEMO COMPLETE")