Problem
IChatClient (M.E.AI preview) supports GetResponseAsync<T>() for structured output via JSON schema. ChatCompletionAgent in SK 1.45 doesn't surface this, so developers who want typed responses from a named agent must bypass the agent abstraction entirely.
This creates a choice: use M.E.AI IChatClient directly (typed output, no agent identity) or use SK ChatCompletionAgent (agent identity, no typed output). Symphony and similar orchestration patterns need both.
Proposed API
var pow = await agent.InvokeAsync<ProofOfWork>(prompt);
// where ProofOfWork is a [JSonSerializable] C# record
Cross-provider coverage
- OpenAI:
response_format: json_schema ✅
- Azure OpenAI: same ✅
- Google Gemini:
response_schema ✅
- Anthropic Claude: tool-use workaround ⚠️
Reference
Problem
IChatClient(M.E.AI preview) supportsGetResponseAsync<T>()for structured output via JSON schema.ChatCompletionAgentin SK 1.45 doesn't surface this, so developers who want typed responses from a named agent must bypass the agent abstraction entirely.This creates a choice: use M.E.AI
IChatClientdirectly (typed output, no agent identity) or use SKChatCompletionAgent(agent identity, no typed output). Symphony and similar orchestration patterns need both.Proposed API
Cross-provider coverage
response_format: json_schema✅response_schema✅Reference
IChatClient: https://learn.microsoft.com/en-us/dotnet/ai/ai-extensions-overview