Skip to content

[release/10.6] Graduate HostedFileContent.SizeInBytes and HostedFileContent.CreatedAt#7520

Open
jozkee wants to merge 1 commit intorelease/10.6from
backport-106-7513
Open

[release/10.6] Graduate HostedFileContent.SizeInBytes and HostedFileContent.CreatedAt#7520
jozkee wants to merge 1 commit intorelease/10.6from
backport-106-7513

Conversation

@jozkee
Copy link
Copy Markdown
Member

@jozkee jozkee commented May 8, 2026

Backport of #7513.

Microsoft Reviewers: Open in CodeFlow

#7513)

Stabilize HostedFileContent.SizeInBytes and HostedFileContent.CreatedAt

Remove [Experimental] from HostedFileContent.SizeInBytes and CreatedAt so
IChatClient consumers can use them without MEAI001 suppression. These two
properties are widely available across hosted-file providers (OpenAI Files,
OpenAI Containers) and have stable shapes.

- Remove [Experimental] and [JsonIgnore] from SizeInBytes/CreatedAt and
  delete the internal SizeInBytesCore/CreatedAtCore workaround pair. The
  default JsonSerializerDefaults.Web naming policy keeps the wire names
  ('sizeInBytes' / 'createdAt') unchanged.
- Update API baseline (Experimental -> Stable) for both members.
- Purpose and Scope remain experimental (provider-shaped vocabulary/IDs).

Tests:
- Replace the file-wide '#pragma warning disable MEAI001' in
  HostedFileContentTests.cs with narrow disable/restore blocks around only
  the Purpose/Scope accesses, so the file compiles without project-level
  MEAI001 suppression.
- Add narrow disable/restore blocks in ImageGenerationOptionsTests.cs
  around the still-experimental ImageGenerationResponseFormat.Hosted and
  IImageGenerator references; switch the JSON serialization tests to
  AIJsonUtilities.DefaultOptions so the file no longer depends on the
  TestJsonSerializerContext source-gen context.
- Link both HostedFileContentTests.cs and ImageGenerationOptionsTests.cs
  into Microsoft.Extensions.AI.Stabilization.Tests; update its
  <Description>.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jozkee jozkee requested a review from a team as a code owner May 8, 2026 16:35
@jozkee jozkee changed the title Graduate HostedFileContent.SizeInBytes and HostedFileContent.CreatedA… [release/10.6] Graduate HostedFileContent.SizeInBytes and HostedFileContent.CreatedAt May 8, 2026
@github-actions github-actions Bot added the area-ai Microsoft.Extensions.AI libraries label May 8, 2026
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