Skip to content

[pull] main from danny-avila:main#129

Merged
pull[bot] merged 1 commit into
innFactory:mainfrom
danny-avila:main
Jul 3, 2026
Merged

[pull] main from danny-avila:main#129
pull[bot] merged 1 commit into
innFactory:mainfrom
danny-avila:main

Conversation

@pull

@pull pull Bot commented Jul 3, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…gurable chunking (#284)

* fix: bound rerank API calls with a timeout and wire topResults to the reranker

Rerank requests (Jina/Cohere) were the only network calls in the web
search pipeline without a timeout, so a hung rerank API could stall the
whole tool; they now default to 10s, configurable via the new
`rerankerTimeout` option on `SearchToolConfig`.

Also passes the configured `topResults` through to `getHighlights` —
previously it was destructured but never forwarded, so the reranker
always used its default of 5 highlights per source regardless of config.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZgqWvb3opKJp67YNPgbPg

* feat: configurable reranker chunk size for web search highlights

Scraped content is split into 150-char chunks (50 overlap) before
reranking, so a source at the 50,000-char cap becomes ~500 rerank
documents — the dominant per-search rerank cost (6 Cohere search units
per source). Highlights are then expanded ±300-450 chars anyway, so the
tiny chunks buy little precision.

Adds `chunkSize`/`chunkOverlap` options (env: `SEARCH_CHUNK_SIZE`,
`SEARCH_CHUNK_OVERLAP`) so hosts can tune this; measured on real scrape
fixtures, 500/100 cuts rerank documents ~3.5x and Cohere billing to
2 units per source. Defaults are unchanged (150/50) pending a live
quality comparison. Overlap is clamped below chunk size, which the
splitter would otherwise reject.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZgqWvb3opKJp67YNPgbPg

---------

Co-authored-by: Claude <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jul 3, 2026
@pull pull Bot added the ⤵️ pull label Jul 3, 2026
@pull
pull Bot merged commit 49f2b57 into innFactory:main Jul 3, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants