WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Type mismatch between File UIMessageChunk and FileUIPart #10735

@lisahakanzon

Description

@lisahakanzon

Description

Hello! 🌞

I'm wondering why the UIMessageChunk for type 'file' does not include 'filename' (see here) while the FileUIPart (see here) does? 😊

I'm creating a tool that creates a file and thus wanted to write the created file to the stream, including a filename, which was not possible:

... (
  writer: UIMessageStreamWriter<CustomUIMessage>
): {
  writer.write({
    type: 'file',
    url,
    mediaType,
    // filename: '' // not supported in type
  })
}

What's the reason for the UIMessageChunk not including filename? 😊 Would it be possible to add? 🙏

AI SDK Version

  • ai: 5.0.72,
  • @ai-sdk/react: 2.0.75,
  • @ai-sdk/azure: 2.0.53

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions