Skip to content

fix: Prevents DB from accidentally overriding config file values if they are empty in DB - #15340

Merged
5 commits merged into
mainfrom
litellm_db_config_accidental_override_fix
Oct 10, 2025
Merged

5 commits merged into
mainfrom
litellm_db_config_accidental_override_fix

Conversation

@ARajan1084

@ARajan1084 ARajan1084 commented Oct 8, 2025 •

Copy link
Copy Markdown
Contributor

fix: Prevents DB from accidentally overriding config file values if they are empty in DB

During proxy server initialization, any configuration values in the DB would override config values in config.yaml. This would be problematic, especially when the DB value was an empty dict and the config.yaml value was not.

These changes modify the behavior so that the config processing logic performs a deep merge on the values from the config.yaml file and the DB. In case of a conflict in the values, the DB wins.

image

Relevant issues

Fixes #15020

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix

Changes

  • ensures that the field the DB config is populating is not empty

@vercel

vercel Bot commented Oct 8, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Oct 9, 2025 2:27am

@ARajan1084
ARajan1084 force-pushed the litellm_db_config_accidental_override_fix branch from 867d382 to ce8a520 Compare October 8, 2025 21:42
@ARajan1084
ARajan1084 marked this pull request as ready for review October 8, 2025 21:42
Comment thread tests/proxy_unit_tests/test_proxy_utils.py Outdated
@ghost
ghost merged commit eb0b263 into main Oct 10, 2025
38 of 50 checks passed
@ishaan-berri
ishaan-berri deleted the litellm_db_config_accidental_override_fix branch March 26, 2026 21:52
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…ental_override_fix

fix: Prevents DB from accidentally overriding config file values if they are empty in DB
This pull request was closed.

This branch was successfully deployed

1 active deployment
Preview — 95e71b31 Deployed Oct 9, 2025 by vercel[bot]
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.

model_group_alias in config.yaml seems to be ignored

1 participant