openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Add SpecStream as a search provider (search, contents and deep answers, own key)

Open Specstreamai opened this issue 3 weeks ago • 1 comments

Summary

I work on SpecStream, so treat this suggestion as coming from a vendor.

Add SpecStream as an opt-in search provider that uses the user's own key. It would serve all three TinySearch roles: search (ranked results), contents (page text for a list of URLs) and answer, where depth: "deep" could use a cited research report. This follows the same pattern as Tavily (#5780, #5782) and Exa (#5137).

Problem

People who already have a SpecStream key cannot use it in OpenHuman. Today the only provider that serves deep answers is gemini_deep_research, so a user without a Gemini key gets no deep answer route unless they use the managed backend.

Constraints:

  • Privacy: calls go straight from the user's machine to api.specstream.ai and never through the managed backend. Local-only mode blocks them, like the other direct providers.
  • No change to defaults. Managed search stays first. SpecStream is off until the user enables it, and it comes last in every role's provider order.

Solution (optional)

Scope is core and app, in two PRs, because the provider code now lives in tinysearch:

  1. tinysearch: a specstream provider.
    • search: GET https://api.specstream.ai/v1/web-search?q=... with a Bearer key. It returns title, url, snippet and a published date when the page states one.
    • contents: POST /v1/extract with {"urls": [...]}.
    • answer with depth: "deep": POST /v1/research, then poll GET /v1/research/{id}. The report text comes back with each cited sentence linked to its page.
    • A 402 (balance) or 429 (rate limit) maps to the error codes that already trigger fallback to the next provider.
  2. OpenHuman: [search] credential, encrypted key storage, OPENHUMAN_SPECSTREAM_API_KEY in the env overlay, the Settings > Search entry with the needs-key state, tool registration, i18n strings, the coverage matrix row and the web-search GitBook page. Bump tinysearch once a release has the provider.

Tests use local stand-ins for the API, as the Tavily and Exa tests do, so they make no network calls.

Docs for the three endpoints: https://specstream.ai/docs

If you would rather keep vendor providers out of core, or want the scope narrowed to search and contents only, say so and I will follow that.

Acceptance criteria

  • [ ] Provider selection: SpecStream appears in Settings > Search with a needs-key or configured state and an API key editor.
  • [ ] Direct routing: search, contents and research calls go directly to api.specstream.ai with the user's key and never through the managed backend.
  • [ ] Roles and fallback: with a key saved, the provider serves search, contents and deep answer, and balance or rate-limit errors fall back to the next provider in the role.
  • [ ] Key handling: the key works through config RPC, the env overlay, encrypted save and load, and clear and readback, with no plaintext in the config snapshot.
  • [ ] Defaults unchanged: the provider is disabled by default and last in every role's provider order.
  • [ ] Diff coverage ≥ 80%: the implementing PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by .github/workflows/ci-fast.yml).

Related

  • Tavily: #5780, #5782
  • Exa: #5137
  • You.com: #7135 (same kind of request, still open)

Specstreamai avatar Nov 14 '26 10:11 Specstreamai

Thanks for the detailed proposal, including the privacy and default-order constraints. Adding a new search provider is a product decision, and the work would span the tinysearch module and OpenHuman, so we've passed it to the maintainers. Please wait for their answer here before opening PRs.

M3gA-Mind avatar Nov 16 '26 16:11 M3gA-Mind