Repository navigation
feat(research): add opt-in Spicrawl markdown and PDF provider - #119
Merged
Merged
Conversation
Signed-off-by: debpalash <4178343+debpalash@users.noreply.github.com>
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Builds on the Firecrawl implementation merged in #118. This PR targets
mainand contains Spicrawl's additions and the requested sponsor README update.Operators can opt into Spicrawl page/PDF-to-markdown reads for research columns with
SPICRAWL_API_KEY. An unset key preserves the browser fetch pipeline. With a keyed search engine also configured, research can run without the browser sidecar.Default requests use main-content markdown, PDF parsing, no link extraction or JavaScript rendering, and a one-credit ceiling. Explicit JavaScript calls cap at three credits. The client exposes selector options and billing metadata; research previews stay bounded to 2,000 Unicode characters.
The README adds the strategic-sponsor wordmark, tracked official signup/pricing links, and the published free-beta allowance. Demo GIF sections remain expanded. No additional OpenGTM-exclusive bonus is asserted without approved offer details.
Type
Validation
go vet ./....go test -race -p 2 ./internal/leadweb ./internal/config ./internal/api ./cmd/worker ./internal/aicol.The full
make testcheck reaches the same existing macOS/ARM one-ULP assertion failure ininternal/provaccuracy/TestNormalizeMatchFreshnessas #118 and the untouched merged baseline. All other Go unit packages passed; frontend checks were run separately. PostgreSQL/Redis integration checks are left to CI.Local HTTP fixtures cover markdown/PDF handling, request flags, target status/credit validation, cost ceilings, response and preview limits, redirects, and private/mixed-DNS rejection. Worker tests exercise Spicrawl-only and combined API-only research plus credential-specific client reuse. No paid live requests were made.
Security-sensitive?
Yes: authenticated outbound fetches and LLM page content. The API endpoint is fixed, provider credentials stay in bearer headers and redacting types, and API redirects cannot replay credentials or target URLs. Target syntax and DNS are checked before handoff; the service remains responsible for its remote DNS and redirect hops.
Platform HTTP 200 is insufficient: target status must be 2xx, credits must be valid and within the requested ceiling, and content must be nonempty UTF-8 markdown/plain text within 4 MiB. Invalid metadata and coerced JSON/HTML responses fail closed. No automatic paid retries or JavaScript escalation are added. Provider credits remain separate from the LLM token budget. See
docs/providers/spicrawl.md.