Skip to content

Conversation

@westey-m
Copy link
Contributor

@westey-m westey-m commented Oct 8, 2025

Motivation and Context

#1226

We don't have extensions to consistently get and create Foundry Agents and Assistants using ChatClientAgentOptions, which means that adding chat message store factories or ai context provider factories is not always possible.

Description

  • Add missing get and create overloads with ChatClientAgentOptions.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings October 8, 2025 14:27
@github-actions github-actions bot changed the title Add support for getting and creating Assistant and Foundry agents with ChatClientAgentOptions .NET: Add support for getting and creating Assistant and Foundry agents with ChatClientAgentOptions Oct 8, 2025
Copy link
Contributor

Copilot AI left a 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 adds support for getting and creating Assistant and Foundry agents using ChatClientAgentOptions, addressing the missing extension methods that prevented consistent use of chat message store factories and AI context provider factories.

  • Add new overloads for GetAIAgent methods that accept ChatClientAgentOptions parameters
  • Add new overloads for CreateAIAgent methods that accept ChatClientAgentOptions parameters
  • Update existing CreateAIAgent methods to properly copy all ChatClientAgentOptions properties

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
dotnet/src/Microsoft.Agents.AI.OpenAI/Extensions/OpenAIAssistantClientExtensions.cs Added GetAIAgent and CreateAIAgent overloads with ChatClientAgentOptions support
dotnet/src/Microsoft.Agents.AI.AzureAI/PersistentAgentsClientExtensions.cs Added GetAIAgent and CreateAIAgent overloads with ChatClientAgentOptions support
dotnet/tests/Microsoft.Agents.AI.OpenAI.UnitTests/Extensions/OpenAIAssistantClientExtensionsTests.cs Added comprehensive unit tests for new GetAIAgent overloads
dotnet/tests/Microsoft.Agents.AI.AzureAI.UnitTests/Extensions/PersistentAgentsClientExtensionsTests.cs Added comprehensive unit tests for new GetAIAgent and CreateAIAgent overloads
dotnet/.vscode/settings.json Updated VS Code settings to enable chat agent functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

…rted yet, or requires a lot of code duplication.
@westey-m westey-m enabled auto-merge October 16, 2025 12:47
@westey-m westey-m added this pull request to the merge queue Oct 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2025
@westey-m westey-m added this pull request to the merge queue Oct 16, 2025
Merged via the queue into microsoft:main with commit 54c3eb7 Oct 16, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants