litellm - ✅(Solved) Fix [Bug]: False "guardrails feature unavailable" error when guardrails are not configured in LiteLLM 1.82.3 [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24734Fetched 2026-04-08 01:45:44
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
1
Author
Participants
Timeline (top)
labeled ×2cross-referenced ×1subscribed ×1

Error Message

After upgrading LiteLLM to version 1.82.3, editing any API key configuration (even for models without guardrails) triggers a false "Feature Unavailable" error claiming the guardrails feature requires a LiteLLM Enterprise license. The error persists despite having no guardrails configured in the application or environment. 4. Observe the error: {'error': 'This feature is only available for LiteLLM Enterprise users: guardrails...'}

PR fix notes

PR #24758: False "guardrails feature unavailable" error when guardrails are not configured in LiteLLM 1.82.3 #24734

Description (problem / solution / changelog)

I have updated the metadata parser helpers across backend endpoints to ignore and bypass the proxy enterprise premium check specifically when the received values are empty collections (like [] or {}).

This effectively ensures that users without premium privileges can safely clear out premium fields or have the UI send default empty collections safely without encountering false-positive Feature Unavailable backend errors.

The following files have been updated:

litellm/proxy/management_endpoints/key_management_endpoints.py -> Updated prepare_metadata_fields to verify v != [] and v != {} before raising the enterprise check. litellm/proxy/management_endpoints/common_utils.py -> Updated _set_object_metadata_field so backend validation logic acts consistently for updating API Keys, Projects, and Teams.

Changed files

  • litellm/proxy/management_endpoints/common_utils.py (modified, +3/-1)
  • litellm/proxy/management_endpoints/key_management_endpoints.py (modified, +2/-1)
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

After upgrading LiteLLM to version 1.82.3, editing any API key configuration (even for models without guardrails) triggers a false "Feature Unavailable" error claiming the guardrails feature requires a LiteLLM Enterprise license. The error persists despite having no guardrails configured in the application or environment.

<img width="1773" height="940" alt="Image" src="https://github.com/user-attachments/assets/39dbc0fa-4c55-4536-a077-8c329b888a23" />

`

Steps to Reproduce

  1. Install LiteLLM 1.82.3.
  2. Configure a model (e.g., litellm.completion(model="gpt-4", api_key="xxx")) without guardrails.
  3. Attempt to edit the API key via UI or configuration method.
  4. Observe the error: {'error': 'This feature is only available for LiteLLM Enterprise users: guardrails...'}

Relevant log output

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

v1.82.3

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To resolve the "Feature Unavailable" error when editing API key configurations in LiteLLM version 1.82.3, we need to modify the license check logic.

  • Update the guardrails feature check to only trigger when guardrails are actually configured.
  • Modify the API key editing endpoint to bypass the enterprise license check when no guardrails are present.

Example code changes:

# Before
if model_has_guardrails:
    # Check for enterprise license
    if not is_enterprise_license():
        raise FeatureUnavailableError("guardrails")

# After
if model_has_guardrails and is_guardrails_enabled():
    # Check for enterprise license
    if not is_enterprise_license():
        raise FeatureUnavailableError("guardrails")

Verification

To verify the fix, follow these steps:

  1. Apply the code changes.
  2. Configure a model without guardrails.
  3. Attempt to edit the API key via UI or configuration method.
  4. The "Feature Unavailable" error should no longer appear.

Extra Tips

  • Ensure that the is_guardrails_enabled() function correctly checks the guardrails configuration.
  • Test the fix with different model configurations to ensure the issue is fully resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - ✅(Solved) Fix [Bug]: False "guardrails feature unavailable" error when guardrails are not configured in LiteLLM 1.82.3 [1 pull requests, 1 participants]