Repository navigation
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
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
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. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
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.