Skip to content

chore(ai): remove deprecated media type part from ToolResultOutput#14150

Merged
felixarntz merged 3 commits intomainfrom
fa/remove-deprecated-media
Apr 7, 2026
Merged

chore(ai): remove deprecated media type part from ToolResultOutput#14150
felixarntz merged 3 commits intomainfrom
fa/remove-deprecated-media

Conversation

@felixarntz
Copy link
Copy Markdown
Collaborator

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

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Future Work

N/A

Related Issues

N/A

@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label deprecation pull requests that introduced a deprecation maintenance CI, internal documentation, automations, etc labels Apr 6, 2026
@felixarntz felixarntz added this to the v7.0 milestone Apr 6, 2026
@felixarntz felixarntz requested a review from lgrammel April 6, 2026 17:33
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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if we should flag (with a warning) those changes that might potentially need a data migration (such as this one)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@felixarntz felixarntz merged commit b0c2869 into main Apr 7, 2026
29 of 31 checks passed
@felixarntz felixarntz deleted the fa/remove-deprecated-media branch April 7, 2026 14:09
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
## Summary

Fixes the changesets for the following v7 major PRs after the fact to
mark them as `major`, for proper referencing in future changelog / docs:
- #13352 
- #13816
- #12880 
- #13553
- #13971
- #14150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label deprecation pull requests that introduced a deprecation maintenance CI, internal documentation, automations, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants