Skip to content

AI SDK chat requests drop configured provider options #13371

Open

Description

@fhgffy

Configured AI SDK providerOptions are silently ignored for chat requests.

On main (5522c6f), construct AiSdkApi for google/gemini-2.5-flash with providerOptions: { google: { thinkingConfig: { thinkingBudget: 128, includeThoughts: true } } }, then call chatCompletionNonStream. The generated request has an empty generationConfig; both thinking options are missing. The streaming path also omits the options when calling streamText.

I reproduced this with the real Google SDK and a local mock fetch response. Calling the SDK directly with the same options produces generationConfig.thinkingConfig with both values.

I plan to pass the configured provider options to chat generation and add regressions that check the actual SDK request bodies.

Activity

  1. bunnysayzz commented on Oct 13, 2026

    @bunnysayzz

    Root cause is in the AiSdkApi chat completion path.

    On main (5522c6f), chatCompletionNonStream (and the streaming path) builds the request options for the AI SDK provider but does not forward providerOptions from the CompletionOptions / config object to the underlying SDK call. The generationConfig for Google arrives empty because thinkingConfig and other provider-specific keys are never merged in.

    The fix is to pass providerOptions (or the equivalent field) through to the AI SDK call options when they are present in the model config.

    TypeScript repo — cannot build on this container. Posting the root cause and fix plan here; will raise the PR from a Node environment.

  2. bunnysayzz commented on Oct 18, 2026

    @bunnysayzz

    looks like #13376 already has this covered, dropping my claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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