ai@7.0.40 marks the Experimental_GeneratedImage named export as deprecated. Nothing about the type changed: it is still an alias for GeneratedFile, and the package’s own declaration file now carries a @deprecated tag saying the alias will be removed in v8. A repository importing Experimental_GeneratedImage from ai keeps compiling, and now sees a deprecation warning from its editor and typechecker. Anybody who adopted the image generation API while it still carried the Experimental_ prefix is affected; nobody using GeneratedFile directly is.
What changed
Experimental_GeneratedImageis deprecated, not removed. ai@7.0.39 exported it asGeneratedFile as Experimental_GeneratedImage, an unmarked alias. ai@7.0.40 gives the alias its own declared type and tags it: “UseGeneratedFileinstead. This alias will be removed in v8.” Nothing changes at runtime, and existing code still typechecks.
Before and after
The import Emendant detects:
import { Experimental_GeneratedImage } from 'ai';
export { Experimental_GeneratedImage };Name a model provider and emendant fix writes the rename the deprecation notice asks for. It is a plain identifier swap, since Experimental_GeneratedImage and GeneratedFile describe the same shape:
import { GeneratedFile } from 'ai';
export { GeneratedFile };Migration guidance and its limits
Emendant reports every import of Experimental_GeneratedImage from ai, at high confidence, and offers a patch once you name a model provider on the command line or in emendant.json. The fix is assisted rather than deterministic, so the patch is one model’s answer to one site rather than the same rewrite everywhere. It is proved before you see it, in a copy of your repository moved to 7.0.40 and put through whichever of your own typecheck and tests it finds there, and withheld if it fails. Without a provider the finding is reported with its guidance and nothing is sent anywhere.
The guidance is written for a deprecation rather than a removal: the alias still works at this release, so it asks for a rewrite only where the release names a direct replacement with the same behaviour, and tells the model to decline otherwise. It does name one here. Doing it by hand costs little either way, because the two names share a declaration and the typechecker confirms the rename with no further changes.
There is no removal date beyond “v8”, and v8 is not out. Leaving Experimental_GeneratedImage in place for now still compiles; the finding exists so the rename happens on your schedule rather than at the next major version.
The matcher only follows a direct import { Experimental_GeneratedImage } from 'ai'. A namespace import, a re-export under another local name from a wrapper module, or a value reached through something other than a static import from ai is not attributed, and a clean scan says only that this file holds no such import, not that the package holds no other deprecated name. This is the only change ai@7.0.40 makes that Emendant’s feed describes; the release may carry other edits the feed does not cover.
What Emendant detects, fixes and verifies
1 change in ai 7.0.40. 0 patched by a transform, 1 patched only with a model provider you name, 0 report only. Every patch is proved in a copy of your repository before it is offered, and its header names the checks that passed. This table is generated from the feed entry, so it cannot claim more than the entry does.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
Deprecated Experimental_GeneratedImageai-npm-7.0.40-experimental-generated-image-deprecated | Deprecation |
| Patch, only when you name a model provider | Your typecheck and tests |
emendant explain <change-id> prints any row's entry, guidance and sources at the terminal.
Coverage
- Snapshot
2026-09-20.1, sequence 27, signed 20 September 2026- Minimum CLI
emendant@0.1.0- Feed entry
feed/npm/ai/7.0.40.json
emendant feed status shows the snapshot your machine holds, and emendant feed update fetches the latest.
Primary sources
Every claim above was checked against these, each pinned to the release rather than to a default branch.
Scan your repository
Runs locally, reads your lockfile and source, sends nothing anywhere.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.