Add Perplexity as a model provider#5095
Open
jliounis wants to merge 1 commit intoAider-AI:mainfrom
Open
Conversation
Mirrors the OpenRouter integration pattern: docs page, model-settings entries for Sonar models, env-var detection in onboarding and fast_validate_environment, and tests. Perplexity exposes an OpenAI-compatible Agent API at https://api.perplexity.ai, which LiteLLM already supports under the `perplexity/` provider prefix. Default model is `sonar-pro`. Files: - aider/website/docs/llms/perplexity.md (new docs page) - aider/resources/model-settings.yml (sonar, sonar-pro, sonar-reasoning, sonar-reasoning-pro, sonar-deep-research) - aider/onboarding.py (PERPLEXITY_API_KEY -> perplexity/sonar-pro) - aider/models.py (perplexity provider in fast_validate_environment) - tests/basic/test_onboarding.py + tests/basic/test_models.py
|
james-pplx seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
Summary
Adds Perplexity as a first-class model provider in Aider, mirroring the OpenRouter integration pattern. Perplexity exposes an OpenAI-compatible Agent API at
https://api.perplexity.ai, which LiteLLM already supports under theperplexity/provider prefix.The default model in all examples is
perplexity/sonar-pro.Files changed
aider/website/docs/llms/perplexity.md— new provider docs page (mirrorsopenrouter.md)aider/resources/model-settings.yml— model entries forsonar,sonar-pro,sonar-reasoning,sonar-reasoning-pro,sonar-deep-researchaider/onboarding.py—PERPLEXITY_API_KEY→perplexity/sonar-proin default-model auto-selectionaider/models.py—perplexityprovider added tofast_validate_environmentkeymaptests/basic/test_onboarding.py— coverage for Perplexity env-var detectiontests/basic/test_models.py— coverage for the new model-settings entriesAvailable models
perplexity/sonarperplexity/sonar-pro(default)perplexity/sonar-reasoningperplexity/sonar-reasoning-properplexity/sonar-deep-researchTest plan
pytest tests/basic/test_onboarding.py tests/basic/test_models.py— all passtests/basic/suite passes (only the pre-existingtest_voice.pyfailures from this sandbox's missing sound device are unrelated)aider --model perplexity/sonar-proresolves the new model settingsReferences: https://docs.perplexity.ai