ai icon indicating copy to clipboard operation
ai copied to clipboard

Multimodal toModelOutput improvement with image als urls.

Open lewwe1 opened this issue 1 year ago • 7 comments

Description

Hi,

do you think of adding url support for media types for LanguageModelV2ToolResultOutput type used in the toModelOutput of a tool.

Currently only base64 is supported for multi-modal output.

Would be great if we can directly pass image urls from a cloud storage bucket to the LLMs from a tool result. Same as we can do so with Image or File Parts from the UIMessage or ModelMessage

AI SDK Version

ai: 5.0.70

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

lewwe1 avatar Oct 20 '25 10:10 lewwe1

Yes, it will be very useful. and a possibility to pass image details param for openai

olegsubbly avatar Nov 01 '25 12:11 olegsubbly

+1

ilirien avatar Nov 03 '25 10:11 ilirien

this will be supported in language model v3

lgrammel avatar Nov 03 '25 10:11 lgrammel

Amazing! Thanks Lars and co :)

lewwe1 avatar Nov 03 '25 12:11 lewwe1

@lgrammel great.

Already saw it in v6, but only for anthropic now. If somebody needs it.

olegsubbly avatar Nov 03 '25 13:11 olegsubbly

i added support for google in #9963

songkeys avatar Nov 03 '25 15:11 songkeys

Identify issue type

{
  "evidence": [
    "Reporter asks whether URL support can be added for media types in `LanguageModelV2ToolResultOutput` used by `toModelOutput`.",
    "They state current multimodal tool output only supports base64 and request passing image URLs from cloud storage to LLMs.",
    "Comments agree it would be useful, and a maintainer says it will be supported in language model v3."
  ],
  "rationale": "The issue requests an API capability/ergonomics improvement for multimodal tool result outputs, not a concrete failure of existing documented behavior.",
  "type": "feature",
  "confidence": "high"
}

lgrammel avatar Jul 02 '26 09:07 lgrammel