Code from the installed docs

Read node_modules/ai/docs; remembered APIs are stale.

AI SDK docsai-sdk.dev
The top-level prompt option for system instructions has been renamed from system to instructions.
Migration guide · AI SDK 7.0Read docs ↗

From ai-sdk, “Do Not Trust Your Own Memory”.

Same route, two sources

Press Typecheck to check both against ai@7.0.114.

Written from memoryBad
0 / 0Not checked
Errors –Deprecated –
maxSteps · toDataStreamResponse · m.content
From the bundled docsGood
0 / 0Not checked
Errors –Deprecated –
node_modules/ai/docs

# 1. Which version is installed, which is latest?
grep '"version"' node_modules/ai/package.json
npm view ai version

# 2. Read the docs that ship with it
ls node_modules/ai/docs
grep -rn "isStepCount" node_modules/ai/docs

# 3. After every change
npx tsc --noEmit

Why it matters, pros and cons

Why it matters

The SDK renames APIs between majors. Code from memory targets a version you no longer have.

Pros

  • Bundled docs match the installed version.
  • The type checker catches old names before users do.
  • Deprecations get fixed before a major removes them.

Cons

  • Checking docs costs a minute per change.
  • Deprecated names still compile; only warnings flag them.
  • A major behind? Upgrade first with the migration guide.