Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: keep requests under the endpoint byte limit by stripping oldest images#281

Open
mlikasam-askui wants to merge 2 commits into
main from
feat/request-byte-budget-truncation
Open

feat: keep requests under the endpoint byte limit by stripping oldest images #281
mlikasam-askui wants to merge 2 commits into
main from
feat/request-byte-budget-truncation

Conversation

@mlikasam-askui

@mlikasam-askui mlikasam-askui commented Jun 2, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Strip oldest base64 images from history when a request would exceed the endpoint's ~30 MB byte limit. Adds request-size estimation, a per-provider max_request_bytes, and budget enforcement in SummarizingTruncationStrategy (skipped when no limit is defined).

Jira: SOLENG-369

provider_options: dict[str, Any] | None = None,
) -> MessageParam:
estimated_bytes = estimate_messages_bytes(messages)
if estimated_bytes > ANTHROPIC_MAX_REQUEST_BYTES:

@programminx-askui programminx-askui Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that we estimate the Request side. I would prefere to deal with the Error. And then do the Truncation strategy.

Otherwise we don't know if the LLM Provider is inceasing theire 30 MB Limit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@programminx-askui programminx-askui programminx-askui requested changes

@philipph-askui philipph-askui Awaiting requested review from philipph-askui

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /