Skip to content

Support openai image detail parameter #493

Description

@zivni

The openai detail parameter is supported by the open ai provider: https://ai-sdk.dev/providers/ai-sdk-providers/openai#image-detail.

Bu when adding it to the openrouter provided it's omitted from the request.

I tried it like in the openai provider just with changing from openai to openrouter:

providerOptions: {
    openrouter: { imageDetail: 'low' },
},

Why not just pass the parameters as is to the provider, so there will be no need to add support for each new parameter?

Something like:

providerOptions: {
    openrouter: {
        openai: {
            detail: 'low'
        }
    },
}

or even:

providerOptions: {
    openrouter: {
        provider_parameters: {
            detail: 'low'
        }
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions