Repository navigation
fix(provider): skip reasoningEffort for azure gpt-5.5 - #1148
Conversation
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).
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
Summary
ProviderTransform.optionsaddsreasoningEffort: "medium"to any model whose api id containsgpt-5(excludinggpt-5-chat/gpt-5-pro). Azure'sgpt-5.5matches that block, but Azure's completions API rejects thereasoningEffortparameter, so the request fails and the provider is unusable.This adds an early-return guard: for
@ai-sdk/azuremodels whose id containsgpt-5.5, set onlyreasoningSummary: "auto"and return before the sharedgpt-5block runs.No local issue — this is an upstream-port fix.
Why
Without the guard, Azure
gpt-5.5users get a hard provider error on every request. The fix is the smallest adaptation of the upstream change to currentdev(line numbers drifted; logic re-proven against the currentgpt-5block).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_thinkingblocks and before the sharedgpt-5block, keyed onapi.npm === "@ai-sdk/azure" && api.id.includes("gpt-5.5"). Confirm it does not shadow other Azure gpt-5.x models (onlygpt-5.5is matched) and that returning early is correct (no later block inoptionsapplies to this case).Risk Notes
Behavior change is scoped to Azure
gpt-5.5only; all other providers/models keep their existing options.Known pre-existing limitation (out of scope, not a regression from this change):
ProviderTransform.variants()still returnsreasoningEffortentries for Azuregpt-5.5reasoning variants, andsession/llm.tsmerges the selected variant's options afterProviderTransform.options(...). So if a user explicitly selects a reasoning-effort variant for Azuregpt-5.5,reasoningEffortis 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 Azuregpt-5.5should 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:
How To Verify
Screenshots or Recordings
N/A — no visible UI change.
Checklist
bug,enhancement,task,documentation.app,ui,platform,harness,ci.P0,P1,P2,P3.Pending,Approved by @<reviewer>, orNot required: <reason>.dev, and my PR title and commit messages use Conventional Commits in English.