Skip to content

reproduction: bug: uiMessageChunkSchema strict validation breaks backward due to#17010

Draft
lgrammel wants to merge 1 commit into
mainfrom
bug-13733-1
Draft

reproduction: bug: uiMessageChunkSchema strict validation breaks backward due to#17010
lgrammel wants to merge 1 commit into
mainfrom
bug-13733-1

Conversation

@lgrammel

@lgrammel lgrammel commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Bug

bug: uiMessageChunkSchema strict validation breaks backward due to providerMetadata addition

Reproduction

  • Added examples/ai-functions/src/reproduction/ui-message-chunk-forward-compatibility.ts as a minimal UI message stream parsing reproduction.
  • The artifact first verifies a valid tool-output-available chunk parses, then simulates a newer server adding an optional stream-event key to the same chunk.
  • The current worktree already recognizes providerMetadata, so the artifact uses optionalFieldFromNewerServer to exercise the same strict-schema forward-compatibility failure described in bug: uiMessageChunkSchema strict validation breaks backward due to providerMetadata addition #13733.
  • The reproduction fails with AI_TypeValidationError and unrecognized_keys: ["optionalFieldFromNewerServer"] instead of accepting or ignoring the new optional field.
  • A temporary ai@6.0.119 check also rejected the exact reported providerMetadata tool-output-available chunk with AI_TypeValidationError.

Related Issues

Reproduces #13733

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant