Skip to content

fix(opencode): guard reasoningSummary for azure in options()#21575

Open
jeanibarz wants to merge 1 commit intoanomalyco:devfrom
jeanibarz:fix/21237-azure-reasoning-summary-guard
Open

fix(opencode): guard reasoningSummary for azure in options()#21575
jeanibarz wants to merge 1 commit intoanomalyco:devfrom
jeanibarz:fix/21237-azure-reasoning-summary-guard

Conversation

@jeanibarz
Copy link
Copy Markdown

Issue for this PR

Closes #21237

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

ProviderTransform.options() sets reasoningSummary = "auto" for all gpt-5 models unconditionally. The textVerbosity parameter in the same block already has && input.model.providerID !== "azure", but reasoningSummary does not. This adds the same guard.

Scope note: ProviderTransform.variants() also sets reasoningSummary for Azure variants — that's left intentional. The existing test at line 2372 ("standard azure models return custom efforts with reasoningSummary") explicitly expects it, and the default Azure path uses sdk.responses() which tolerates the parameter. This PR only fixes the asymmetric default in options(), which fires unconditionally regardless of API path.

How did you verify your code works?

  1. Wrote a verification script that imports the real ProviderTransform module (not mocks) and exercises options(), variants(), and providerOptions() with Azure model configs matching the repo's models-api.json fixtures. Confirmed:

    • options() no longer sets reasoningSummary for Azure gpt-5 models
    • variants() still does (intentional, tested by maintainers)
    • providerOptions() wrapping correctly reflects the change
  2. Unit tests added and all 123 existing transform.test.ts tests pass:

    cd packages/opencode && bun test -- test/provider/transform.test.ts
    
  3. Could not run the full repo-wide bun typecheck locally — it fails on pre-existing Buffer type errors in unrelated files (clipboard.ts, cross-spawn-spawner.ts, db.node.ts, filesystem.ts). These same errors exist on a clean checkout of upstream/dev with bun@1.3.11. CI should pass as it uses a different environment.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Azure OpenAI rejects reasoningSummary as an unknown parameter.
The textVerbosity guard already excludes azure but reasoningSummary
in the same block did not — align them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

The following comment was made by an LLM, it may be inaccurate:

The search results show PR #21575 (the current PR itself) and two potentially related historical PRs that dealt with reasoningSummary issues, but neither are duplicates of the current PR:

No duplicate PRs found

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant