Skip to content

fix(guardrails): restore supported_decisions_providers on stable/1.104.x so Add Guardrail settings load - #45935

Merged
mateo-berri merged 1 commit into
stable/1.104.xfrom
litellm_fix_decisions_import_stable_1_104_x
Oct 11, 2026
Merged

mateo-berri merged 1 commit into
stable/1.104.xfrom
litellm_fix_decisions_import_stable_1_104_x

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

How it solves it:

  • Imports the providers helper from litellm.decisions.call, where the backport moved it
  • Restores its public name supported_decisions_providers, matching rc/1.105.0 and main
  • Points the existing regression test at the same module

User Flow

Before: an admin opening the Add Provider Guardrail wizard on a stable/1.104.x proxy sees an empty provider list

  1. They open http://localhost:4000/ui/?page=guardrails and click Add Guardrail
  2. The dashboard calls GET http://localhost:4000/guardrails/ui/add_guardrail_settings
  3. The proxy answers 500 Internal server error, so the wizard has no providers to pick

After: the same wizard loads its providers

  1. They open http://localhost:4000/ui/?page=guardrails and click Add Guardrail
  2. The same GET returns 200 with the guardrail settings, including the decision model providers
  3. The wizard lists providers and the guardrail can be created

Affected release

Regression on stable/1.104.x since #45906

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Screenshots / Proof of Fix

Same config on both sides: model_list: [] and a master key from the environment, no database. Before runs the stable/1.104.x tip on port 4101 and After runs this branch on port 4102. The endpoint makes no provider call, so there is no provider spend

Before (0939a83)

  1. curl -s -w '\nHTTP %{http_code}\n' -H "Authorization: Bearer $LITELLM_MASTER_KEY" http://localhost:4101/guardrails/ui/add_guardrail_settings
  2. Output
{"error":{"message":"Internal server error","type":"internal_server_error"}}
HTTP 500
  1. Proxy log
ImportError: cannot import name 'supported_decisions_providers' from 'litellm.decisions.main'

After (7cd5407)

  1. The same curl against port 4102
  2. Output is HTTP 200 with the full settings payload, and decision_model_providers reads
['openai', 'openrouter', 'azure_ai', 'perplexity', 'typesafe', 'strands_decider', 'cloudflare', 'hosted_vllm']

Type

🐛 Bug Fix

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Note

Low Risk
Narrow import-path and symbol rename fix for guardrail UI settings; no changes to auth, billing, or decision API runtime behavior beyond restoring the listing endpoint.

Overview
Fixes a stable/1.104.x regression where GET /guardrails/ui/add_guardrail_settings failed with an ImportError because the proxy still imported supported_decisions_providers from litellm.decisions.main after the decisions backport moved that logic.

supported_decisions_providers is now defined and exported from litellm.decisions.call (renamed from the private _supported_providers), and the guardrail UI endpoint plus its regression test import it from there. The Add Guardrail wizard can load decision_model_providers again instead of returning 500 with an empty provider list.

Reviewed by Cursor Bugbot for commit 7cd5407. Bugbot is set up for automated code reviews on this repo. Configure here.

…rdrail settings endpoint loads on stable/1.104.x

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team October 11, 2026 08:17
@devin-ai-integration

devin-ai-integration Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@mateo-berri

Copy link
Copy Markdown
Contributor

@litereview greptile code-review

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7cd5407. Configure here.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@mateo-berri

Copy link
Copy Markdown
Contributor

@litereview greptile code-review

@mateo-berri mateo-berri 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.

LGTM

@mateo-berri
mateo-berri merged commit 1f90f48 into stable/1.104.x Oct 11, 2026
14 checks passed
@mateo-berri
mateo-berri deleted the litellm_fix_decisions_import_stable_1_104_x branch October 11, 2026 08:32
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.

1 participant