docs(rfc): add RFC-0059 image attachment normalization - #13
Closed
Million-mo wants to merge 1 commit into
Closed
Conversation
Proposes inserting the existing resize_image_if_needed() normalization (the read tool / fsspec toolset path, Pillow-based, default 2000px / 4.5MB) into the protocol user-upload conversion points: Python API run_agent, ACP attachments, and OpenCode server FilePartInput. Distinct failure semantics for user input vs tool-result over-limit; model failure behavior based on opencode's image.ts reference. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Owner
Author
|
Superseded by wolf1069b#375 — the RFC should land on the origin repo (wolf1069b/wolfharness), not the Million-mo/agentpool fork. |
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.
Summary
Adds RFC-0059: Image Attachment Normalization (DRAFT), which proposes inserting the existing
resize_image_if_needed()normalization into the protocol user-upload path.Context
AgentPool already normalizes images on the tool-read path:
resize_image_if_needed()insrc/wolfharness_toolsets/fsspec_toolset/image_utils.py(Pillow-based, default 2000px / 4.5MB) is wired intoreadtool and the fsspec toolset.However, the protocol user-upload paths bypass it entirely:
run_agent(image_url=...)→ImageUrlImageContentBlock/BlobResourceContents→BinaryImageFilePartInput→BinaryContent.from_data_uri()Oversized field photos (4000×3000px, 10–20MB) get forwarded to the model unchanged, risking context overflow and opaque provider errors.
What the RFC proposes
resize_image_if_needed()rather than building a new resizerFilePart → pydantic-ai contentconversion points across all three protocol entriesattachment.image.{auto_resize, max_width, max_height, max_base64_bytes})Files
docs/rfcs/draft/RFC-0059-image-attachment-normalization.md(new, 477 lines)Note
Following repo convention, STATUS.md is maintained separately from individual RFC commits (per RFC-0058 precedent) — not touched in this PR.
Reviewers
@yuchen.liu (pending)