litellm/litellm/repositories
Devin AI f351685137 fix(proxy): always decrement on spend reset and reseed counters from the DB
A zero computed decrement still fell back to an absolute spend: 0, so
spend flushed between the read and the commit of a zero-spend row was
erased the same way. The payload is now always
{"spend": {"decrement": spend_decrement}}, and a 0.0 decrement is a
no-op that preserves later spend.

Post-reset the admission spend counter was seeded with the in-memory
post-reset value, which misses increments that raced the reset write.
Invalidate instead: delete the in-memory and Redis counter keys so the
next get_current_spend read reseeds from the committed row.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-15 19:52:37 +00:00
..
__init__.py feat(auto-router): show routed model and savings in Claude Code and Codex (#40330) 2026-09-11 12:52:42 -07:00
autorouter_session_repository.py feat(auto-router): show routed model and savings in Claude Code and Codex (#40330) 2026-09-11 12:52:42 -07:00
base_repository.py fix(credentials): answer 409 on a name collision, let PATCH resolve values from model_id 2026-09-15 10:41:43 -07:00
budget_repository.py refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
config_repository.py refactor(typing): replace Any with proven types in 65 backend files 2026-09-02 09:11:36 +00:00
credentials_repository.py refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
model_repository.py fix(router): serialize heuristic tuning quota filters for Prisma 2026-09-07 10:08:19 -07:00
object_permission_repository.py feat(proxy): granular key/team access control for Claude Code marketplace plugins (#40518) 2026-09-10 14:26:09 -07:00
organization_repository.py refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
prisma_protocols.py feat(auto-router): allow opted-in team members to manage their routers 2026-09-14 23:56:55 -07:00
project_repository.py refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
table_repositories.py chore: merge origin/litellm_internal_staging into litellm_decrease_anys_opus5_r4 2026-09-04 18:59:35 -07:00
team_repository.py Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:03:33 -07:00
unit_of_work.py fix(proxy): always decrement on spend reset and reseed counters from the DB 2026-09-15 19:52:37 +00:00
user_banner_repository.py refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
user_repository.py feat(scim): add placeholder listing and merge so a shadowed account can be healed (#39231) 2026-09-02 01:04:53 +00:00
verification_token_repository.py refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00