Skip to content

fix(tools): fall back when a tool file mime_type is None - #45369

Open
alexrain wants to merge 1 commit into
langgenius:mainfrom
alexrain:fix/tool-file-mime-none
Open

alexrain wants to merge 1 commit into
langgenius:mainfrom
alexrain:fix/tool-file-mime-none

Conversation

@alexrain

@alexrain alexrain commented Nov 3, 2026

Copy link
Copy Markdown

Fixes #45086.

A tool file whose meta contains mime_type: None kept the None through
esponse.meta.get('mime_type', fallback), because the key exists and get returned None instead of the default. The binary extractor now falls back for IMAGE_LINK/IMAGE/BINARY_LINK, BLOB and LINK messages. Added a regression test covering all three paths.

@github-actions github-actions Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: A tool file with meta mime_type=None crashes agent file extraction with a ValidationError

1 participant