From c7674f2485c00d0eba687150bd39a2324d48f7a8 Mon Sep 17 00:00:00 2001 From: James Liounis Date: Sun, 17 May 2026 10:48:50 +0000 Subject: [PATCH] feat(providers): add Perplexity declarative provider Signed-off-by: James Liounis --- .../src/providers/declarative/perplexity.json | 33 +++++++++++++++++++ .../docs/getting-started/providers.md | 1 + 2 files changed, 34 insertions(+) create mode 100644 crates/goose/src/providers/declarative/perplexity.json diff --git a/crates/goose/src/providers/declarative/perplexity.json b/crates/goose/src/providers/declarative/perplexity.json new file mode 100644 index 000000000000..01b48ece344a --- /dev/null +++ b/crates/goose/src/providers/declarative/perplexity.json @@ -0,0 +1,33 @@ +{ + "name": "perplexity", + "engine": "openai", + "display_name": "Perplexity", + "description": "Chat models with built-in real-time web search grounding", + "api_key_env": "PERPLEXITY_API_KEY", + "base_url": "https://api.perplexity.ai/chat/completions", + "models": [ + { + "name": "sonar", + "context_limit": 128000 + }, + { + "name": "sonar-pro", + "context_limit": 128000 + }, + { + "name": "sonar-reasoning", + "context_limit": 128000 + }, + { + "name": "sonar-reasoning-pro", + "context_limit": 128000 + } + ], + "supports_streaming": true, + "model_doc_link": "https://docs.perplexity.ai/docs/getting-started", + "setup_steps": [ + "Go to https://www.perplexity.ai/account/api/keys", + "Create or copy an existing API key", + "Paste the key above as PERPLEXITY_API_KEY" + ] +} diff --git a/documentation/docs/getting-started/providers.md b/documentation/docs/getting-started/providers.md index 983046cff6ce..7282e12f800f 100644 --- a/documentation/docs/getting-started/providers.md +++ b/documentation/docs/getting-started/providers.md @@ -45,6 +45,7 @@ goose is compatible with a wide range of LLM providers, allowing you to choose a | [OpenAI](https://platform.openai.com/api-keys) | Provides gpt-4o, o1, and other advanced language models. Also supports OpenAI-compatible endpoints (e.g., self-hosted LLaMA, vLLM, KServe). **o1-mini and o1-preview are not supported because goose uses tool calling.** | `OPENAI_API_KEY`, `OPENAI_HOST` (optional), `OPENAI_ORGANIZATION` (optional), `OPENAI_PROJECT` (optional), `OPENAI_CUSTOM_HEADERS` (optional) | | [OpenRouter](https://openrouter.ai/) | API gateway for unified access to various models with features like rate-limiting management. | `OPENROUTER_API_KEY` | | [OVHcloud AI](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/) | Provides access to open-source models including Qwen, Llama, Mistral, and DeepSeek through AI Endpoints service. | `OVHCLOUD_API_KEY` | +| [Perplexity](https://docs.perplexity.ai/) | Chat models with built-in real-time web search grounding. | `PERPLEXITY_API_KEY` | | [Ramalama](https://ramalama.ai/) | Local model using native [OCI](https://opencontainers.org/) container runtimes, [CNCF](https://www.cncf.io/) tools, and supporting models as OCI artifacts. Ramalama API is a compatible alternative to Ollama and can be used with the goose Ollama provider. Supports Qwen, Llama, DeepSeek, and other open-source models. **Because this provider runs locally, you must first [download and run a model](#local-llms).** | `OLLAMA_HOST` | | [Routstr](https://routstr.com/) | OpenAI-compatible aggregator that fronts dozens of upstream providers (Anthropic, OpenAI, Google, DeepSeek, Llama, …) behind a single API. Authenticate with an `sk-...` bearer issued by your Routstr instance — payment is handled outside goose. | `ROUTSTR_API_KEY`, `ROUTSTR_HOST` (optional, default `https://api.routstr.com`) | | [Snowflake](https://docs.snowflake.com/user-guide/snowflake-cortex/aisql#choosing-a-model) | Access the latest models using Snowflake Cortex services, including Claude models. **Requires a Snowflake account and programmatic access token (PAT)**. | `SNOWFLAKE_HOST`, `SNOWFLAKE_TOKEN` |