Skip to content

Investigate support for images in ToolCallResult #9432

Open
@anakin87

Description

@anakin87

Currently, providers that expose a tool role for messages (OpenAI, Gemini, Ollama) do not support images in the tool result.

Conversely, Anthropic has no tool role and requires tool results to be included in a user message, which can contain images. Since multimodal support in Amazon Bedrock is mostly based on Anthropic, Bedrock supports this use case as well. For a Bedrock example, see deepset-ai/haystack-experimental#307 (comment).

Supporting this use case would require refactoring our ToolCallResult dataclass.
If more model providers begin to allow this pattern, we should investigate and evaluate this refactoring.

This doesn't currently seem like a high priority, because a simple workaround is to create a user message with the image returned by the tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority, leave it in the backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions