You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AI SDK chat requests drop configured provider options #13371
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.
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.
Activity
bunnysayzz commentedon Oct 13, 2026
Root cause is in the
AiSdkApichat completion path.On main (
5522c6f),chatCompletionNonStream(and the streaming path) builds the request options for the AI SDK provider but does not forwardproviderOptionsfrom theCompletionOptions/ config object to the underlying SDK call. ThegenerationConfigfor Google arrives empty becausethinkingConfigand 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.
bunnysayzz commentedon Oct 18, 2026
looks like #13376 already has this covered, dropping my claim.