Python: Fix AzureAIClient dropping agent instructions (Responses API)#3636
Merged
moonbox3 merged 1 commit intomicrosoft:mainfrom Feb 3, 2026
Merged
Python: Fix AzureAIClient dropping agent instructions (Responses API)#3636moonbox3 merged 1 commit intomicrosoft:mainfrom
moonbox3 merged 1 commit intomicrosoft:mainfrom
Conversation
Member
markwallace-microsoft
approved these changes
Feb 3, 2026
eavanvalkenburg
approved these changes
Feb 3, 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
The fix in #3563 (commit 184ee9d) addressed instructions being dropped in
AzureAIAgentClient(Chat API), but the same bug existed inAzureAIClient(Responses API).In
_get_agent_reference_or_create(), the code was readinginstructionsfromrun_options:But the base class excludes instructions from run_options, so it should be read from chat_options instead (same pattern used for response_format on lines 351-352).
The fix: changed
_client.pyto read instructions from chat_options:for instructions in [messages_instructions, chat_options.get("instructions") if chat_options else None]Description
Contribution Checklist