Repository navigation
fix(web): let web_fetch read past a truncated page - #2230
Merged
Merged
Conversation
A page longer than the fetch limit was cut with a bare "[Content truncated]" and no way to read further. Models often missed the cut and reported that the rest of the page did not exist. web_fetch takes an offset, and the cut now names the offset to continue from. Keyless, Keenable and Parallel share the same window helper.
|
@tc3oliver is attempting to deploy a commit to the Inbox Zero Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issues were found. Summary
Both earlier, unnumbered findings are addressed: Parallel drops the skipped prefix before the byte limit, and
|
Parallel now drops the skipped prefix before the transport's size limit. Keenable has no offset, so a window past its readable range is refused with a clear error. The fake provider honours offset too.
Contributor
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Contributor
Playwright screenshotsFeature frames for this PR:
Open screenshot gallery · Dashboard · CI run Updated for commit |
Co-authored-by: Elie Steinbock <[email protected]> # Conflicts: # packages/adapters/src/keyless-http-web.ts
An unbounded offset let a caller skip past what the next read can return, and the cut line still told the model to continue there. Offset now stops at the keyless page cap. A cut names the next offset when that read is still allowed, and says the read limit was reached when it is not. Keenable returns the characters that still fit in its first 100000 instead of failing a window that overlaps that range. Co-authored-by: Elie Steinbock <[email protected]>
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.
Why
web_fetchreturns at most 50,000 characters (8,000 by default) and cuts longer pages with a bare[Content truncated]. There was no way to read the rest. Models took the cut for the end of the page and reported later sections of long release notes and advisories as missing.What changed
web_fetchgains an optionaloffset. A cut now reads[Content truncated; continue with offset 8000]. The keyless, Keenable and Parallel providers share one helper for the window. Parallel drops the skipped text before the result size limit. Keenable has no offset of its own, so it reads the first 100,000 characters at most and refuses a window past that with a clear error.New model-facing text (no UI copy): the
offsetdescription "Characters to skip, to read on after a truncated fetch (default 0)" and the cut line above. The model needs both to know it can continue and from where.How tested
Tests read a long page in windows through the keyless provider, read a Parallel window past the 1 MB result limit, and check the Keenable request size and read limit; they fail without the change. The other web tests are updated for the new cut line. Typecheck and Biome pass. The unit suite passes except the backup-script and desktop-preparation tests, which fail the same way without this change on macOS.