mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(proxy): drop new mutable-collection hits in unpriced settle
The empty-dict fallback was a LIT002 construction, and the new helper's dict annotation was a LIT001.
This commit is contained in:
parent
39b23da802
commit
3122e13e6c
1 changed files with 2 additions and 2 deletions
|
|
@ -343,7 +343,7 @@ class _ProxyDBLogger(CustomLogger):
|
|||
# blocking shared counters until TTL. Settle at the
|
||||
# admission estimate instead. No spend-log row — there is
|
||||
# no real cost to write.
|
||||
reserved_cost = float((budget_reservation or {}).get("reserved_cost") or 0.0)
|
||||
reserved_cost = float(budget_reservation.get("reserved_cost") or 0.0) if budget_reservation else 0.0
|
||||
try:
|
||||
await _reconcile_budget_reservation(
|
||||
budget_reservation=budget_reservation,
|
||||
|
|
@ -632,7 +632,7 @@ async def _release_budget_reservation(budget_reservation: dict | None) -> None:
|
|||
|
||||
|
||||
async def _reconcile_budget_reservation(
|
||||
budget_reservation: dict | None,
|
||||
budget_reservation: dict | None, # mutable-ok: same reservation payload _release_budget_reservation takes
|
||||
actual_cost: float,
|
||||
) -> None:
|
||||
if budget_reservation is None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue