[PR #3965] [MERGED] docs(perplexity): document Agent API support (use_responses_api / useResponsesApi) #3975

Closed
opened 2026-06-05 18:53:46 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3965
Author: @jliounis
Created: 5/12/2026
Status: Merged
Merged: 5/26/2026
Merged by: @mdrxy

Base: mainHead: feat/perplexity-agent-api


📝 Commits (3)

  • ba43dba docs(perplexity): document Agent API support (use_responses_api / useResponsesApi)
  • f505128 Merge branch 'main' into feat/perplexity-agent-api
  • 1b33983 cr

📊 Changes

5 files changed (+108 additions, -1 deletions)

View changed files

📝 src/oss/deepagents/code/providers.mdx (+1 -1)
📝 src/oss/javascript/integrations/chat/perplexity.mdx (+53 -0)
📝 src/oss/javascript/integrations/providers/perplexity.mdx (+2 -0)
📝 src/oss/python/integrations/chat/perplexity.mdx (+50 -0)
📝 src/oss/python/integrations/providers/perplexity.mdx (+2 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/3965 **Author:** [@jliounis](https://github.com/jliounis) **Created:** 5/12/2026 **Status:** ✅ Merged **Merged:** 5/26/2026 **Merged by:** [@mdrxy](https://github.com/mdrxy) **Base:** `main` ← **Head:** `feat/perplexity-agent-api` --- ### 📝 Commits (3) - [`ba43dba`](https://github.com/langchain-ai/docs/commit/ba43dbaec676927a488585ed031cc2b339c11281) docs(perplexity): document Agent API support (use_responses_api / useResponsesApi) - [`f505128`](https://github.com/langchain-ai/docs/commit/f5051287b75a715d788eb350ffcaa489d4649334) Merge branch 'main' into feat/perplexity-agent-api - [`1b33983`](https://github.com/langchain-ai/docs/commit/1b3398323946ece9a302f7e68009946c02fe6212) cr ### 📊 Changes **5 files changed** (+108 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/deepagents/code/providers.mdx` (+1 -1) 📝 `src/oss/javascript/integrations/chat/perplexity.mdx` (+53 -0) 📝 `src/oss/javascript/integrations/providers/perplexity.mdx` (+2 -0) 📝 `src/oss/python/integrations/chat/perplexity.mdx` (+50 -0) 📝 `src/oss/python/integrations/providers/perplexity.mdx` (+2 -0) </details> ### 📄 Description ## 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: - **Python**: [langchain-ai/langchain#37359](https://github.com/langchain-ai/langchain/pull/37359) — `feat(perplexity): add use_responses_api flag to ChatPerplexity` - **JS**: [langchain-ai/langchainjs#10884](https://github.com/langchain-ai/langchainjs/pull/10884) — `feat(perplexity): add useResponsesApi flag to ChatPerplexity` **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](https://docs.perplexity.ai/api-reference/agent-api). ### 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:53:46 -04:00
yindo closed this issue 2026-06-05 18:53:47 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3975