Add compile-time errors for AI SDK v5 patterns and docs#225
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3122e0e to
fa9cadc
Compare
5283806 to
f5a0659
Compare
commit: |
fa9cadc to
462e158
Compare
f5a0659 to
251d0c7
Compare
462e158 to
cf75fc1
Compare
251d0c7 to
bdbdde1
Compare
cf75fc1 to
b6894b8
Compare
269bb8b to
93fec7b
Compare
34d83da to
15c0ddf
Compare
93fec7b to
f2b2d4a
Compare
Merge activity
|
When users upgrade to v0.6.0 with old AI SDK v5 dependencies, TypeScript now shows helpful error messages pointing to the migration guide: - languageModel: Shows error if model has specificationVersion "v2" instead of "v3" - createTool args: Shows "⚠️ 'args' was removed... Rename to 'inputSchema'" - createTool handler: Shows "⚠️ 'handler' was removed... Rename to 'execute'" This helps users (and AI assistants) understand what needs to change before they try to run the code. Also adds scripts/check-upgrade.js CLI tool for scanning codebases. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add MIGRATION.md to package.json files array so it ships with npm package - Update compile-time error messages to point to local MIGRATION.md - Enhance CLAUDE.md with: - AI SDK v6 requirement note upfront - Compatible sibling packages (@convex-dev/rag@^0.7.0) - Type import changes (LanguageModelV2 → V3, EmbeddingModel → EmbeddingModelV3) - generateObject mode: "json" removal documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tool approval flow to Key Patterns architecture section - Replace upgrade section with detailed AI-friendly guidance including: - Detection patterns for v5 code (parameters, handler, textEmbeddingModel) - Dependency update commands - Before/after transformation examples for tools, embeddings, step limits - Verification steps and common issues - New v6 features (tool approval, reasoning streaming, token details) - Remove outdated TODO comment in deltas.ts (partial tool calls now handled) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f2b2d4a to
b67e265
Compare

Summary
createTool({ args: ... })→ helpful error pointing toinputSchemacreateTool({ handler: ... })→ helpful error pointing toexecutelanguageModelwith v2 spec → error about needing v3deltas.ts(partial tool calls now handled)Cherry-picked from #217 (commits
a81e3e3,5919965,74ce289,6f7009d).Test plan
npm run buildpassesnpm run typecheckpasses🤖 Generated with Claude Code