Side by side

@ai-sdk/codemodEmendant
How it finds codeEach transform matches by syntax: a property or key with a given name, anywhere in the file.Each entry matches a use of a named ai export, followed from its import.
What it changesEdits your files in place. --dry previews.Writes patches to .emendant/patches/. It does not edit your working tree.
Checks after the editNone. Run your own typecheck and tests.Runs discovered or configured typecheck and test commands on a patched copy and grades each patch.
What it reportsThe files it changed, and transform errors.Each affected place, the release that changed it, its sources, and changes it found but cannot patch.
CoverageIts own transforms for the 4.0, 5.0, 6.0 and 7.0 upgrades. AI SDK only.The changes in its feed for supported releases, including the AI SDK, openai and langchain.

One file, both tools

We wrote a file for ai@6.0.312 and, on 7 November 2026, ran three of the codemod's 7.0 transforms on it, from @ai-sdk/codemod@4.0.4. We also ran emendant scan --package ai from emendant@0.12.0.

  • The codemod renamed experimental_context to context in a tool's execute options. That is correct. Emendant did not report it.
  • Emendant reported experimental_context in generateText and patched it to runtimeContext. The codemod did not change it.
  • The codemod renamed fullStream to stream on a local object, and renamed onFinish on an unrelated callback. Emendant reported neither, as expected.
  • The codemod renamed experimental_context to context on a StepResult, which does not declare context.

This is one file and three transforms. It is not a measure of either tool across a codebase. The full file and line-by-line table are in Use Emendant alongside the AI SDK codemod.

Run both

  1. Commit or stash your work, so each tool's changes show as their own diff.
  2. Scan first: npx emendant scan --package ai
  3. Preview then run the codemod: npx @ai-sdk/codemod v7 --dry then npx @ai-sdk/codemod v7
  4. Read the codemod diff. Look for renamed properties on objects that are not from ai.
  5. Scan again and generate patches for what is left: npx emendant scan --package ai --adopted then npx emendant fix --package ai --adopted
  6. Run your typecheck and tests. Then read the AI SDK 7.0 migration guide for steps neither tool covers.

Coverage. Emendant reports the changes in its feed. A clean scan does not show that an upgrade is complete. See supported projects and known limitations.

Sources

Other tools' behaviour was checked against their own documentation on 13 November 2026.