[pull] main from danny-avila:main#129
Merged
Merged
Conversation
…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>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )