Skip to content

docs(perplexity): document Agent API support (use_responses_api / useResponsesApi)#3965

Draft
James Liounis (jliounis) wants to merge 1 commit into
langchain-ai:mainfrom
jliounis:feat/perplexity-agent-api
Draft

docs(perplexity): document Agent API support (use_responses_api / useResponsesApi)#3965
James Liounis (jliounis) wants to merge 1 commit into
langchain-ai:mainfrom
jliounis:feat/perplexity-agent-api

Conversation

@jliounis
Copy link
Copy Markdown
Contributor

Summary

Documents Agent API support for ChatPerplexity in both Python and JavaScript, mirroring the use_responses_api / useResponsesApi flag pattern that ChatOpenAI already uses.

This is the docs counterpart to:

Staged as draft until both code PRs land and the next langchain-perplexity (Python) and @langchain/perplexity (JS) releases ship. Once those packages publish, this PR is ready to mark ready-for-review.

What changed

Python — src/oss/python/integrations/chat/perplexity.mdx

Added an "Agent API support (use_responses_api)" section before "Using perplexity-specific parameters" with:

  • Brief explainer on what the Agent API provides (richer tool-calling surface, native web search, structured web_search blocks).
  • Comparison table: Search API (Chat Completions) vs Agent API (Responses).
  • Code example: explicit use_responses_api=True.
  • Code example: auto-detection via tools=[{"type": "web_search"}].
  • Pointer to the Agent API model list.

JavaScript — src/oss/javascript/integrations/chat/perplexity.mdx

Added an "Agent API support (useResponsesApi)" section before "API reference" with TypeScript equivalents of the Python examples.

Provider pages

  • src/oss/python/integrations/providers/perplexity.mdx — 1-line callout in the Chat models section linking to the new chat-page section.
  • src/oss/javascript/integrations/providers/perplexity.mdx — same, for JS.

Conventions followed

  • No references to deprecated sonar model branding — only sonar-pro (Search API) and Agent API model names where relevant.
  • Mirrors the structure of the existing ChatOpenAI use_responses_api docs.
  • Anchor IDs (#agent-api-support-use_responses_api, #agent-api-support-useresponsesapi) match the Mintlify slugification of the new section headers.

Why draft

Holding as draft so this lands together with (and not before) the SDK releases the flag. Once #37359 and #10884 are merged and the next langchain-perplexity / @langchain/perplexity versions are released, I will mark this ready and ping reviewers.

cc @langchain-ai/team


🤖 Drafted with assistance from Perplexity Computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai javascript langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant