feat(proxy): say when a stored setting is ignored because the config file owns it - #41985
Merged
Merged
Conversation
…file owns it The config file winning over the database was silent. An admin who had set a value through the UI and later pinned the same key in the file saw their stored value quietly stop applying, with nothing said at boot and nothing said when a later write was refused. Startup now warns once per key whose stored value differs from the file's, naming the key and what to do about it. The refusal raised on a write to a config-owned key carries the same sentence, so the log and the 400 read identically, and both call out that a stored value exists and will never be applied. The /config/update refusal gained the same detail. Keys the file does not declare are untouched: the database still owns them, and a stored value equal to the file's is not worth a warning.
yuneng-berri
enabled auto-merge
September 19, 2026 17:22
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
yucheng-berri
approved these changes
Sep 19, 2026
2 tasks done
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:
How it solves it:
User Flow
Before: an admin who set an allowlist in the UI, then later pinned it in the config file, has no way to learn their stored value stopped applying
general_settings.allowed_ipsin the config file with a narrower list and restartAfter: the same admin is told at startup, and again the moment a write is refused
general_settings.allowed_ips, saying the value stored in the database is ignored and will never be applied, and how to change thatstored_database_value_ignored: trueRelevant issues
Affected release
Linear ticket
Pre-Submission checklist
uv run pytest tests/test_litellm/<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)Screenshots / Proof of Fix
Shared setup, identical on both sides. A local proxy whose config file pins a two-IP allowlist, with a database row already storing a wider one, so the file and the database disagree on the same key.
Before (209a780)
grep -iE 'ignored|never be applied' litellm.logcurl -s http://127.0.0.1:50339/get/allowed_ips -H 'Authorization: Bearer sk-1234'After (7353b77)
grep -iE 'ignored|never be applied' litellm.logcurl -s http://127.0.0.1:50339/get/allowed_ips -H 'Authorization: Bearer sk-1234'Type
🆕 New Feature
🐛 Bug Fix
Caveats (if any)
Medium
Low
Final Attestation