.Net: ADR ChatClientAgent Options Per-Request merging optionality#3218
Closed
rogerbarreto wants to merge 6 commits intomicrosoft:mainfrom
Closed
.Net: ADR ChatClientAgent Options Per-Request merging optionality#3218rogerbarreto wants to merge 6 commits intomicrosoft:mainfrom
rogerbarreto wants to merge 6 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
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
Member
Author
|
Closing this PR as the conclusion for this ADR was to keep as is, as this change clearly tries to accomodate a behavior that for the moment is exclusive of Azure Foundry Agents, which potentially will be more permissive on per-request configuration override. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.