Repository navigation
fix(docscout): assemble requests within model context budgets - #83
Merged
Merged
Conversation
Merged
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.
Supersedes #61.
Docscout batches and selects document content against the resolved model card's context length minus reserved output. One documented estimate includes message framing, schemas and tools with a 25% safety margin. Oversized items do not block later smaller evidence, and requests known to exceed that estimate are rejected before dispatch. This covers mapping, summaries, generated contexts, scout turns, Deep, highlights, extraction, verification and embeddings.
Exhausted context and provider input-length rejections return non-retryable
context_budget_exceedederrors. Partial context adds an informationalcontext_budget_partialcode without changing verification or rejection counts. Partial outlines are rebuilt instead of cached, and a failed support batch affects only its own fields. The UI distinguishes budget outcomes from document absence; its static assets rebuild through the make target.Selected agents retain ownership of their conversation. Docscout passes complete instructions and user messages, rejects an instruction that exceeds available input, bounds each returned document-tool result to one quarter of available input with a truncation marker, and maps returned provider length errors. Unknown limits preserve request assembly and options. Provider tokenization can differ from the estimate.
Existing stored results remain readable; no setting, endpoint, registry identity or data shape is removed. Oversized requests can select less evidence or use more calls, increasing cost and latency.
Validation: