litellm/litellm-proxy-extras/litellm_proxy_extras
mateo-berri 8b63b7045c feat(interactions): durable cross-pod settlement for background interaction billing
Background interaction billing previously lived only in the creating pod's
memory: a DELETE routed to another pod or a proxy restart meant the completed
provider work was never billed and the budget reservation was refunded at the
poll timeout. The poll task now persists a settlement context row (virtual key
attribution, model, original request id, budget reservation) in a new
LiteLLM_BackgroundInteractionSettlementTable so any pod can settle. A
conditional update flipping status pending to settled is the cross-pod
exactly-once claim; every outcome (bill, release, timeout give-up) must win it
before touching spend counters, and a losing pod finalizes its local
reservation copy without touching shared counters. The delete route settles
registry misses through the store by rebuilding a billable logging context,
resolving provider credentials through the router by model group. A per-pod
sweep job resumes pending settlements after restarts and surfaces timed-out
entries as abandoned rows instead of silently reconciling to zero. Without a
registered store (SDK usage) behavior is unchanged.
2026-07-15 10:06:18 -07:00
..
migrations feat(interactions): durable cross-pod settlement for background interaction billing 2026-07-15 10:06:18 -07:00
__init__.py install prisma migration files - connects litellm proxy to litellm's prisma migration files (#9637) 2025-03-29 15:27:09 -07:00
_logging.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
schema.prisma feat(interactions): durable cross-pod settlement for background interaction billing 2026-07-15 10:06:18 -07:00
utils.py [Fix] v2 resolver: swallow non-connection DB errors; wrap resolve failures 2026-04-21 15:53:07 -07:00