Skip to content

fix(core): relocate AI SDK tool media - #41843

Open
rekram1-node wants to merge 1 commit into
v2from
aisdk-media-fallback
Open

fix(core): relocate AI SDK tool media#41843
rekram1-node wants to merge 1 commit into
v2from
aisdk-media-fallback

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • move tool-result images and PDFs into request-local user messages for residual AI SDK providers
  • preserve tool-result text and non-image file content while keeping consecutive tool responses together
  • keep file-only tool results non-empty after extracting their media

Native provider routes continue to own their protocol-specific media placement. This restores the conservative V1 fallback only for models that still reach the generic AI SDK bridge.

Testing

  • bun test test/aisdk.test.ts (from packages/core)
  • bun typecheck (from packages/core)
  • push hook: full workspace bun turbo typecheck --concurrency=3

Closes #41674

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant