Repository navigation
fix(guardrails): import the decisions provider list from litellm.decisions.call on stable/1.104.x - #45936
Merged
yuneng-berri merged 1 commit intoOct 11, 2026
Conversation
…sions.call on stable/1.104.x The decision model guardrail backport (#45900) added supported_decisions_providers to litellm.decisions.main and imported it from there in get_guardrail_ui_settings. The decisions backport (#45906) then picked #45130, which rewrites litellm.decisions.main and moves the provider list into litellm.decisions.call as _supported_providers, so the import broke and GET /guardrails/ui/add_guardrail_settings raises ImportError. The Admin UI's Add Provider Guardrail wizard gets no providers as a result Match main by naming it supported_decisions_providers in litellm.decisions.call and pointing the endpoint and its test there, the same fix rc/1.105.0 got in fcbb022
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
yuneng-berri
approved these changes
Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
GET /guardrails/ui/add_guardrail_settingsraises ImportError on stable/1.104.xHow it solves it:
_supported_providerstosupported_decisions_providersinlitellm.decisions.callget_guardrail_ui_settingsand its test atlitellm.decisions.call#45900 added
supported_decisions_providerstolitellm.decisions.mainand imported it from there inget_guardrail_ui_settings. #45906 then picked #45130, which rewriteslitellm.decisions.mainand moves the provider list intolitellm.decisions.callas_supported_providers, so the import broke once both landed on the lineUser Flow
Before: a proxy admin on stable/1.104.x can't add a provider guardrail because the wizard has no providers to pick from
After: the same wizard loads its provider list and the admin can create the guardrail
Relevant issues
Follow-up to #45900 and #45906 on stable/1.104.x
Affected release
Regression on stable/1.104.x after #45906 landed on top of #45900. The litellm-e2e Playwright UI suite for 1.104.3 failed 3 guardrail wizard specs because of it
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
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@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
The run covers the guardrail endpoint tests (
tests/test_litellm/proxy/guardrails/test_guardrail_endpoints.py), the decision model tests (tests/test_litellm/proxy/guardrails/guardrail_hooks/test_decision_model.py) and the decisions testsBefore (0939a83)
test_add_guardrail_settings_restricts_hide_secrets_to_pre_call,test_get_guardrail_ui_settings_returns_per_provider_supported_modes,test_ui_settings_map_matches_runtime_supported_event_hooksandtest_add_guardrail_settings_returns_decisions_providersall fail on the ImportError fromget_guardrail_ui_settingsAfter (8a834c0)
Type
🐛 Bug Fix
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/adc951cfd2604adf8e8455669b712c35
Open in Devin Desktop: https://app.devin.ai/desktop/session/adc951cfd2604adf8e8455669b712c35?variant=devin