Skip to content

fix(ai/ui): convert provider metadata for system messages to model messages #7703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

danielamitay
Copy link
Contributor

@lgrammel Please take a look! Just doing my part to help out with an open issue. FYI @raymondhechen

Background

bug: provider metadata for system ui messages should be converted to model msgs

Summary

  • Added unit tests for system message conversion that match existing assistant + user unit tests with provider metadata
  • Added a unit test for the specific case mentioned in the source issue
  • Grab provider metadata from the content parts and apply to the final model message

Verification

  • Unit tests matching that of the assistant and user tests
  • Unit test matching the original issue
  • All unit tests work as expected
  • Quick vibecoded test harness with UI messages with anthropic cache control headers works as expected and fills + reads from cache with this change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant