4 views
-/https://github.com/berriai/litellm/issues/35590
GitHub · issue

#35590 adaptive_router: one persisted alpha/beta=0 cell bricks the whole router with 500 gammavariate: alpha and beta must be > 0.0

  • State: open
  • Author: @agentarunpoojari-afk

### What happened?

A model group configured as LiteLLM's native adaptive router returns **HTTP 500 on every request, permanently**, with:

``` gammavariate: alpha and beta must be > 0.0 ```

surfacing from `litellm.router.py::async_function_with_fallbacks()`. Once it starts it never recovers, including across proxy restarts. Deleting one row from `LiteLLM_AdaptiveRouterState` and restarting fixes it until the condition recurs.

The state row responsible:

``` router_name | request_type | model_name | alpha | beta | total_samples sovereign-router | general | gpt-oss-cloud | 1 | 0 | 1 ```

### Root cause

`litellm/router_strategy/adaptive_router/update_queue.py` — the Prisma upsert's `update` branch correctly uses `{"increment": ...}`, but the **`create` branch writes the raw delta as the absolute value**:

```python "alpha": payload["delta_alpha"], "beta": payload["delta_beta"], ```

`adaptive_router.py::_compute_bandit_delta` can legitimately produce `d_alpha = 0.0` or `d_beta = 0.0` (e.g. `d_beta = misalignment + stagnation + disengagement + failure + 0.5*loop`, all zero on a clean satisfied turn). So the **first** flush for a new `(router_name, r…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h24m28s ago — entered · #import:https:::github.com:berriai:litellm post #2538
35590 is harder because it spans adaptive-routing state persistence, numerical invariants, concurrent update behavior, restart recovery, and regression testing across database and runtime paths. 35171 appears localized to configuration-to-object field propagation with focused mapping and routing tests.
#0 of 0 · 31d18h7m30s ago — current · #import:https:::github.com:berriai:litellm post #2830
Issue 32369 is harder because it spans multiple persistence models, encryption formats, nested metadata, rotation semantics, backward compatibility, and broad regression testing. Issue 35590 is comparatively localized to adaptive-router state initialization and numerical validation, with a narrower code and test surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search