- Notifications
You must be signed in to change notification settings - Fork 842
Add support for new Azure AI Foundry project type for Safety evals #6621
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
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 adds support for Azure AI Foundry's new non-Hub-based project type for Safety evaluations. Azure AI Foundry now supports two project types: Hub-based projects (configured with subscription ID, resource group, and project name) and non-Hub-based projects (configured with an endpoint URL).
- Extends
ContentSafetyServiceConfigurationwith constructor overloads to support both Hub-based and non-Hub-based projects - Updates service communication logic to handle different API versions and authentication scopes for each project type
- Adds integration tests to verify both project types work correctly
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ContentSafetyServiceConfiguration.cs | Added constructor overloads and properties to support endpoint-based project configuration |
| ContentSafetyService.cs | Updated service URL resolution and authentication to handle both project types |
| ContentSafetyChatClient.cs | Modified provider name generation to display appropriate project information |
| SafetyEvaluatorTests.cs | Added test scenarios for both Hub-based and non-Hub-based projects |
| Settings.cs | Added configuration property for Azure AI project endpoint |
| ContentSafetyService.UrlCacheKey.cs | Updated cache key to include endpoint in equality comparison |
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyService.cs Outdated Show resolved Hide resolved
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyService.cs Outdated Show resolved Hide resolved
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyService.cs Outdated Show resolved Hide resolved
50eb234 to 48486f1 Compare src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyServiceConfiguration.cs Show resolved Hide resolved
56fee89 to 408fe32 Compare 408fe32 to 6798c58 Compare
Fixes #6592
Microsoft Reviewers: Open in CodeFlow