Skip to content

Backport: feat(ai): pass result provider metadata across the stream#13184

Merged
vercel-ai-sdk[bot] merged 1 commit intorelease-v6.0from
backport-pr-13181-to-release-v6.0
Mar 6, 2026
Merged

Backport: feat(ai): pass result provider metadata across the stream#13184
vercel-ai-sdk[bot] merged 1 commit intorelease-v6.0from
backport-pr-13181-to-release-v6.0

Conversation

@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

@vercel-ai-sdk vercel-ai-sdk bot commented Mar 6, 2026

This is an automated backport of #13181 to the release-v6.0 branch. FYI @aayush-kapoor

## Background

faced the issue while implementing #13157 - for multiturn conversation,
the item Ids weren't properly being mapped within aisdk and there was a
mismatch between what we were sending to the openai api and what was
expected.

we were attching the same tool call id as the `tool-call` object to the
`tool-result` which caused duplicate ID found errors + incorrect ids
sent for certain parts

## Summary

- since the item_id for tool_search_output is propagated via
providerMetadata - we ensure the providerMetadata is preserved through
the UI stream.
- similar change needed for generate text as well

## Manual Verification

will be done in #13157 

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)
@vercel-ai-sdk vercel-ai-sdk bot enabled auto-merge (squash) March 6, 2026 20:54
@tigent tigent bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. ai/ui anything UI related feature New feature or request labels Mar 6, 2026
@vercel-ai-sdk vercel-ai-sdk bot merged commit 78c0e26 into release-v6.0 Mar 6, 2026
24 checks passed
@vercel-ai-sdk vercel-ai-sdk bot deleted the backport-pr-13181-to-release-v6.0 branch March 6, 2026 21:01
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor Author

vercel-ai-sdk bot commented Mar 6, 2026

🚀 Published in:

Package Version
ai 6.0.120
@ai-sdk/angular 2.0.121
@ai-sdk/langchain 2.0.126
@ai-sdk/llamaindex 2.0.120
@ai-sdk/react 3.0.122
@ai-sdk/rsc 2.0.120
@ai-sdk/svelte 4.0.120
@ai-sdk/vue 3.0.120

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

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. ai/ui anything UI related feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant