Skip to content

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Sep 24, 2025

Both DataContent and UriContent are valid in responses, and from both OpenAI and Azure OpenAI, I get back a UriContent.

Microsoft Reviewers: Open in CodeFlow

Both DataContent and UriContent are valid in responses, and from both OpenAI and Azure OpenAI, I get back a UriContent.
@stephentoub stephentoub requested a review from ericstj September 24, 2025 18:20
@stephentoub stephentoub requested a review from a team as a code owner September 24, 2025 18:20
@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 18:20
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Sep 24, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an integration test for image generation that was incorrectly expecting only DataContent responses. The test now handles both DataContent and UriContent response types, which are both valid formats returned by OpenAI and Azure OpenAI services.

Key Changes

  • Updated test assertions to accept both DataContent and UriContent response types
  • Replaced type-specific assertions with a switch statement to handle different content types
  • Added appropriate validation for each content type (URI scheme validation for UriContent, data validation for DataContent)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@stephentoub stephentoub merged commit dbc92f8 into dotnet:main Sep 30, 2025
7 checks passed
@stephentoub stephentoub deleted the fiximagetest branch September 30, 2025 01:16
This was referenced Oct 14, 2025
This was referenced Oct 15, 2025
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.

2 participants