Skip to content

Add support for video urls correctly #383

@lws803

Description

@lws803

I'm trying to videos to gemini 3 / gemini 2.5 flash models through Open Router ai sdk and have been encountering an issue:

File is not a PDF.

Taking a look at the code, https://github.com/OpenRouterTeam/ai-sdk-provider/blob/main/src/chat/convert-to-openrouter-chat-messages.ts#L110-L168 it seems we treat all video files as generic files instead of following the standard here from https://openrouter.ai/docs/guides/overview/multimodal/videos.

Are there any plans to add a case here for video support?

Additional info:
I'm on the latest package version 2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions