Skip to main content

Decision brief

AI SDK Review: Vercel's TypeScript Toolkit for AI Features and Agents

Adopt Vercel's free AI SDK for AI features in TypeScript web products, and plan for fast major versions, breakage that differs by model vendor, and in-memory agents.

Reading time
3 min read
Sources
23 cited
In this piece
AI SDK+36 Positive

GILD verdict

Adopt the AI SDK when TypeScript teams build AI features and agents into a web product, as openstatus and Helpmaton run theirs in production.

It gives one free API across providers, tool loops with approvals, and UI hooks that stream results. It works for teams that pin versions, budget for majors, and add a durable runtime when agents must outlive a request, the gap that took 21st.dev to another SDK in 2026.

AI SDK

Agent Framework by Vercel

+36 Positive
Product page

Fit and limits

Who it fits

  • The AI feature lives inside a TypeScript web app, and the team wants streaming chat, structured output, and tool calls without writing provider-specific code.
  • You expect to change model providers, or run several, and want each change to touch only the model id.
  • Agents need tool approvals, timeouts, and step limits that the application controls, in the same codebase as the product.
  • Another runtime owns the agent, such as LangGraph, Mastra, Google ADK, or Bedrock AgentCore, and you want a ready UI protocol and hooks in front of it.
  • The agent drafts and a person approves: openstatus runs its production Slack agent on the AI SDK with Claude Sonnet and six tools, and every change waits for confirmation (Feb 27, 2026).

Where it falls short

  • Majors arrive fast: AI SDK 5 in July 2025, 6 in December 2025, and 7 in June 2026, which requires Node.js 22 and ESM. Practitioners report renamed APIs and behavior that changed without a compile error.
  • The abstraction leaks per provider: public issues report lost Anthropic reasoning blocks and rejected Zod schemas. They also report a 4,096-token default for models the adapter does not recognize, and a Bedrock structured-output change that degraded one team's eval results.
  • ToolLoopAgent runs in memory; durable, resumable runs need WorkflowAgent on Vercel's Workflow DevKit or a runtime such as Temporal, which LayerX wired up by hand. Earendil's founder kept only the provider layer under his own loop and would not choose it again (Nov 21, 2025), and 21st.dev moved to the Claude Code SDK for a complete loop (Apr 7, 2026).
  • The default global provider is Vercel's paid AI Gateway, so a plain model string sends traffic through Vercel unless you import provider packages with your own keys.
  • Production load finds faults the SDK's own tests missed: in one developer's production API, its per-byte base64 encoding of one 14 MB PDF killed a 2 GB container and about 100 requests on Sep 1, 2026, and a fix shipped a week later.

Implementation reality

  1. Pin a line and own upgrades

    Pin an exact minor version of ai and every @ai-sdk package together. Vercel still patches the 5, 6, and 7 lines: it released ai 5.0.281 and 6.0.315 on October 23, 2026. Plan majors on your own schedule, run Vercel's automated migration, and re-run your evals before shipping.

  2. Choose the model path on purpose

    Decide whether calls go through AI Gateway, with its budgets and data controls, or straight to providers with your own keys through explicit provider packages. Either way, test each provider you use: structured output and reasoning differ by provider.

  3. Bound every loop

    Set stopWhen explicitly, and add the AI SDK 7 timeouts for the whole run, each step, each chunk, and each tool. Pass the request's abort signal, and require approval on tools that change data or spend money.

  4. Trace from the first release

    Register OpenTelemetry once at startup with @ai-sdk/otel and send spans to your tracing tool, deciding first which prompt content the traces may carry.

What to measure in your pilot

  • GILD found no named production user of WorkflowAgent in Vercel's docs or practitioner posts; run one durable agent on it and on Temporal for two weeks and compare failed resumes.
  • Before relying on HarnessAgent, log token cost and sandbox minutes per completed Claude Code or Codex task for two weeks, with the experimental package version pinned.
  • Vercel publishes no end date for the 5 and 6 lines; check their npm tags monthly and schedule your upgrade once your line goes 60 days without a patch.

Sources

Official documentation
16
Public source
7
  1. AI SDK docs: IntroductionOfficial documentationai-sdk.dev
  2. AI SDK providers (46 first-party integrations)Official documentationai-sdk.dev
  3. AI SDK docs: Choosing a provider (AI Gateway as the default global provider)Official documentationai-sdk.dev
  4. AI SDK docs: Agents overviewOfficial documentationai-sdk.dev
  5. AI SDK docs: Loop controlOfficial documentationai-sdk.dev
  6. AI SDK docs: WorkflowAgentOfficial documentationai-sdk.dev
  7. AI SDK docs: Harnesses overviewOfficial documentationai-sdk.dev
  8. AI SDK docs: Tools and tool callingOfficial documentationai-sdk.dev
  9. AI SDK docs: TelemetryOfficial documentationai-sdk.dev
  10. AI SDK docs: AI SDK UI overviewOfficial documentationai-sdk.dev
  11. AI SDK docs: Migration guide, AI SDK 7.0Official documentationai-sdk.dev
  12. Vercel blog: AI SDK 7 (Jun 25, 2026)Official documentationvercel.com
  13. vercel/ai releases on GitHubOfficial documentationgithub.com
  14. vercel/ai LICENSE (Apache 2.0)Official documentationgithub.com
  15. Vercel docs: AI Gateway pricingOfficial documentationvercel.com
  16. Vercel docs: AI Gateway budgets and spend limitsOfficial documentationvercel.com
  17. GitHub: vercel/ai release ai@5.0.281 (Oct 23, 2026)Public sourceapi.github.com
  18. GitHub: vercel/ai release ai@6.0.315 (Oct 23, 2026)Public sourceapi.github.com
  19. openstatus blog: How we built our Slack agent (Feb 27, 2026)Public sourceopenstatus.dev
  20. Pedro Teixeira: Real-time AI streaming in production at Helpmaton (Feb 13, 2026)Public sourcemetaduck.com
  21. Armin Ronacher: Agent design is still hard (Nov 21, 2025)Public sourcelucumr.pocoo.org
  22. Hacker News comment from a 21st.dev builder on moving from the AI SDK to the Claude Code SDK (Apr 7, 2026)Public sourcenews.ycombinator.com
  23. vercel/ai issue #20149: base64 encoding of a 14 MB PDF killed a 2 GB container (Sep 1, 2026)Public sourcegithub.com