pi-web-providers 3.0.0 โ†’ 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +38 -26
  2. package/dist/index.js +1361 -306
  3. package/package.json +8 -8
package/README.md CHANGED
@@ -27,13 +27,13 @@ not as a replacement for source inspection or deeper research.
27
27
  extraction from `web_search` results in the background and reuse the cached
28
28
  pages later for faster follow-up reads
29
29
 
30
- ## ๐Ÿ“ฆ Install
30
+ ## ๐Ÿš€ Installation
31
31
 
32
- ```bash
32
+ ```sh
33
33
  pi install npm:pi-web-providers
34
34
  ```
35
35
 
36
- ## โš™๏ธ Configure
36
+ ## โš™๏ธ Configuration
37
37
 
38
38
  Run:
39
39
 
@@ -46,6 +46,12 @@ settings UI mirrors the three sections below: tools, providers, and settings.
46
46
 
47
47
  Each tool can be routed to any compatible provider:
48
48
 
49
+ Provider credentials can be literal values, environment variable names, or
50
+ `!command` references. pi-web-providers resolves those secrets lazily on the
51
+ first matching tool use, not when a session starts. This avoids startup delays
52
+ from password-manager commands such as `op`; missing or failing secrets are
53
+ reported when the tool is actually called.
54
+
49
55
  **Built-in local providers**
50
56
 
51
57
  | Provider | search | contents | answer | research | Auth |
@@ -62,7 +68,7 @@ Each tool can be routed to any compatible provider:
62
68
  | **Exa** | โœ” | โœ” | โœ” | โœ” | `EXA_API_KEY` |
63
69
  | **Firecrawl** | โœ” | โœ” | | | `FIRECRAWL_API_KEY` |
64
70
  | **Gemini** | โœ” | | โœ” | โœ” | `GOOGLE_API_KEY` |
65
- | **Linkup** | โœ” | โœ” | | | `LINKUP_API_KEY` |
71
+ | **Linkup** | โœ” | โœ” | | โœ” | `LINKUP_API_KEY` |
66
72
  | **Ollama** | โœ” | โœ” | | | `OLLAMA_API_KEY` |
67
73
  | **OpenAI** | โœ” | | โœ” | โœ” | `OPENAI_API_KEY` |
68
74
  | **Parallel** | โœ” | โœ” | | | `PARALLEL_API_KEY` |
@@ -143,6 +149,8 @@ investigations.
143
149
  When you ask more than one question, the response is grouped into per-question
144
150
  sections. Batch related questions when the answers belong together; split them
145
151
  into sibling calls when earlier independent answers can unblock the next step.
152
+ Collapsed results show a short answer preview; expand the tool result to read the
153
+ full answer.
146
154
 
147
155
  <details>
148
156
  <summary><strong>Parameters and behavior</strong></summary>
@@ -194,6 +202,8 @@ The built-in providers below integrate with official SDKs or documented APIs.
194
202
  - API: Brave Search API and Brave Answers API
195
203
  - Supports `web_search` via Web Search, plus optional `llm_context`, `news`, `videos`, `images`, and `places` search modes
196
204
  - Supports `web_answer` and `web_research` via Brave Answers streaming chat completions
205
+ - Uses the Answers API replacement for Brave's deprecated Summarizer API; answer and research search controls are sent through `web_search_options`
206
+ - Exposes the Answers `model` option (`brave` or `brave-pro`) for answer and research calls
197
207
  - `web_contents` stays routed to URL-fetch providers; Brave LLM Context is query-based retrieval and is exposed as a search mode instead
198
208
  - Brave Answers may require a different key or plan than Brave Search
199
209
 
@@ -312,6 +322,10 @@ scope, or account ID is usually wrong.
312
322
  `location`, `timeout`, and `scrapeOptions`
313
323
  - Exposes contents options such as `formats`, `onlyMainContent`, `includeTags`,
314
324
  `excludeTags`, `waitFor`, `headers`, `location`, `mobile`, and `proxy`
325
+ - Optional `baseUrl` overrides are supported for self-hosted Firecrawl
326
+ instances, proxies, and testing. API keys are required for Firecrawl Cloud,
327
+ but can be omitted for self-hosted endpoints that do not enforce
328
+ authentication.
315
329
 
316
330
  </details>
317
331
 
@@ -338,10 +352,17 @@ scope, or account ID is usually wrong.
338
352
  - SDK: `linkup-sdk`
339
353
  - Supports `web_search` via Linkup Search with fixed `searchResults` output
340
354
  - Supports `web_contents` via Linkup Fetch and always returns markdown
355
+ - Supports `web_research` via Linkup's async Research API
341
356
  - Exposes search options `depth`, `includeImages`, `includeDomains`,
342
357
  `excludeDomains`, `fromDate`, and `toDate`
343
358
  - Exposes contents options `renderJs`, `includeRawHtml`, and `extractImages`
344
- - Good fit for a simple search-plus-markdown setup without extra provider wiring
359
+ - Exposes research options `outputType`, `mode`, `reasoningDepth`,
360
+ `includeDomains`, `excludeDomains`, `fromDate`, `toDate`, and
361
+ `structuredOutputSchema`
362
+ - Research defaults to `sourcedAnswer`; provide `structuredOutputSchema` for
363
+ structured output
364
+ - Good fit for search, markdown extraction, and long-running sourced research
365
+ without extra provider wiring
345
366
 
346
367
  </details>
347
368
 
@@ -465,9 +486,15 @@ call.
465
486
  <summary><strong>Serper</strong></summary>
466
487
 
467
488
  - API: Serper HTTP API
468
- - Supports `web_search` via Serper's Google search endpoint
469
- - Good fit for fast, straightforward Google-style organic search results
470
- - Exposes search options `gl`, `hl`, `location`, `page`, and `autocorrect`
489
+ - Supports `web_search` via Serper's Google endpoints for web, image, video,
490
+ places, maps, reviews, news, shopping, product reviews, Lens, Scholar,
491
+ patents, autocomplete, and webpage results
492
+ - Good fit for fast, straightforward Google-style search results
493
+ - Exposes search options `mode`, `gl`, `hl`, `location`, `page`, `tbs`,
494
+ `autocorrect`, and mode-specific fields such as `url`, `ll`, `placeId`,
495
+ `cid`, `fid`, `productId`, `nextPageToken`, and webpage include flags.
496
+ Reviews mode uses the top-level query when no place identifier is provided.
497
+ `includeMarkdown` defaults to `true` for webpage scraping
471
498
  - Preserves rich metadata from Serper responses, including ranking position,
472
499
  sitelinks, attributes, and top-level response context such as
473
500
  `knowledgeGraph`, `answerBox`, `peopleAlsoAsk`, and `relatedSearches`
@@ -620,27 +647,12 @@ providers unless overridden in a provider's own `settings` block:
620
647
  | `retryDelayMs` | `2000` | Initial delay before retrying |
621
648
  | `researchTimeoutMs` | `1800000` | Maximum total time for an async `web_research` job (30 min) |
622
649
 
623
- ## ๐Ÿ”Ž Live smoke tests
624
-
625
- Use the opt-in live smoke runner to validate the configured providers with the
626
- same config-resolution and execution path the extension uses at runtime:
627
-
628
- ```bash
629
- npm run smoke:live
630
- ```
631
-
632
- Optional filters:
650
+ ## ๐Ÿงน Uninstall
633
651
 
634
- ```bash
635
- npm run smoke:live -- --provider gemini
636
- npm run smoke:live -- --tool contents
637
- npm run smoke:live -- --include-research
652
+ ```sh
653
+ pi remove npm:pi-web-providers
638
654
  ```
639
655
 
640
- The default run exercises `search`, `contents`, and `answer`. Research probes
641
- are excluded unless you pass `--include-research`, because they are slower and
642
- may incur higher provider cost.
643
-
644
656
  ## ๐Ÿ“„ License
645
657
 
646
658
  [MIT](LICENSE)