8 views
-/https://github.com/berriai/litellm/issues/29416
GitHub · issue

#29416 [Bug]: Guardrail policies are not being saved to the db from config

  • State: open
  • Author: @superjoep
  • Labels: bug

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

When creating a guardrail policy and attachment in the config file they are not saved in the database and are also being overwritten by the empty database. Making us have to use supported_db_objects to exclude the policies from being loaded in and overwriting the config policies.

### Steps to Reproduce

1. Create a policy in your config file 2. Run your LiteLLM instance 3. Check the db/ui to see that no policies have been created

### Relevant log output

```shell 12:09:31 - LiteLLM Proxy:INFO: init_policies.py:133 - Initializing 1 policies...  - politiegpt_guardrails 12:09:31 - LiteLLM Proxy:INFO: attachment_registry.py:67 - Loaded 1 policy attachments guardrails.add: ['example-validation'] 12:09:31 - LiteLLM Proxy:INFO: init_policies.py:179 - Successfully loaded 1 policies

12:09:31 - LiteLLM Proxy:INFO: init_policies.py:190 - Successfully loaded 1 policy attachments Policy Attachments: 1 attachment(s) 12:09:31 - LiteLLM Proxy:DEBUG: attachment_registry.py:59 - Loaded att…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (3 events)
#0 of 0 · 31d19h22m53s ago — entered · #import:https:::github.com:berriai:litellm post #1801
Guardrail configuration/database synchronization spans startup initialization, persistence, and precedence semantics, making it broader and riskier than a localized provider payload-condition fix with focused regression coverage.
The right issue is harder because it involves diagnosing and correcting cross-layer configuration, initialization, persistence, and overwrite behavior, with broader regression-testing risk. The left is primarily a dependency and compatibility update with comparatively localized validation.
#0 of 0 · 31d19h10m48s ago — current · #import:https:::github.com:berriai:litellm post #2006
The right issue is harder because it crosses configuration bootstrapping, persistence, database precedence, and policy/attachment initialization, requiring careful lifecycle fixes and regression coverage. The left issue is narrower provider-specific request/response translation debugging with more contained compatibility changes.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search