chore(ai): remove deprecated media type part from ToolResultOutput#14150
Merged
felixarntz merged 3 commits intomainfrom Apr 7, 2026
Merged
chore(ai): remove deprecated media type part from ToolResultOutput#14150felixarntz merged 3 commits intomainfrom
media type part from ToolResultOutput#14150felixarntz merged 3 commits intomainfrom
Conversation
lgrammel
reviewed
Apr 7, 2026
Comment on lines
+164
to
+166
| The deprecated tool result content part of `{ type: 'media' }` has been removed in AI SDK 7. | ||
|
|
||
| Use `{ type: 'image-data' }` for images and `{ type: 'file-data' }` for all other files. |
Collaborator
There was a problem hiding this comment.
wonder if we should flag (with a warning) those changes that might potentially need a data migration (such as this one)
Collaborator
Author
There was a problem hiding this comment.
you mean a visual warning notice in the docs? If so, we'd probably need to add that to most sections I believe?
Let's follow up with this as needed, we should probably do a comprehensive audit on this migration guide once we are ready to promote the 7.0 beta more.
lgrammel
approved these changes
Apr 7, 2026
gr2m
pushed a commit
that referenced
this pull request
Apr 7, 2026
#14150) ## Background The `media` type in `ToolResultOutput` was deprecated a while ago in favor of `image-data` and `file-data`. This PR fully removes it as part of AI SDK v7. ## Summary - Removes the `{ type: 'media' }` variant from the `ToolResultOutput` union type in `provider-utils`, plus related references and tests - Adds a migration guide entry for the removal ## Manual Verification N/A ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [x] 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) ## Future Work N/A ## Related Issues N/A
felixarntz
added a commit
that referenced
this pull request
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The
mediatype inToolResultOutputwas deprecated a while ago in favor ofimage-dataandfile-data. This PR fully removes it as part of AI SDK v7.Summary
{ type: 'media' }variant from theToolResultOutputunion type inprovider-utils, plus related references and testsManual Verification
N/A
Checklist
pnpm changesetin the project root)Future Work
N/A
Related Issues
N/A