Skip to content

Conversation

@jeffhandley
Copy link
Member

@jeffhandley jeffhandley commented Nov 2, 2025

Copilot AI and others added 10 commits November 1, 2025 13:00
…dotnet#6947)

* Initial plan

* Add support for DefaultValue attribute in AIFunctionFactory

- Check for DefaultValueAttribute when determining parameter optionality
- Use DefaultValueAttribute value as default when parameter not provided
- Add helper methods HasEffectiveDefaultValue and GetEffectiveDefaultValue
- Add comprehensive tests for DefaultValue attribute support

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Add test for DefaultValue attribute precedence over C# default

Verify that when both DefaultValue attribute and C# default are present,
the DefaultValue attribute takes precedence.

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Add test for DefaultValue precedence and update gitignore

- Add test verifying DefaultValue attribute takes precedence over C# default
- Add .nuget directory to gitignore to exclude build artifacts

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Address PR feedback: consolidate helpers and fix formatting

- Revert changes to .gitignore
- Fix formatting issues in test file (remove extra blank lines)
- Make HasEffectiveDefaultValue and GetEffectiveDefaultValue internal in AIJsonUtilities
- Remove duplicate helper methods from AIFunctionFactory and use the ones from AIJsonUtilities

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Rename parameter 's' to 'text' in test to avoid false positives

Use a longer, more descriptive parameter name to avoid false positives
when searching for the parameter name in string assertions.

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Unify helper methods into TryGetEffectiveDefaultValue

Replace HasEffectiveDefaultValue and GetEffectiveDefaultValue with a single
TryGetEffectiveDefaultValue method to avoid resolving the DefaultValueAttribute
multiple times, improving performance.

Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
…t#6958)

* Add utility for ResponseTool

* Adding UT for Utility

* Update internals to utility

* Update src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update src/Libraries/Microsoft.Extensions.AI.OpenAI/MicrosoftExtensionsAIResponsesExtensions.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update test to use the AITool extension directly

* Improve UT

* Add MCP missing UT

* Update src/Libraries/Microsoft.Extensions.AI.OpenAI/MicrosoftExtensionsAIResponsesExtensions.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update AI changelogs for 9.10.1

* Update src/Libraries/Microsoft.Extensions.AI.OpenAI/CHANGELOG.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…OpenTelemetry semantic conventions (dotnet#6953)

* Initial plan

* Add Name property to OtelMessage and populate from ChatMessage.AuthorName

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Refactor: integrate AuthorName test into existing ExpectedInformationLogged_Async test

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
* Fix serialization of UserInputRequest/ResponseContent

Serialization of variables typed as UserInputRequestContent / UserInputResponseContent would fail, because JsonSerializer doesn't recognize them as part of a hierarchy.

* Update test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/Contents/UserInputResponseContentTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/Contents/UserInputResponseContentTests.cs

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add CodeInterpreterToolCall/ResultContent content types

- Adds new CodeInterpreterToolCallContent and CodeInterpreterToolResultContent types
- Updates the OpenAI Assistants and Responses IChatClient implementations to produce them
- Updates HostedFileContent with an optional MediaType and Name, matching the corresponding properties on DataContent and UriContent.
- Updates ToChatResponse{Async} coalescing to handle these code interpreter types.
- Updates DataContent's DebuggerDisplay to show text for "text/*" and "application/json" media types.

* Update src/Libraries/Microsoft.Extensions.AI.Abstractions/Contents/CodeInterpreterToolCallContent.cs

Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>

* Address PR feedback

---------

Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
… Responses (dotnet#6960)

* Allow ChatOptions.ConversationId to be an OpenAI conversation ID with Responses

* Update src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update to OpenAI 2.6.0

In addition to updating the dependency, it now enables us to do additional things:
- Propagate ChatOptions/EmbeddingGeneratorOptions.ModelID to allow overriding the model per-request.
- Propagate AIContent results of tool invocations using non-string tool results.
- Add support for container file annotations.
- Fixed handling of GetResponse{Streaming}Async to use RequestOptions
- Remove hacky serialization code around ResponseCreationOptions.

A previous PR added HostedFileContent.Name/MediaType, but we missed adding HasTopLevelMediaType (which both DataContent and UriContent have). I had a need for that here, so included it.

* Add more tests based on code coverage gaps

* Fix handling of role in AsChatMessages
@jeffhandley jeffhandley self-assigned this Nov 2, 2025
@jeffhandley jeffhandley requested review from a team as code owners November 2, 2025 01:40
@jeffhandley jeffhandley added the area-ai Microsoft.Extensions.AI libraries label Nov 2, 2025
@jeffhandley jeffhandley requested a review from a team as a code owner November 2, 2025 01:40
@jeffhandley jeffhandley merged commit 3a47559 into dotnet:release/9.10 Nov 2, 2025
6 checks passed
@jeffhandley jeffhandley deleted the meai-updates/9.10 branch November 2, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai Microsoft.Extensions.AI libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants