-
Notifications
You must be signed in to change notification settings - Fork 25
refactor(api_client): unify get_bytes behind CalloutClient #492
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
leseb
wants to merge
6
commits into
praxis-proxy:main
Choose a base branch
from
leseb:leseb/fix-issue-454-core-bump
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.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f9ce775
refactor(api_client): unify get_bytes behind CalloutClient (#454)
leseb 2251cad
Merge remote-tracking branch 'origin/main' into leseb/fix-issue-454-c…
leseb b84b635
Merge remote-tracking branch 'origin/main' into leseb/fix-issue-454-c…
leseb 1f7ee02
Merge remote-tracking branch 'origin/main' into leseb/fix-issue-454-c…
leseb 8982096
Merge remote-tracking branch 'origin/main' into leseb/fix-issue-454-c…
leseb 539a863
fix(file_resolve): box internal futures to avoid large_stack_frames
leseb 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
Some comments aren't visible on the classic Files Changed page.
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Medium] Behavioral change in memory bounding: the old
read_bounded_bodyrejected responses chunk-by-chunk at the per-requestmax_byteslimit, so peak allocation was bounded tomax_bytes. Now,CalloutClient::read_bodycollects the full response up tomax_response_bytesbefore this post-collection check runs.In
openai_file_resolve,max_response_bytesis set tomax_body_bytes(default 64 MiB) whilemax_content_bytespassed here fromfetch_contentcan be much smaller (derived from the per-file resolution budget). A backend returning a response larger than the per-file budget but within 64 MiB will now be fully collected before rejection, whereas the old code would halt at the per-file limit.The PR description and doc comments document this tradeoff clearly, so this is noted for the record rather than as a requested change. If per-file budgets are typically orders of magnitude smaller than
max_body_bytes, a future optimization could set a tightermax_response_byteson a per-download basis.