Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

Bumps Microsoft.Extensions.AI and Microsoft.Extensions.AI.Abstractions from 10.1.1 to 10.2.0, resolving merge conflicts from Dependabot PR #1162.

Changes

  • Updated MicrosoftExtensionsVersion property in Directory.Packages.props from 10.1.1 to 10.2.0
  • Updated Microsoft.Extensions.AI.OpenAI from 10.1.1-preview.1.25612.2 to 10.2.0-preview.1.26063.2

API Changes in 10.2.0

Adds two properties to UsageDetails for token accounting:

  • CachedInputTokenCount - tokens read from cache
  • ReasoningTokenCount - tokens used for model reasoning

These are additive changes. No code modifications required as the SDK uses UsageDetails indirectly and doesn't reference these properties.

Verification

  • ✅ Build succeeded with 0 warnings and 0 errors
  • ✅ All tests pass (1063 passed, 0 failed)
  • ✅ Compatible with .NET 8.0, 9.0, and 10.0
Original prompt

Summary

Update Microsoft.Extensions.AI and Microsoft.Extensions.AI.Abstractions packages from version 10.1.1 to 10.2.0, resolving any merge conflicts with the current main branch.

Background

Dependabot PR #1162 attempted to bump Microsoft.Extensions.AI to 10.2.0 but has merge conflicts ("dirty" mergeable state). This PR should accomplish the same update while ensuring compatibility with the current main branch.

Changes Required

  1. Update Directory.Packages.props: Change the MicrosoftExtensionsVersion property from 10.1.1 to 10.2.0:

    <MicrosoftExtensionsVersion>10.2.0</MicrosoftExtensionsVersion>
  2. Update test dependency if needed: The Microsoft.Extensions.AI.OpenAI package version may also need updating to a compatible 10.2.0 preview version if available. Currently it's at 10.1.1-preview.1.25612.2.

API Changes in 10.2.0

The 10.2.0 release includes the following notable changes from dotnet/extensions PR #7122:

  • Added UsageDetails.CachedInputTokenCount property - for tokens read from a cache
  • Added UsageDetails.ReasoningTokenCount property - for reasoning/thinking tokens used internally by models

These are additive changes and should not require any code modifications in the csharp-sdk, as the existing code doesn't directly reference these new properties. The codebase uses UsageDetails indirectly through ChatResponse and ToChatResponse() in AIContentExtensions.cs.

Files to Modify

  • Directory.Packages.props - Update the MicrosoftExtensionsVersion property value

Testing

  • Ensure the solution builds successfully
  • Ensure all existing tests pass
  • No new tests should be required as these are additive API changes

References

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@stephentoub stephentoub marked this pull request as ready for review January 19, 2026 14:42
stephentoub
stephentoub previously approved these changes Jan 19, 2026
Copilot AI changed the title [WIP] Update Microsoft.Extensions.AI to version 10.2.0 Update Microsoft.Extensions.AI to 10.2.0 Jan 19, 2026
Copilot AI requested a review from eiriktsarpalis January 19, 2026 14:44
@stephentoub
Copy link
Contributor

Microsoft.Extensions.AI.OpenAI remains at 10.1.1-preview.1.25612.2 and is compatible with the updated packages.

@copilot, can you update it to 10.2.0-preview.1.26063.2 ?

Copy link
Contributor Author

Copilot AI commented Jan 19, 2026

Microsoft.Extensions.AI.OpenAI remains at 10.1.1-preview.1.25612.2 and is compatible with the updated packages.

@copilot, can you update it to 10.2.0-preview.1.26063.2 ?

Updated to 10.2.0-preview.1.26063.2 in commit b64afc7. Build and all tests pass successfully.

Copilot AI requested a review from stephentoub January 19, 2026 14:55
@stephentoub stephentoub enabled auto-merge (squash) January 19, 2026 15:07
@eiriktsarpalis eiriktsarpalis merged commit c9eddc9 into main Jan 19, 2026
10 checks passed
@eiriktsarpalis eiriktsarpalis deleted the copilot/update-microsoft-extensions-ai branch January 19, 2026 15:29
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.

3 participants