Skip to content

feat(provider): Add Perplexity Agent API provider#15919

Open
kesku wants to merge 4 commits intoanomalyco:devfrom
kesku:kesku/add-ppl-agent-api
Open

feat(provider): Add Perplexity Agent API provider#15919
kesku wants to merge 4 commits intoanomalyco:devfrom
kesku:kesku/add-ppl-agent-api

Conversation

@kesku
Copy link

@kesku kesku commented Mar 3, 2026

Issue for this PR

Closes #15921

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a custom loader for the perplexity-agent provider so it uses sdk.responses() instead of the default sdk.languageModel() fallback. Also adds the standard HTTP-Referer / X-Title headers consistent with other providers.

Depends on anomalyco/models.dev#1082 which defines the provider metadata, model list, base URL, and PERPLEXITY_API_KEY env var.

How did you verify your code works?

Ran the models.dev API locally from anomalyco/models.dev#1082, set OPENCODE_MODELS_URL to point at the local instance, and confirmed the provider and its models appear correctly and requests route to the right endpoint.

Screenshots / recordings

CleanShot 2026-03-03 at 23 46 43@2x CleanShot 2026-03-03 at 23 50 01@2x

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Hey! Your PR title Add Perplexity Agent API provider doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 3, 2026
@kesku kesku changed the title Add Perplexity Agent API provider feat(provider): Add Perplexity Agent API provider Mar 3, 2026
@github-actions github-actions bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@kesku kesku marked this pull request as draft March 4, 2026 05:16
@kesku kesku marked this pull request as ready for review March 4, 2026 05:16
@kesku kesku marked this pull request as draft March 4, 2026 15:34
@kesku kesku marked this pull request as ready for review March 4, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add the Perplexity Agent API as a provider

1 participant