-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
AzureAIClient works perfectly when you build Agents. However, not all classes in Workflow area support it properly. Below are the findings:
Summary
AzureAIClient works with WorkflowBuilder but fails with GroupChatBuilder on the second round.
Error
Error code: 400 - {'error': {'code': 'invalid_payload', 'details': [ {'message': 'required: Required properties ["annotations"] are not present', 'param': '/input/1/content/0'}]}}Root Cause
Azure AI Foundry Responses API requires annotations field in agent messages. When GroupChatBuilder rebuilds conversation history, it somehow omits that field:
Plain Text
// Sent (missing "annotations"): {"role": "assistant", "content": [{"type": "output_text", "text": "..."}]}
// Required: {"role": "assistant", "content": [{"type": "output_text", "text": "...", "annotations": []}]}
First round succeeds (user message only). Second round fails (includes assistant history).
Workaround
Using AzureOpenAIChatClient instead of AzureAIClient for Group Chat workflows.
Suggested Fix
Ensure AzureAIClient adds empty annotations: [] to agent messages when formatting conversation history in Workflows.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status