This release of the Microsoft.Extensions.AI packages adds new experimental APIs for Realtime client sessions and Text-to-Speech, along with OpenTelemetry and middleware improvements.
Packages in this release
| Package | Version |
|---|---|
| Microsoft.Extensions.AI.Abstractions | 10.4.1 |
| Microsoft.Extensions.AI | 10.4.1 |
| Microsoft.Extensions.AI.OpenAI | 10.4.1 |
Experimental API Changes
New Experimental APIs
- New experimental API: Realtime Client Sessions #7285 and #7399
- New experimental API: Text-to-Speech Client #7381
Changes to Experimental APIs
- Hosted File Download Stream: write-path methods now explicitly throw
NotSupportedException#7394
What's Changed
AI
- Add
ITextToSpeechClientabstraction, middleware, and OpenAI implementation #7381 by @stephentoub - Realtime Client Proposal #7285 by @tarekgh
- Add
VoiceActivityDetectionoptions to realtime session abstractions #7399 by @tarekgh - Make
UriContentmediaTypeparameter optional with inference from URI file extension #7398 by @stephentoub (co-authored by @Copilot) - Emit
gen_ai.client.operation.exceptionviaILogger LoggerMessageon OpenTelemetry instrumentation classes #7379 by @stephentoub (co-authored by @Copilot) - Support
invoke_workflowas an equivalent parent span toinvoke_agentinFunctionInvokingChatClient#7382 by @stephentoub (co-authored by @Copilot) - Make
HostedFileDownloadStreamexplicitly read-only #7394 by @stephentoub (co-authored by @Copilot)
Documentation Updates
- Document JSON schema derivation for return types in AIFunctionFactory #7400 by @stephentoub (co-authored by @Copilot)
Test Improvements
- Fix test warnings #7369 by @jozkee
- Add tests for JSON deserialization of serializable types #7373 by @stephentoub (co-authored by @Copilot)
Repository Infrastructure Updates
- Update Package Validation Baseline to 10.4.0 #7389 by @jeffhandley (co-authored by @Copilot)
- Update ModelContextProtocol libraries to version 1.0.0 #7340 by @stephentoub (co-authored by @Copilot)
Acknowledgements
- @eiriktsarpalis @ericstj @CodeBlanch @lmolkova @adamsitnik @joperezr reviewed pull requests
Full Changelog: v10.4.0...v10.4.1