Repository navigation
fix: compact instead of failing when the pre-send context check trips #1807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anandgupta42
wants to merge
39
commits into
main
Choose a base branch
from
fix/context-guard-matches-compaction
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,688
−51
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
cd54548
fix: compact instead of failing when the pre-send context check trips
anandgupta42 3787e24
fix: compact in place on a pre-send refusal; bound the calibrated mea…
anandgupta42 6bda81f
fix: recoverable message on a compacting refusal; tighter usage floor
anandgupta42 622f1a7
fix: address review of the context guard calibration
anandgupta42 4bfda4d
fix: replay the prompt on a turn-start refusal; keep echo recovery
anandgupta42 2f94162
fix: size the unmeasured tail with the guard's conservative estimator
anandgupta42 a425fe9
fix: treat an input-plus-reservation provider error as an overflow
anandgupta42 761bd28
fix: keep media turns explicit; environment-independent guard tests
anandgupta42 ec8edeb
fix: media check covers the whole turn; echo refusals are not compact…
anandgupta42 5392b42
fix: protect unseen tool-result media; trust usage only from tool steps
anandgupta42 4454131
fix: block compaction only for media the model has not seen
anandgupta42 f108190
refactor: explicit directive init; if/else for the refusal error
anandgupta42 5a9fe5c
fix: distrust reported usage far below the estimate
anandgupta42 4ddb528
fix: no compaction when the new content alone fills the window
anandgupta42 9a84ce8
fix: the oversize-tail rule leaves room for the response floor
anandgupta42 89bf33c
fix: oversize-tail check uses the input limit as is and counts only n…
anandgupta42 1468a6d
fix: tag tool-less requests instead of guessing; drop the oversize-ta…
anandgupta42 e9ac304
fix: add attachment allowances to the calibrated measure instead of d…
anandgupta42 43f522d
fix: tag deadline-finalization requests as sent without tools; pin th…
anandgupta42 3329c5b
fix: inherited deadline tagging; narrow the input-plus-reservation ov…
anandgupta42 ca66c30
fix: the guard's calibration tail counts tool-call inputs of later steps
anandgupta42 5202805
refactor: drop the provider input-plus-reservation pattern; share the…
anandgupta42 c1f6985
fix: account for request overhead in context calibration
anandgupta42 3e84d94
fix: use the filtered tool set only for the overhead estimate
anandgupta42 5082b82
fix: calibrate context guards using finalized requests
anandgupta42 aa59ce3
fix: calibrate context guard from full request estimate growth
anandgupta42 e41271d
fix: keep guard estimates lazy and share the metadata key
anandgupta42 2974cdb
fix: remove context guard leftovers and cover recovery paths
anandgupta42 0dac29a
fix: clarify attachment refusals and count retried directives once
anandgupta42 838c267
fix: word the media refusal for tool-returned images too
anandgupta42 e628fb7
fix: name the input limit in the media refusal message
anandgupta42 d516552
refactor: drop a redundant id check in the unseen-media scan
anandgupta42 c5d2a7e
docs: correct the context-measure comments
anandgupta42 7daeeca
docs: describe media allowances accurately in the clamp comment
anandgupta42 dc047e5
fix: avoid overestimating recursive file listings
anandgupta42 99049b6
fix: verify measured request content before reuse
anandgupta42 52555e9
test: record all observed fixture attachments
anandgupta42 a8450d4
fix: protect unseen media after a model switch
anandgupta42 966b9a4
fix: size the prepared provider request
anandgupta42 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.