Skip to content

fix(provider): skip reasoningEffort for azure gpt-5.5 - #1148

Merged
Astro-Han merged 2 commits into
devfrom
claude/r3-3-azure-gpt55
Jun 3, 2026
Merged

Astro-Han merged 2 commits into
devfrom
claude/r3-3-azure-gpt55

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jun 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

ProviderTransform.options adds reasoningEffort: "medium" to any model whose api id contains gpt-5 (excluding gpt-5-chat/gpt-5-pro). Azure's gpt-5.5 matches that block, but Azure's completions API rejects the reasoningEffort parameter, so the request fails and the provider is unusable.

This adds an early-return guard: for @ai-sdk/azure models whose id contains gpt-5.5, set only reasoningSummary: "auto" and return before the shared gpt-5 block runs.

No local issue — this is an upstream-port fix.

Why

Without the guard, Azure gpt-5.5 users get a hard provider error on every request. The fix is the smallest adaptation of the upstream change to current dev (line numbers drifted; logic re-proven against the current gpt-5 block).

Related Issue

None. Ports upstream anomalyco/opencode#26222 (thanks @frederiknsgo).

Human Review Status

Pending

Review Focus

Guard placement and predicate: it sits after the enable_thinking blocks and before the shared gpt-5 block, keyed on api.npm === "@ai-sdk/azure" && api.id.includes("gpt-5.5"). Confirm it does not shadow other Azure gpt-5.x models (only gpt-5.5 is matched) and that returning early is correct (no later block in options applies to this case).

Risk Notes

Behavior change is scoped to Azure gpt-5.5 only; all other providers/models keep their existing options.

Known pre-existing limitation (out of scope, not a regression from this change): ProviderTransform.variants() still returns reasoningEffort entries for Azure gpt-5.5 reasoning variants, and session/llm.ts merges the selected variant's options after ProviderTransform.options(...). So if a user explicitly selects a reasoning-effort variant for Azure gpt-5.5, reasoningEffort is reintroduced and Azure still rejects it. The upstream fix (anomalyco/opencode#26222) has the same scope and also leaves the variant path untouched. Closing the variant path requires a product decision about whether Azure gpt-5.5 should expose reasoning-effort controls at all, plus a change at the out-of-scope merge site — tracked separately rather than expanded into this minimal port.

Skipped conditional checklist items:

  • UI/copy item — no visible UI or copy changed (server-side provider options only).
  • Platform item — no platform, packaging, updater, signing, paths, shell, or permissions surface touched.
  • Docs/release/deps item — no docs, dependencies, generated files, or local file surfaces touched.

How To Verify

Red→green (worktree): with guard removed, new test fails — result.reasoningEffort === "medium"; with guard, it is undefined and reasoningSummary === "auto".
bun test test/provider/transform.test.ts: 205 pass, 0 fail
bun test (packages/opencode, full): 3669 pass, 9 skip, 1 todo, 0 fail (273 files)
bun run typecheck (turbo, all 9 packages): 8 successful, 0 errors

Screenshots or Recordings

N/A — no visible UI change.

Checklist

  • Type label — this PR carries exactly one of bug, enhancement, task, documentation.
  • Routing labels — this PR carries at least one of app, ui, platform, harness, ci.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason>.
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings. Leave unticked only if no visible UI or copy changed.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant. Leave unticked only if none of those surfaces was touched.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

Azure's gpt-5.5 completions API rejects the `reasoningEffort` parameter, but the model id matches the shared gpt-5 block in ProviderTransform.options and gets `reasoningEffort: "medium"`, which breaks the provider. Add an early-return guard for @ai-sdk/azure gpt-5.5 that sets only `reasoningSummary: "auto"`.

Ports upstream anomalyco/opencode#26222 (thanks @frederiknsgo).
@Astro-Han Astro-Han added the bug Something isn't working label Jun 3, 2026
@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 40 minutes and 26 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a852e011-2285-45a9-a6bf-a98b9eedc807

📥 Commits

Reviewing files that changed from the base of the PR and between 8a590e7 and ac9cf12.

📒 Files selected for processing (2)
  • packages/opencode/src/provider/transform.ts
  • packages/opencode/test/provider/transform.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/r3-3-azure-gpt55

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added harness Model harness, prompts, tool descriptions, and session mechanics P2 Medium priority labels Jun 3, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested priority: P2 (includes non-doc, non-test paths outside the low-risk bucket).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a special case for Azure's gpt-5.5 completions API in ProviderTransform.options to set reasoningSummary to "auto" and return early, preventing reasoningEffort from being set. It also adds a corresponding unit test. Feedback suggests avoiding the early return to prevent future-proofing risks by consolidating the logic inside the existing gpt-5 block, and adding additional test cases for other Azure gpt-5 models to ensure they still correctly receive the default reasoningEffort value.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Lock the gpt-5.5 guard's scope: only azure gpt-5.5 drops reasoningEffort; other azure gpt-5.x models still get reasoningEffort="medium". Addresses gemini-code-assist review feedback on #1148.
@Astro-Han
Astro-Han merged commit f12f074 into dev Jun 3, 2026
32 of 33 checks passed
@Astro-Han
Astro-Han deleted the claude/r3-3-azure-gpt55 branch June 3, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working harness Model harness, prompts, tool descriptions, and session mechanics P2 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant