feat: support multimodal tool outputs (text + image)#4954
Open
tpirc3 wants to merge 6 commits intolivekit:mainfrom
Open
feat: support multimodal tool outputs (text + image)#4954tpirc3 wants to merge 6 commits intolivekit:mainfrom
tpirc3 wants to merge 6 commits intolivekit:mainfrom
Conversation
2cf3d85 to
524d69f
Compare
1ec2497 to
de38547
Compare
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
FunctionCallOutput.outputto supportImageContentandlist[str | ImageContent]supports_tool_image_outputto support Qwen-compatible providers that accept tool image contentWhy
This PR implements the approach proposed in #4893 for multimodal tool outputs.
Concretely, it carries the issue proposal through the shared normalization layer and provider formatters, using native image tool-output payloads where supported and explicit text fallback where not.
Resolves #4893.
Tests
make checkuv run pytest tests/test_tool_output_multimodal.py tests/test_chat_ctx.py tests/test_tools.py -q