docs(providers): add Perplexity (Agent API + Search API)#24976
Open
jliounis wants to merge 5 commits into
Open
docs(providers): add Perplexity (Agent API + Search API)#24976jliounis wants to merge 5 commits into
jliounis wants to merge 5 commits into
Conversation
- Replace fabricated remote MCP URL with the official @perplexity-ai/mcp-server npm package run via stdio (matches https://github.com/perplexityai/modelcontextprotocol) - Replace Sonar model entries in the Agent API example with routed third-party models (openai/gpt-5.4, anthropic/claude-sonnet-4-6) so the example reflects the Agent API's third-party routing capability
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
Closing in favor of a more complete PR that combines these provider docs with code support for Perplexity as a websearch backend (parallel to Exa, configurable via Net effect for reviewers: same docs content + new TypeScript module + config plumbing, in one PR instead of two. |
This was referenced May 5, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Adds a
### Perplexitysection topackages/web/src/content/docs/providers.mdx(between### OpenRouterand### LLM Gateway) so opencode users can wire up Perplexity without reverse-engineering it.It documents two integration paths:
/v1/responsesaliases/v1/agent), so the example uses@ai-sdk/openai. This matches the guidance already in opencode's "Custom provider" section ("If your provider/model uses/v1/responses, use@ai-sdk/openai"). Theopencode.jsonsnippet is shaped exactly like the surrounding custom-provider examples (llama.cpp / LM Studio): provider id,npm,name,options.baseURL,options.apiKeyvia{env:PERPLEXITY_API_KEY}, and amodelsmap. The example lists routed third-party models (openai/gpt-5.4,anthropic/claude-sonnet-4-6) to demonstrate the Agent API's main differentiator — multi-provider routing. The full model list is linked.curlagainsthttps://api.perplexity.ai/searchfor scripts and one-off calls.@perplexity-ai/mcp-server) configured as atype: "local"stdio MCP in opencode. The schema (type,command,environment) matchespackages/web/src/content/docs/mcp-servers.mdxexactly.Why it works:
@ai-sdk/openaipackage handles/v1/responsesproviders and is already the recommended package for that case in this same docs file, so no AI SDK / opencode code changes are needed.mcp.<id>block uses the documented local-stdio schema; nothing is invented.command(npx -y @perplexity-ai/mcp-server) is the canonical install command from the official MCP server README.This is documentation-only — no runtime code, schema, or build pipeline is touched.
How did you verify your code works?
bun run lintfrom the repo root — 0 errors (pre-existing warnings only, none inproviders.mdx).bun --cwd packages/web run build— Astro build completes successfully; the new section renders correctly indist/docs/providers/index.htmlwith anchor#perplexity, every link intact, and zero Sonar references in the output.astro checkreports on.tsx/.astrofiles are pre-existing ondev(confirmed by stashing this change and re-running) and unrelated to this PR.Screenshots / recordings
N/A — text-only docs change. The new section renders in the existing providers page layout with no UI changes.
Checklist
Note: only the English
packages/web/src/content/docs/providers.mdxis updated. Locale translations underpackages/web/src/content/docs/<locale>/providers.mdxshould be regenerated by maintainers using the project's translation workflow.