Update Microsoft.Extensions.AI packages, use content env var#11670
Merged
Update Microsoft.Extensions.AI packages, use content env var#11670
Conversation
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Microsoft.Extensions.AI to 9.9.1
Update Microsoft.Extensions.AI to 9.9.1 and related packages
Sep 26, 2025
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11670Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11670" |
JamesNK
reviewed
Sep 26, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
Updates Microsoft.Extensions.AI packages from version 9.9.0 to 9.9.1 and associated preview packages, along with OpenAI dependency from 2.4.0 to 2.5.0. Additionally introduces environment variable support for configuring sensitive telemetry data capture through the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT environment variable.
- Package version updates for Microsoft.Extensions.AI ecosystem
- New shared telemetry helper class for environment variable configuration
- Updated default behavior for sensitive telemetry data collection
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Components/Common/AITelemetryHelpers.cs | New helper class providing environment variable-based configuration for sensitive data telemetry |
| src/Components/Aspire.Azure.AI.OpenAI/AzureOpenAISettings.cs | Updated to use environment variable default for EnableSensitiveTelemetryData property |
| src/Components/Aspire.Azure.AI.OpenAI/Aspire.Azure.AI.OpenAI.csproj | Added reference to shared AITelemetryHelpers.cs |
| src/Components/Aspire.Azure.AI.Inference/ChatCompletionsClientSettings.cs | Updated to use environment variable default for EnableSensitiveTelemetryData property |
| src/Components/Aspire.Azure.AI.Inference/Aspire.Azure.AI.Inference.csproj | Added reference to shared AITelemetryHelpers.cs |
| playground/GitHubModelsEndToEnd/GitHubModelsEndToEnd.WebStory/Program.cs | Removed explicit EnableSensitiveTelemetryData setting, now using environment variable default |
| eng/Versions.props | Updated Microsoft.Extensions.AI package versions |
| Directory.Packages.props | Updated OpenAI package version from 2.4.0 to 2.5.0 |
eerhardt
approved these changes
Sep 26, 2025
Member
|
/backport to release/9.5 |
Contributor
|
Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18114900244 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Updates Microsoft.Extensions.AI packages to their latest versions as requested in issue #5249.
Changes
9.9.0→9.9.19.9.0-preview.1.25458.4→9.9.1-preview.1.25474.69.9.0-preview.1.25458.4→9.9.1-preview.1.25474.62.4.0→2.5.0(required dependency update)The OpenAI package was updated from 2.4.0 to 2.5.0 because the new Microsoft.Extensions.AI.OpenAI version requires OpenAI >= 2.5.0.
Testing
All AI-related component tests continue to pass:
The full solution builds successfully with the updated package versions.
Fixes #5249
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.openai.com/home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Aspire.OpenAI.Tests --internal-msbuild-node /home/REDACTED/.local/share/661286eb465842c797e5edf49bbfd5ce/.p --filter-not-trait category=failing --filter-not-trait quarantined=true --filter-not-trait outerloop=true(dns block)/usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Aspire.OpenAI.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Aspire.OpenAI.Tests.deps.json /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Microsoft.DotNet.RemoteExecutor.dll Aspire.OpenAI.Tests, Version=42.42.42.42, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Aspire.OpenAI.Tests.ConformanceTests <TracingEnablesTheRightActivitySource_Keyed>b__18_0 /tmp/fvlmr1zs.mxd(dns block)/usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Aspire.OpenAI.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Aspire.OpenAI.Tests.deps.json /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Microsoft.DotNet.RemoteExecutor.dll Aspire.OpenAI.Tests, Version=42.42.42.42, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Aspire.OpenAI.Tests.ConformanceTests <TracingEnablesTheRightActivitySource>b__17_0 /tmp/0l4ixw0s.efn(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.