Skip to content

[Bug] reasoningSummary injected for Azure/openai-compatible providers — should be guarded like textVerbosity #21237

@Dulani

Description

@Dulani

[Authorship: 80% AI, 20% human]

Description

In transform.ts, reasoningSummary = "auto" is set for all gpt-5 models (line ~829) with no Azure guard. The textVerbosity parameter has an Azure guard (input.model.providerID !== "azure" on line ~838), but reasoningSummary does not.

Impact

Azure OpenAI rejects reasoningSummary as an unknown parameter. This is currently masked when using useResponses: true (which routes through the copilot Responses SDK), but will break if that path changes.

Evidence

// transform.ts ~line 826
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"   // ← NO Azure guard here
  }
  if (
    input.model.api.id.includes("gpt-5.") &&
    !input.model.api.id.includes("codex") &&
    !input.model.api.id.includes("-chat") &&
    input.model.providerID !== "azure"    // ← textVerbosity IS guarded
  ) {
    result["textVerbosity"] = "low"
  }
}

Proposed Fix

Add && input.model.providerID !== "azure" to the reasoningSummary block (lines 827-830), or use input.model.api.npm !== "@ai-sdk/openai-compatible" to match existing patterns elsewhere in the codebase.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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