Skip to content

fix: drops unsupported reasoning summary values for azure model router - #5242

Merged
akshaydeo merged 1 commit into
devfrom
07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router
Jul 18, 2026
Merged

akshaydeo merged 1 commit into
devfrom
07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router

Conversation

@sammaji

@sammaji sammaji commented Jul 15, 2026 •

Copy link
Copy Markdown
Member

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

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • 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.

go test ./...

Breaking changes

  • Yes
  • No

Related issues

Security considerations

None.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 59ca1e98-fdb1-401a-94a4-384830fa1805

📥 Commits

Reviewing files that changed from the base of the PR and between 2e2f329 and a09bb4b.

📒 Files selected for processing (2)
  • core/schemas/utils.go
  • plugins/compat/dropparams.go
📝 Walkthrough

Walkthrough

Adds a public Azure model-router classifier and updates Responses API sanitization to remove non-auto reasoning summaries for Azure model-router requests.

Changes

Model-router reasoning compatibility

Layer / File(s) Summary
Model-router detection and reasoning sanitization
core/schemas/utils.go, plugins/compat/dropparams.go
Adds IsAzureModelRouter and drops reasoning.summary when supported reasoning targets an Azure model-router with a non-auto summary. Unsupported reasoning remains fully removed; formatting-only brace adjustments preserve existing behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: pratham-mishra04, tejasghatte

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main fix for Azure model-router reasoning summary handling.
Description check ✅ Passed The description covers the required template sections and adequately explains the change, testing, and impact.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router

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

@sammaji
sammaji marked this pull request as ready for review July 15, 2026 10:15
Copilot AI review requested due to automatic review settings July 15, 2026 10:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

This looks safe to merge.

  • Compatibility changes are applied to the cloned request used for each provider attempt.
  • Fallback requests are prepared from the original request, so a summary removed for model-router remains available to a later compatible model.
  • No blocking issues remain in the changed code.

Important Files Changed

Filename Overview
core/schemas/utils.go Adds the model-router name detection helper used by compatibility handling.
plugins/compat/dropparams.go Drops unsupported non-auto reasoning summaries from Azure model-router requests.

Reviews (9): Last reviewed commit: "fix: drop unsupported reasoning summary ..." | Re-trigger Greptile

Comment thread plugins/compat/dropparams.go
Comment thread core/schemas/utils.go Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
@sammaji
sammaji force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 1facb09 to 10c6695 Compare July 15, 2026 10:28
@sammaji
sammaji force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 10c6695 to 654254e Compare July 17, 2026 14:56
@sammaji
sammaji changed the base branch from dev to graphite-base/5242 July 17, 2026 17:05
@sammaji
sammaji force-pushed the graphite-base/5242 branch from 2e50ec0 to b98fb07 Compare July 17, 2026 17:05
@sammaji
sammaji force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 654254e to 455a6fa Compare July 17, 2026 17:05
@sammaji
sammaji changed the base branch from graphite-base/5242 to 07-17-fix_adds_support_for_anthropic_apis_in_fireworks July 17, 2026 17:05
@sammaji
sammaji force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 455a6fa to 52139b9 Compare July 17, 2026 19:09
@sammaji
sammaji force-pushed the 07-17-fix_adds_support_for_anthropic_apis_in_fireworks branch from b98fb07 to 52dfa59 Compare July 17, 2026 19:09
@sammaji
sammaji force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 52139b9 to 8681f9e Compare July 17, 2026 19:17
@sammaji
sammaji force-pushed the 07-17-fix_adds_support_for_anthropic_apis_in_fireworks branch 2 times, most recently from c1fb407 to 66a2eef Compare July 18, 2026 04:19
@sammaji
sammaji force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 8681f9e to 12866c8 Compare July 18, 2026 04:19
akshaydeo
akshaydeo previously approved these changes Jul 18, 2026
Comment thread core/schemas/utils.go Outdated
@sammaji
sammaji force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 12866c8 to 2e2f329 Compare July 18, 2026 16:10
@sammaji
sammaji force-pushed the 07-17-fix_adds_support_for_anthropic_apis_in_fireworks branch from 66a2eef to 556efd5 Compare July 18, 2026 16:10
@akshaydeo
akshaydeo changed the base branch from 07-17-fix_adds_support_for_anthropic_apis_in_fireworks to graphite-base/5242 July 18, 2026 16:11
@akshaydeo
akshaydeo force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 2e2f329 to 64922e2 Compare July 18, 2026 16:12
@akshaydeo
akshaydeo force-pushed the graphite-base/5242 branch from 556efd5 to bfb0842 Compare July 18, 2026 16:12
@graphite-app
graphite-app Bot changed the base branch from graphite-base/5242 to dev July 18, 2026 16:12
@graphite-app
graphite-app Bot dismissed stale reviews from akshaydeo and coderabbitai[bot] July 18, 2026 16:12

The base branch was changed.

@akshaydeo
akshaydeo force-pushed the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch from 64922e2 to a09bb4b Compare July 18, 2026 16:12

akshaydeo commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Merge activity

  • Jul 18, 6:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 18, 6:31 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo merged commit 2cf0a0b into dev Jul 18, 2026
15 of 16 checks passed
@akshaydeo
akshaydeo deleted the 07-15-fix_drops_unsupported_reasoning_summary_values_for_azure_model_router branch July 18, 2026 18:31
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
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
occcat pushed a commit to occcat/bifrost that referenced this pull request Sep 2, 2026
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
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.

3 participants