coderClaw

Perplexity Sonar

CoderClaw can use Perplexity Sonar for the web_search tool. You can connect through Perplexity’s direct API or via OpenRouter.

API options

Perplexity (direct)

OpenRouter (alternative)

Config example

{
  tools: {
    web: {
      search: {
        provider: "perplexity",
        perplexity: {
          apiKey: "pplx-...",
          baseUrl: "https://api.perplexity.ai",
          model: "perplexity/sonar-pro",
        },
      },
    },
  },
}

Switching from Brave

{
  tools: {
    web: {
      search: {
        provider: "perplexity",
        perplexity: {
          apiKey: "pplx-...",
          baseUrl: "https://api.perplexity.ai",
        },
      },
    },
  },
}

If both PERPLEXITY_API_KEY and OPENROUTER_API_KEY are set, set tools.web.search.perplexity.baseUrl (or tools.web.search.perplexity.apiKey) to disambiguate.

If no base URL is set, CoderClaw chooses a default based on the API key source:

Models

See Web tools for the full web_search configuration.