feat(sdk): return native image content blocks from read_file#1163
Merged
Sydney Runkle (sydney-runkle) merged 11 commits intomainfrom Feb 11, 2026
Merged
feat(sdk): return native image content blocks from read_file#1163Sydney Runkle (sydney-runkle) merged 11 commits intomainfrom
Sydney Runkle (sydney-runkle) merged 11 commits intomainfrom
Conversation
james8814
pushed a commit
to james8814/deepagents
that referenced
this pull request
Mar 1, 2026
…in-ai#1163) note: ported from harbor setup - `read_file` now natively supports image files (`.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`) in `libs/deepagents`. - For image paths, it returns a `ToolMessage` multimodal content block in standard format: - `{"type":"image","base64":"...","mime_type":"..."}` - Applied to both sync and async `read_file` paths. - Added tests for: - successful image block output - backend download failure error handling - No backend protocol/interface changes were required (`download_files`/`adownload_files` already provide bytes). --------- Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com> Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev>
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.
note: ported from harbor setup
Summary
read_filenow natively supports image files (.png,.jpg,.jpeg,.gif,.webp) inlibs/deepagents.ToolMessagemultimodal content block in standard format:{"type":"image","base64":"...","mime_type":"..."}read_filepaths.download_files/adownload_filesalready provide bytes).