-
Notifications
You must be signed in to change notification settings - Fork 1k
.Net: ADR ChatClientAgent Options Per-Request merging optionality #3218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
.Net: ADR ChatClientAgent Options Per-Request merging optionality #3218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces an Architecture Decision Record (ADR) proposing solutions to control per-request agent configuration advertisement in ChatClientAgent. The proposal addresses the challenge where some providers (e.g., Azure AI Foundry) require strict server-side configuration authority while maintaining backward compatibility with existing implementations that rely on per-request configuration merging.
Changes:
- Added ADR 0013 proposing three options for controlling per-request configuration advertisement in ChatClientAgent
- Option 1: Boolean property
AllowAdvertiseAgentConfigPerRequestin ChatClientAgentOptions - Option 2: Enum-based policy
AdvertiseAgentConfigPolicyfor granular control - Option 3: Decorator pattern (marked as not recommended due to breaking changes)
docs/decisions/0013-chatclient-agent-optout-per-request-config.md
Outdated
Show resolved
Hide resolved
docs/decisions/0013-chatclient-agent-optout-per-request-config.md
Outdated
Show resolved
Hide resolved
docs/decisions/0013-chatclient-agent-optout-per-request-config.md
Outdated
Show resolved
Hide resolved
docs/decisions/0013-chatclient-agent-optout-per-request-config.md
Outdated
Show resolved
Hide resolved
- Simplify AllowRunOnly implementation (remove unused selective merge method) - Update AllowRunOnly enum description for clarity - Remove unused MergeChatOptionsWithRuntimeParametersOnly method - Fix naming inconsistency in Cons section (AllowRuntimeParametersOnly -> AllowRunOnly) - Add AllowRunOnly Policy Limitation section explaining why it's unsuitable for selective overrides - Clarify that AllowRunOnly completely replaces agent options (not selective merge) - Reference Option 3 (Factory) as the solution for selective runtime parameter overrides - Update Cons section to explain this is a future extension point, not initial scope
Motivation and Context
This PR introduces an ADR addressing per-request agent configuration advertisement control in
ChatClientAgent. It proposes solutions for providers that require strict server-side configuration authority (e.g., Azure AI Foundry agents) while maintaining backward compatibility with existing implementations.Problem Statement
ChatClientAgentcurrently advertises agent configuration (AgentOptions) with each per-request invocation, merging it withAgentRunOptions. While this enables per-request configuration overrides in many scenarios, it creates issues for providers where agent definition is immutable and strictly server-side controlled. Re-advertising configuration per-request violates the principle of server-side authority.