Skip to main content
Applicable to: Users who call Perplexity AI models through the AI Gateway. For almost everyone, no action is required.

Your Perplexity models keep working

Perplexity is retiring the Sonar chat-completions API on 27th September, 2026 (Perplexity: Migrating from Sonar). The AI Gateway now serves Perplexity models through its replacement, the Agent API. Nothing changes in how you call them: the same model IDs, the same request parameters and search filters, and the same content, citations, and search_results in the response (with web search still on by default). Upgrade to a release that includes this change and you are done.

How your model IDs map on Chat Completions

Perplexity kept a single Sonar model slug, perplexity/sonar, and now expresses the old quality tiers as presets. The gateway does this translation for you, so you keep sending the model ID you already use: Every one of them runs on perplexity/sonar, and the gateway pins that model explicitly. Pinning matters: a preset sent without a model can resolve to a third-party model, so pinning keeps your prompts with Perplexity. The preset is also what carries web search, which is why grounding stays on by default. Perplexity publishes no preset for sonar-reasoning. TrueFoundry places it on low, one tier below sonar-reasoning-pro.

Two things worth a look

  • If you read images or related_questions: these are no longer returned, as the Agent API has no equivalent. search_results carries each source’s URL, title, and publication date, which covers most of what they were used for.
  • If you branch on an empty finish_reason: non-streaming responses now return the real value (stop, length, or tool_calls) instead of an empty string.
A few legacy Sonar parameters have no Agent API equivalent: top_k, the penalty parameters, n, stop, seed, logprobs, search_mode, disable_search, return_images, and return_related_questions. They are ignored rather than rejected, so requests carrying them keep succeeding. The Perplexity AI page has the details, including what each ignored parameter maps to.

Perplexity now supports the Responses API

Perplexity models are also available on the Responses API using the model ID sonar. This is the surface Perplexity’s Agent API is built around, and we recommend it for new integrations. It behaves differently from Chat Completions by design. Nothing is added on your behalf: no preset and no web search tool. You ask for what you want, so send a preset or tools: [{ "type": "web_search" }] when you need grounding. The preset mapping and the automatic web search described above apply to Chat Completions only, where they exist to preserve how Sonar always behaved. Existing Chat Completions integrations need no change.
If you have questions about your Perplexity integration, reach out to support@truefoundry.com. We’re happy to assist.