Vercel AI SDK shipped @ai-sdk/perplexity@5.0.0 (2026-09-26), a breaking migration from Sonar Chat Completions to Perplexity Agent API. Replace Sonar model IDs and provider options with Agent API presets, models, and tools; request/response metadata, raw stream events, and usage/cost shapes change; Sonar PDF input and image/video results are unsupported. Follow-up fixes recover terminal text, accept native tool traces (e.g. finance), and dedupe URL citation sources while preserving search-result IDs.
Key Takeaways
- ✓Shipped: @ai-sdk/perplexity@5.0.0 on GitHub Releases / npm 5.0.0
- ✓Breaking: language generation moves to Perplexity Agent API; rewrite Sonar model IDs and provider options to presets/models/tools
- ✓Dropped: Sonar PDF input and image/video results; usage/cost and raw stream metadata shapes change
- ✓Streaming: recover missing text from terminal events/output items (incl. incomplete) without duplicating deltas
- ✓Citations: emit each source URL once while keeping search-result IDs; accept native Agent API tool traces (e.g. finance) without web-search validation
Key Decision Metrics at a Glance
Turn your technical choice into a development budget
Compare 40 dev plans & simulate token costs vs $20/mo subscriptions
Project Links & Resources
Direct AccessIn-Depth Technical Analysis
Core Background & Industry Pain Points
Apps on the Vercel AI SDK Perplexity provider were wired to Sonar Chat Completions—model IDs, provider options, stream events, and usage fields. Perplexity’s Agent API (presets, tools, richer retrieval/tool traces) is now the capability center; the old path cannot represent native traces such as finance, and PDF/multimodal semantics diverge, so upgrades concentrate into one breaking migration.
Architecture Highlights & Internals
@ai-sdk/perplexity@5.0.0 (2026-09-26) moves language generation to the Agent API: replace Sonar model IDs/options with presets, models, and tools; reshape response metadata, raw stream events, and usage/cost. Implementation tracks each message content part, recovers missing text from terminal events/output items (including incomplete) without repeating deltas, dedupes URL citations while keeping search-result IDs, and accepts native tool traces without web-search validation.
Authoritative Benchmarks & Measured Scores
No public latency/accuracy numbers in the release notes—this is a protocol-level breaking upgrade. Versus 4.x Sonar: capability expands to Agent API presets/tools while Sonar PDF input and image/video results are dropped; callers must rewrite observability and billing against the new metadata/stream shapes.
Developer Hands-on Guide
Install @ai-sdk/perplexity@5.0.0, follow the provider docs to remap Sonar IDs/options to Agent API presets/models/tools, replace any PDF/multimodal assumptions, and update usage/cost plus citation correlation (URL + search-result ID). Release: GitHub; package: npm.
Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.
Discussion & Comments
0Sign in to join the discussion
Connect with AI developers to exchange benchmark insights.