mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-26 22:30:11 +00:00
Every analysis model call reserved and settled its budget by rewriting the whole Lens document through the optimistic compare-and-swap, so a worker running eight calls at once starved the eight-attempt retry loop and the proxy answered 409 "Could not reserve analysis budget", which the worker treats as fatal Reservations are now rows in LiteLLM_LensRun next to archived runs, written with one atomic statement that also moves the month's counter. The counter and budget month are server-owned keys of the document that document writes carry over, and Job.cost and Job.steps are read from the ledger. Stage markers go to the same ledger. Document writes keep the compare-and-swap, now with jittered backoff, and return the stored row Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| auth | ||
| lens | ||
| management | ||
| spend | ||
| __init__.py | ||