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
reasoningSummary injected for gpt-5 models on @ai-sdk/openai-compatible providers causes litellm errors #22350
When using @ai-sdk/openai-compatible provider (e.g. LiteLLM proxy) with GPT-5.x models, opencode auto-injects reasoningSummary: "auto" into provider options. LiteLLM does not recognize this parameter and returns:
In packages/opencode/src/provider/transform.ts, the options() function checks input.model.api.id.includes("gpt-5") and unconditionally sets reasoningSummary: "auto" regardless of the npm provider package:
if(input.model.api.id.includes("gpt-5")&&!input.model.api.id.includes("gpt-5-chat")){if(!input.model.api.id.includes("gpt-5-pro")){result["reasoningEffort"]="medium";result["reasoningSummary"]="auto";// <-- injected for ALL providers}}
The variants() function correctly scopes reasoningSummary to only @ai-sdk/openai, @ai-sdk/azure, and @ai-sdk/github-copilot — but options() does not.
Why it can't be worked around via config
Setting "reasoningSummary": null in model options does not help — mergeDeep (remeda) preserves null, and @ai-sdk/openai-compatible sends it in the request body.
Setting "reasoningSummary": undefined does not help — mergeDeep skips undefined, so the base value "auto" remains.
There is no config-level way to delete a key injected by the base options().
Expected Behavior
reasoningSummary should only be injected for providers that support it (@ai-sdk/openai, @ai-sdk/azure, @ai-sdk/github-copilot), consistent with how variants() already handles this.
Suggested Fix
Wrap the reasoningSummary assignment in options() with a provider check:
Activity
github-actions commentedon Apr 13, 2026
This issue might be a duplicate of existing issues. Please check:
reasoningSummaryinjected foropenai-compatibleproviders, should be guarded liketextVerbosityUnknown parameter: 'reasoningSummary'for GPT-5.x modelsnazarhnatyshen commentedon Apr 13, 2026
Closing as duplicate of #21237 and #18882
fix(provider): guard reasoningSummary for openai-compatible providers