Code Pluginsource linked

independent-openrouter-sonar-pro-searchv0.0.5

OpenClaw plugin that provides an independent OpenRouter Perplexity Sonar Pro Search tool.

@jwongart/independent-openrouter-sonar-pro-search·runtime independent-openrouter-sonar-pro-search·by @jwongart
Community code plugin. Review compatibility and verification before install.
openclaw plugins install clawhub:@jwongart/independent-openrouter-sonar-pro-search
Latest release: v0.0.5Download zip

Capabilities

configSchema
Yes
Executes code
Yes
HTTP routes
0
Runtime ID
independent-openrouter-sonar-pro-search

Compatibility

Built With Open Claw Version
2026.5.28
Min Gateway Version
2026.5.17
Plugin Api Range
>=2026.5.17
Plugin Sdk Version
2026.5.28
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The package exposes one tool, sonar_pro_search, that sends Chat Completions requests to OpenRouter using the fixed perplexity/sonar-pro-search model and returns answer text, resources, usage/cost data, and raw provider details.
Instruction Scope
The tool accepts arbitrary chat messages and optional web_search_options including user_location, and returns the exact request body in details; this is consistent with the documented OpenRouter search purpose, but users should treat prompts and optional location as third-party shared data.
Install Mechanism
The npm package contains a normal OpenClaw plugin manifest and built extension, has no install/setup hooks, and startup activation appears to register the tool rather than perform network activity.
Credentials
The code reads OPENROUTER_API_KEY or OpenClaw config entries to authenticate to OpenRouter, which is documented and proportionate for this provider integration; no unrelated local data access was found.
Persistence & Privilege
No file writes, deletion, privilege escalation, durable background worker, or persistence beyond plugin installation was evident; retry behavior is bounded.
Scan Findings in Context
[SQP-2] expected: The scanner concern about prompts and optional location being sent to OpenRouter is artifact-backed, but this data flow is central to an OpenRouter Sonar search tool and is substantially disclosed by the README and tool description.
[SQP-2] expected: The code has no separate consent gate before transmission, but execution occurs through the user-invoked tool interface and the external recipient is the named provider; clearer privacy wording would be useful but does not make the package Review-worthy by itself.
[suspicious.env_credential_access] expected: The static scan correctly identifies environment/OpenClaw config credential access combined with network use; artifact review shows this is limited to resolving the OpenRouter API key for the documented Authorization header, and the key is not returned in tool output.
Assessment
Install this only if you intend OpenClaw tool calls to send the supplied messages, search options, and any optional location fields to OpenRouter and to consume OpenRouter credits. Avoid putting secrets or sensitive personal data in prompts, and configure a dedicated OpenRouter key where possible.
dist/index.js:112
Environment variable access combined with network send.
Confirmed safe by external scanners
Static analysis detected API credential-access patterns, but both VirusTotal and OpenClaw confirmed this skill is safe. These patterns are common in legitimate API integration skills.

Verification

Tier
source linked
Scope
artifact only
Summary
Validated package structure and linked the release to source metadata.
Commit
7c1c070d60eb
Tag
v0.0.5
Provenance
No
Scan status
clean

Tags

latest
0.0.5
openrouter
0.0.1
search
0.0.1
sonar-pro
0.0.1

independent-openrouter-sonar-pro-search

OpenClaw tool plugin that exposes sonar_pro_search, an independent OpenRouter Perplexity Sonar Pro Search tool.

This tool consumes OpenRouter credits, but the search quality is strong. It can work independently of OpenClaw's built-in web_search. Use it when the built-in web_search results are not satisfactory and better search results are needed.

Install

openclaw plugins install npm:@jwongart/independent-openrouter-sonar-pro-search@0.0.5

Configuration

The tool input mirrors OpenRouter request fields, so request timeout is configured at plugin level:

{
  "plugins": {
    "entries": {
      "independent-openrouter-sonar-pro-search": {
        "config": {
          "timeout_ms": 120000
        }
      }
    }
  }
}
  • timeout_ms: request timeout in milliseconds, from 15000 to 300000. Default is 120000.

Tool

  • sonar_pro_search: calls OpenRouter Chat Completions with model=perplexity/sonar-pro-search.

Inputs

Inputs mirror the OpenRouter perplexity/sonar-pro-search Chat Completions API fields that OpenRouter currently reports for this model. The plugin fixes model to perplexity/sonar-pro-search.

  • messages (required): OpenRouter Chat Completions messages array.
  • max_tokens: maximum output tokens. OpenRouter currently reports max_completion_tokens=8000 for this model.
  • temperature, top_p, top_k, frequency_penalty, presence_penalty: OpenRouter request parameters.
  • reasoning, include_reasoning, response_format: OpenRouter request parameters for reasoning and structured output behavior.
  • web_search_options: Perplexity/OpenRouter native web search options, including search_context_size and user_location.

OpenRouter model metadata currently lists these supported parameters for this model: frequency_penalty, include_reasoning, max_tokens, presence_penalty, reasoning, structured_outputs, temperature, top_k, top_p, and web_search_options. Perplexity direct-API fields such as search_domain_filter and search_recency_filter are not exposed here unless OpenRouter adds them to this model's supported parameters.

Output

The tool returns natural-language content for OpenClaw plus structured details:

  • content: the full Sonar Pro answer, a compact Resources list, plus model and any returned usage/cost summary such as Usage: 23 prompt + 28 completion = 51 tokens and Estimated cost: $0.00649. Resources prefer OpenRouter search_results when returned, then fall back to citations/annotations. Each resource uses a natural display style: title plus URL when a title exists, optional snippet text only when OpenRouter returns a real snippet-like field (snippet, content, text, or description), and URL-only citations stay URL-only. Snippets are capped to keep tool output compact.
  • details.openrouterRequest: the exact JSON body sent to OpenRouter.
  • details.openrouterResponse: the raw OpenRouter Chat Completions response, including fields such as id, model, created, choices, usage, and provider-specific fields such as citations when returned.
  • details.retryCount: retry count for transient 429/5xx/network failures.

API Key

The plugin reads the OpenRouter API key in this order:

  1. OPENROUTER_API_KEY from the Gateway process environment.
  2. env.OPENROUTER_API_KEY from ~/.openclaw/openclaw.json.
  3. models.providers.openrouter.apiKey from ~/.openclaw/openclaw.json.

The API key is never returned in tool output.

Build

npm install
npm run plugin:build
npm run plugin:validate
npm test

License

MIT