| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
The focused implementation correctly preserves compatibility and is comprehensively covered by regression tests.
Pull request overviewFixes #6823 by preserving provider-reported cached-input and reasoning-token counts in Foundry Hosting.
Changes:
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/OutputConverter.cs | Corrects usage-counter conversion and fallback behavior. |
| dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/OutputConverterTests.cs | Covers counter representations, precedence, and accumulation. |
Note
Copilot is running an experiment and ran this review at Balanced.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the contribution!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation & Context
Foundry Hosting reports cached input and reasoning tokens as zero when providers populate the dedicated UsageDetails properties. For example, CachedInputTokenCount = 34304 and ReasoningTokenCount = 128 become zero in the completed response, while input/output/total counts remain correct.
Description & Review Guide
Verified with .NET SDK 10.0.401 on macOS arm64: seven regression cases failed before the fix; all nine pass afterward. All 473 Foundry Hosting tests pass. The full solution builds with zero warnings/errors; the enabled .NET 10 Debug unit suite passes 7,322 tests with 65 skipped and no failures, preserving the solution's existing Feature Registry Debug exclusion. Formatting checks pass. Reproduction uses the actual in-process converter; no live Azure/model calls were required.
Related Issue
Fixes #6823
Contribution Checklist