AI SDK 7 wraps file data as { type: "data" | "url" } and allows a bare "image" media type. The middleware only read the old shape, so image-only turns were not saved and mixed turns lost their images.
@ai-sdk/provider was a required peer, so npm installed provider 4 (Node 22 only) in AI SDK 5 and 6 apps. It is now optional, so apps keep the provider their ai version uses.
test:compat now checks that both image turns are saved and that the installed provider major matches the one ai depends on.