Skip to content
shim

Upgrades shouldn't wobble.

A shim is the little wedge that keeps the table level. Ours slides under your AI SDK 7 upgrade, fixes the code that compiles but quietly changed, and hands you one tested pull request. AI SDK 6 to 7 is the first migration. The same pipeline is built for any API that changes under you.

Watch the wedge work

Shim's agent walks your code line by line, rewrites what v7 quietly changed, then reruns every check you already had.

Three wobbles the codemod doesn't feel

Each one compiles and keeps your tests green, so neither tsc nor the codemod notices.

usageYour token meter overcountsmeter.record(result.usage)On calls with several steps, v7 adds up every step. Shim switches to finalStep.usage.
historyChat history loses tool callshistory.push(...response.messages)v7 keeps only the last step there. Shim uses responseMessages.
systemSystem prompts start throwing{ role: 'system', ... }v7 rejects them at runtime. Typecheck stays green. Shim opts you back in.

How it works

5 candidates passed every test and never shipped, because the judge caught them.

  1. 1CheckInstall with scripts off. Run your typecheck and tests. Only what passes now counts later.
  2. 2BumpMove to ai@7 and run the official codemod for the renames.
  3. 3FixRewrite every read whose meaning changed. Rules first, an agent only where a rule cannot.
  4. 4ProveRerun every check, then a separate judge reads the diff. Any regression means an issue, not a PR.

Agent cost on our runs: $0.06 to $5.63 per repo.

Or scan it yourself, tonight

The scan runs locally, writes nothing, and lists each silent change with file, line and fix. Node 22 or later.

cd your-appnpx getshim scan .

Built in the open

Shim is in active development. Here is what works today and what ships next.

Shipped
  • 14 AI SDK 7 upgrade PRs opened on public repos
  • A separate judge that has blocked 5 green but wrong diffs
  • A guard for the official codemod when it renames your own exports
  • Per test baseline: only checks green before the upgrade count after it
  • Runs on macOS, Linux and Windows
Building now
  • Evolving the fix agent: variants compete on real repos and the winner becomes the default
  • Short issue drafts with file and line when a PR would regress a check
Next
  • pnpm catalog: support, which blocked four repos so far
  • Scan repos that already moved to v7 for the silent bugs they kept
  • Next migrations after AI SDK 7: other SDKs with silent breaking changes

Questions

Why is the official codemod not enough?

It handles renames. The v7 changes that matter still compile, so neither the codemod nor tsc flags them.

Will it change how my app behaves?

No. Every fix keeps the value your code read on v6, for example finalStep.usage in place of usage.

What if my tests fail after the upgrade?

You get a short issue with the file and line instead of a PR. Shim never opens a PR that regresses a check.

Does it run my install scripts or see my keys?

No. Installs always use --ignore-scripts, and commands in your repo run without API keys.

What runs the fix agent, and do I need an API key?

The scan needs no model or key. The fix agent runs on a model you provide: your own Claude login or API key, any Anthropic-compatible provider, or open-source models.

Can I run it myself?

Yes. The code is public on GitHub, and the scan runs with “npx getshim scan .” on Node 22 or later.

Follow the build.

New features land in the repo first. Run the scan on your app tonight, or watch what ships next.