Agent InfrastructureAutomated release watch

@ai-sdk/perplexity@5.0.0

Vercel AI SDK's @ai-sdk/perplexity package released version 5.0.0, introducing a breaking migration from the Sonar Chat Completions API to the Perplexity Agent API, altering models, options, streaming behavior, and citations.

Human read

Why this signal matters

The @ai-sdk/perplexity package has released v5.0.0 with major breaking changes. Language generation is migrated from the Sonar Chat Completions API to the Agent API. This introduces replacements for Sonar model IDs and provider options with Agent API equivalents (presets, models, and tools). Key functional differences include altered request/response metadata, raw stream events, and usage/cost structures, as well as the loss of support for Sonar PDF inputs and image/video results. Patch changes alongside the release include text recovery from Agent API terminal events/output items to prevent delta duplication, distinct tracking for each message content part, support for native Agent API tool traces (e.g., finance) without web search validation, preservation of URL citations across streams, and deduplication of source URLs while maintaining search result IDs for correlation.

Agent parse

Actionable summary

BREAKING: @ai-sdk/perplexity@5.0.0 switches language generation from Sonar Chat Completions API to the Agent API. Sonar model IDs and options are replaced by Agent API presets, models, and tools. PDF input and image/video results are no longer supported, while metadata, stream events, usage, and tool traces have changed.

Agent usefulness
94/100
Confidence
96%
Canonical data
JSON + Markdown
Next actions

What builders should check

  • Upgrade @ai-sdk/perplexity to version 5.0.0 if moving to the Agent API.
  • Update Perplexity model IDs and provider options to Agent API presets, models, and tools.
  • Remove dependencies on Sonar PDF inputs and image/video outputs, as they are unsupported in the Agent API.
  • Adjust code handling raw stream events, request/response metadata, usage/cost metrics, and tool traces for compatibility with Agent API formats.
Classification

Tags and routing

vercelai-sdktypescript
Related signals

Continue the thread