Skip to content

SDK does not support 'file' type messages as indicated by example #198

@tortis

Description

@tortis

The example found here for attaching a PDF does not work.
https://openrouter.ai/docs/guides/overview/multimodal/pdfs#using-pdf-urls

It produced a typescript error:

1. No overload matches this call.
     Overload 3 of 3, '(request: SendChatCompletionRequestRequest, options?: RequestOptions | undefined): Promise<SendChatCompletionRequestResponse>', gave the following error.
       Type '"file"' is not assignable to type '"input_video" | "video_url" | "text" | "image_url" | "input_audio"'. [2769]

If I force past the typescript error, I get an error back from the OpenRouter API:
OpenRouter API error: Input validation failed: ...

Is it possible to send PDF files via the SDK currently?

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