Skip to content

.NET: Passing ChatClientAgent specific run options #521

Closed

Description

@westey-m

Today we have multiple approaches to passing ChatClientAgent specific run options:

  1. RunAsync, which takes AgentRunOptions? options as input, can be passed a ChatClientAgentRunOptions
  2. We have a RunAsync overload in ChatClientAgentExtensions which takes AgentRunOptions? agentRunOptions and ChatOptions? chatOptions as input.
    1. Since ChatClientAgentRunOptions is a subclass of AgentRunOptions, it can in theory be passed to this overload. ChatClientAgentRunOptions contains a ChatOptions inside of it, so it's unclear what would happen if someone passed both ChatClientAgentRunOptions and ChatOptions.

Since the 2nd method has some ambiguity, I propose that we remove it and only keep the original RunAsync method.

Activity

  1. changed the title [-]Passing ChatClientAgent specific run options[/-] [+].NET: Passing ChatClientAgent specific run options[/+] on Aug 28, 2025
  2. rogerbarreto commented on Aug 28, 2025

    @rogerbarreto
    Member

    Alternatively

    1. Change the 2nd to instead of getting AgentRunOptions expect the specialization directly ChatClientAgentRunOptions

    Some extra thoughts.

    How about internalize the ChatClientAgentRunOptions completely, so we avoid adding this ambiguity in the apis and resort to something like: ChatClientAgentRunOptions agentOptions.WithChatOptions(ChatOptions)

  3. moved this from Planned to In Progress in Agent Frameworkon Sep 3, 2025
  4. moved this from In Progress to In Review in Agent Frameworkon Sep 5, 2025
  5. moved this from In Review to Done in Agent Frameworkon Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .Net

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions