fix: drops unsupported reasoning summary values for azure model router - #5242
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a public Azure model-router classifier and updates Responses API sanitization to remove non- ChangesModel-router reasoning compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (9): Last reviewed commit: "fix: drop unsupported reasoning summary ..." | Re-trigger Greptile |
1facb09 to
10c6695
Compare
10c6695 to
654254e
Compare
2e50ec0 to
b98fb07
Compare
654254e to
455a6fa
Compare
455a6fa to
52139b9
Compare
b98fb07 to
52dfa59
Compare
52139b9 to
8681f9e
Compare
c1fb407 to
66a2eef
Compare
8681f9e to
12866c8
Compare
12866c8 to
2e2f329
Compare
66a2eef to
556efd5
Compare
2e2f329 to
64922e2
Compare
556efd5 to
bfb0842
Compare
The base branch was changed.
64922e2 to
a09bb4b
Compare
Merge activity
|
maximhq#5242) ## Summary Azure's `model-router` model only supports `"auto"` as a value for the `reasoning.summary` parameter. When a different value is provided, the request would fail. This PR adds handling to strip the unsupported `reasoning.summary` value when routing through `model-router`, ensuring compatibility without breaking the broader reasoning parameter support. ## Changes - Added `IsModelRouter` helper in `core/schemas/utils.go` to detect Azure's `model-router` model by name. - Updated the `dropUnsupportedParams` logic in `plugins/compat/dropparams.go` so that when `reasoning` is supported but `reasoning.summary` is set to a non-`"auto"` value and the model is `model-router`, the summary field is cleared and logged as dropped. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [x] Plugins - [ ] UI (React) - [ ] Docs ## How to test Send a request targeting Azure's `model-router` model with a `reasoning.summary` value other than `"auto"` (e.g., `"detailed"`) and verify that the parameter is stripped before the request is forwarded and that the request succeeds. ```sh go test ./... ``` ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable
maximhq#5242) ## Summary Azure's `model-router` model only supports `"auto"` as a value for the `reasoning.summary` parameter. When a different value is provided, the request would fail. This PR adds handling to strip the unsupported `reasoning.summary` value when routing through `model-router`, ensuring compatibility without breaking the broader reasoning parameter support. ## Changes - Added `IsModelRouter` helper in `core/schemas/utils.go` to detect Azure's `model-router` model by name. - Updated the `dropUnsupportedParams` logic in `plugins/compat/dropparams.go` so that when `reasoning` is supported but `reasoning.summary` is set to a non-`"auto"` value and the model is `model-router`, the summary field is cleared and logged as dropped. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [x] Plugins - [ ] UI (React) - [ ] Docs ## How to test Send a request targeting Azure's `model-router` model with a `reasoning.summary` value other than `"auto"` (e.g., `"detailed"`) and verify that the parameter is stripped before the request is forwarded and that the request succeeds. ```sh go test ./... ``` ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable

Summary
Azure's
model-routermodel only supports"auto"as a value for thereasoning.summaryparameter. When a different value is provided, the request would fail. This PR adds handling to strip the unsupportedreasoning.summaryvalue when routing throughmodel-router, ensuring compatibility without breaking the broader reasoning parameter support.Changes
IsModelRouterhelper incore/schemas/utils.goto detect Azure'smodel-routermodel by name.dropUnsupportedParamslogic inplugins/compat/dropparams.goso that whenreasoningis supported butreasoning.summaryis set to a non-"auto"value and the model ismodel-router, the summary field is cleared and logged as dropped.Type of change
Affected areas
How to test
Send a request targeting Azure's
model-routermodel with areasoning.summaryvalue other than"auto"(e.g.,"detailed") and verify that the parameter is stripped before the request is forwarded and that the request succeeds.go test ./...Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines