Python: Update workflow orchestration samples to use AzureOpenAIResponsesClient#4285
Merged
moonbox3 merged 4 commits intomicrosoft:mainfrom Feb 26, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request restores the use of AzureOpenAIResponsesClient across 13 orchestration samples and 1 declarative sample that were previously reverted to use AzureOpenAIChatClient/OpenAIChatClient by PR #4092. The changes align these samples with the recommended client for orchestration patterns that create agents locally without requiring server-side lifecycle management.
Changes:
- Updated all affected samples to use
AzureOpenAIResponsesClientwithproject_endpointanddeployment_nameparameters - Added comprehensive README sections explaining why orchestrations use
AzureOpenAIResponsesClientover the CRUD-styleAzureAIAgentclient - Fixed a private import issue in
magentic_checkpoint.py(changed fromazure.identity._credentialstoazure.identity)
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/03-workflows/orchestrations/sequential_custom_executors.py | Restored AzureOpenAIResponsesClient with project_endpoint initialization |
| python/samples/03-workflows/orchestrations/sequential_agents.py | Restored AzureOpenAIResponsesClient with project_endpoint initialization |
| python/samples/03-workflows/orchestrations/magentic_human_plan_review.py | Restored AzureOpenAIResponsesClient, removed OpenAIChatClient usage |
| python/samples/03-workflows/orchestrations/magentic_checkpoint.py | Restored AzureOpenAIResponsesClient, fixed private import from azure.identity._credentials |
| python/samples/03-workflows/orchestrations/magentic.py | Restored AzureOpenAIResponsesClient, removed OpenAIChatClient and OpenAIResponsesClient usage |
| python/samples/03-workflows/orchestrations/handoff_simple.py | Restored AzureOpenAIResponsesClient with updated type annotations and docstrings |
| python/samples/03-workflows/orchestrations/handoff_autonomous.py | Restored AzureOpenAIResponsesClient with updated type annotations |
| python/samples/03-workflows/orchestrations/group_chat_simple_selector.py | Restored AzureOpenAIResponsesClient with project_endpoint initialization |
| python/samples/03-workflows/orchestrations/group_chat_philosophical_debate.py | Restored AzureOpenAIResponsesClient in helper function |
| python/samples/03-workflows/orchestrations/group_chat_agent_manager.py | Restored AzureOpenAIResponsesClient with project_endpoint initialization |
| python/samples/03-workflows/orchestrations/concurrent_custom_aggregator.py | Restored AzureOpenAIResponsesClient, updated docstring references |
| python/samples/03-workflows/orchestrations/concurrent_custom_agent_executors.py | Restored AzureOpenAIResponsesClient with updated type annotations and docstrings |
| python/samples/03-workflows/orchestrations/concurrent_agents.py | Restored AzureOpenAIResponsesClient, updated code comments |
| python/samples/03-workflows/orchestrations/README.md | Added "Why AzureOpenAIResponsesClient?" section explaining the choice and environment variables |
| python/samples/03-workflows/declarative/function_tools/README.md | Updated code example to use AzureOpenAIResponsesClient |
| python/samples/03-workflows/declarative/agent_to_function_tool/main.py | Restored AzureOpenAIResponsesClient with project_endpoint initialization |
| python/samples/03-workflows/README.md | Added "AzureOpenAIResponsesClient vs AzureAIAgent" section with detailed comparison |
TaoChenOSU
approved these changes
Feb 26, 2026
eavanvalkenburg
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Contribution Checklist