mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix AzureAIAgentClient dropping agent instructions in sequential workflows (#3563)
In _prepare_options(), the 'instructions' key was excluded from run_options but never re-added. This caused instructions passed via as_agent(instructions=...) to be silently dropped, making agents in sequential workflows ignore their configured instructions. Fixes #3507
This commit is contained in:
@@ -948,6 +948,10 @@ class AzureAIAgentClient(BaseChatClient[TAzureAIAgentOptions], Generic[TAzureAIA
|
||||
if additional_messages:
|
||||
run_options["additional_messages"] = additional_messages
|
||||
|
||||
# Add instructions from options (agent's instructions set via as_agent())
|
||||
if options_instructions := options.get("instructions"):
|
||||
instructions.append(options_instructions)
|
||||
|
||||
# Add instruction from existing agent at the beginning
|
||||
if (
|
||||
agent_definition is not None
|
||||
|
||||
Reference in New Issue
Block a user