|
|
@@ -832,7 +832,16 @@ export namespace ProviderTransform {
|
|
|
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"
|
|
|
+ // Only inject reasoningSummary for providers that support it natively.
|
|
|
+ // @ai-sdk/openai-compatible proxies (e.g. LiteLLM) do not understand this
|
|
|
+ // parameter and return "Unknown parameter: 'reasoningSummary'".
|
|
|
+ if (
|
|
|
+ input.model.api.npm === "@ai-sdk/openai" ||
|
|
|
+ input.model.api.npm === "@ai-sdk/azure" ||
|
|
|
+ input.model.api.npm === "@ai-sdk/github-copilot"
|
|
|
+ ) {
|
|
|
+ result["reasoningSummary"] = "auto"
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Only set textVerbosity for non-chat gpt-5.x models
|