Fix AzureAIClient dropping agent instructions (Responses API) (#3636)

This commit is contained in:
Evan Mattson
2026-02-03 14:39:44 +00:00
committed by GitHub
parent 6fdf6111e6
commit 8d939f8ffa
2 changed files with 25 additions and 3 deletions
@@ -352,9 +352,10 @@ class AzureAIClient(OpenAIBaseResponsesClient[TAzureAIClientOptions], Generic[TA
args["text"] = PromptAgentDefinitionText(format=create_text_format_config(response_format))
# Combine instructions from messages and options
# instructions is accessed from chat_options since the base class excludes it from run_options
combined_instructions = [
instructions
for instructions in [messages_instructions, run_options.get("instructions")]
for instructions in [messages_instructions, chat_options.get("instructions") if chat_options else None]
if instructions
]
if combined_instructions: