Skip to content

Add AI support to the Microsoft.Testing.Platform#6777

Merged
MarcoRossignoli merged 21 commits intomicrosoft:mainfrom
MarcoRossignoli:dev/mr/addai2
Oct 28, 2025
Merged

Add AI support to the Microsoft.Testing.Platform#6777
MarcoRossignoli merged 21 commits intomicrosoft:mainfrom
MarcoRossignoli:dev/mr/addai2

Conversation

@MarcoRossignoli
Copy link
Contributor

Add AI support to the Microsoft.Testing.Platform

Copy link
Member

@nohwnd nohwnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any tests possible for this?

MarcoRossignoli and others added 5 commits October 22, 2025 11:29
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
@MarcoRossignoli
Copy link
Contributor Author

Any tests possible for this?

At the moment nope it's experimental for now...I need to play a bit with the usage to understand, I would not ship the core ai and the extension lib for now, the plumbing is internal and should not affect the normal run if not registered.

We can try to add some real test when complete...but not sure if we will be able to test the AI interaction, but let's see maybe we will do it in some way.

@Youssef1313
Copy link
Member

Should we avoid publishing it publicly for now until we implement something that uses it and we have more confidence of the design? Maybe we should set <IsShipping>false</IsShipping> in the new projects?

@MarcoRossignoli
Copy link
Contributor Author

MarcoRossignoli commented Oct 25, 2025

Should we avoid publishing it publicly for now until we implement something that uses it and we have more confidence of the design? Maybe we should set false in the new projects?

wonder if we can ship it inside not official nuget feed but in the dogfooding testing one so I can pick it up to do some experiment outside the testfx repo.

We can always delist there in case.

@Youssef1313
Copy link
Member

I'm fine publishing to test-tools feed and not nuget.org. But I want to ensure we don't end up publishing to nuget.org accidentally. I think setting IsShipping to false is not going to prevent publishing to test-tools feed as long as the pattern here is adjusted to match NonShipping.

@MarcoRossignoli
Copy link
Contributor Author

I'm fine publishing to test-tools feed and not nuget.org. But I want to ensure we don't end up publishing to nuget.org accidentally. I think setting IsShipping to false is not going to prevent publishing to test-tools feed as long as the pattern here is adjusted to match NonShipping.

Done!

Marco Rossignoli added 4 commits October 26, 2025 10:41
…mplementation

- Make AzureOpenAIChatClientProvider internal
- Add public AddAzureOpenAIChatClientProvider extension method
- Extract IEnvironment service and store in field instead of keeping IServiceProvider
- Remove unnecessary InternalsVisibleTo from Microsoft.Testing.Platform.AI
- Update Playground sample to use new extension method
Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Playground project is now run during tests and so it fails

@MarcoRossignoli MarcoRossignoli marked this pull request as ready for review October 27, 2025 12:17
@MarcoRossignoli MarcoRossignoli enabled auto-merge (squash) October 27, 2025 12:17
MarcoRossignoli and others added 3 commits October 27, 2025 22:49
- Replace string.IsNullOrEmpty with RoslynString.IsNullOrEmpty
- Consolidate resource strings into single parameterized entry
- Update constructor to take IEnvironment directly instead of IServiceProvider
- Add Experimental attribute to IChatClientProvider interface
- Rename SupportsToolCalling to HasToolsCapability
- Rename IChatClientManager methods for clarity:
  - AddChatClientProvider -> SetChatClientProviderFactory
  - RegisterChatClientProvider -> InstantiateChatClientProvider
- Add Polyfill package reference to Microsoft.Testing.Platform.AI
- Update all documentation and xlf files
- Rename SetChatClientProviderFactory to AddChatClientProvider to match other API naming conventions
- Rename InstantiateChatClientProvider to BuildChatClients for better clarity
@MarcoRossignoli MarcoRossignoli merged commit e8d7fb8 into microsoft:main Oct 28, 2025
9 checks passed
@MarcoRossignoli MarcoRossignoli deleted the dev/mr/addai2 branch October 28, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants