9 views
-/https://github.com/berriai/litellm/issues/31836
GitHub · issue

#31836 [Bug]: DB-backed router_settings JSON strings are skipped on reload

  • State: open
  • Author: @silencedoctor
  • Labels: proxy

### Check for existing issues

I searched existing issues and did not find another issue that covers this specific DB-backed `router_settings` reload behavior.

### What happened?

When `LiteLLM_Config.param_value` for `router_settings` contains a JSON object encoded as a string, the proxy reload path skips it because it only applies DB router settings when `param_value` is already a `dict`.

This makes Dashboard-configured advanced router settings appear to save successfully, but after reload the live Router does not include the setting. For `router_settings.model_group_alias`, the Dashboard Model Group Alias tab reads from the live router config, so the alias disappears and API calls using the alias are rejected as an unknown model.

YAML config does not hit this path because YAML loads `router_settings` as a Python dict.

Expected behavior:

- DB-backed `router_settings` should accept existing JSON-object string rows and normalize them before applying to the Router. - `/config/update` should write JSON objects to the `Json` column instead of pre-serializing dict sections as strings.

### Steps to Reproduce

1. Start a local LiteLLM proxy with `store_model_in_db: true`, Postgres,…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h9m0s ago — entered · #import:https:::github.com:berriai:litellm post #2699
The left issue is harder because it spans database serialization, backward-compatible normalization, configuration update behavior, proxy reload integration, and regression testing. The right issue is comparatively localized to terminal-state handling in a background poller with focused edge-case tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search