mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
A dropped connection anywhere in the budget reset tick used to abort the whole phase, so every due key, user, team and budget tier stayed unreset until the next tick ten minutes later. Route the job's DB calls through call_with_db_reconnect_retry so a transport blip costs one reconnect instead. Reads replay on any transport error, since re-running a SELECT has nothing to double-apply. Writes are non-idempotent, a reset assigns spend = 0 unconditionally, so they narrow to DB_RETRY_SAFE_ERROR_TYPES: only a ConnectError proves the statements never reached the database. A post-send error like ReadError or ReadTimeout leaves the commit outcome unknown, and replaying one that already landed would erase whatever was spent since, so those keep the pre-existing behaviour of failing the tick. Resolves LIT-5372 Co-authored-by: Yassin Kortam <yassin@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| db_transaction_queue | ||
| mcp_server | ||
| conftest.py | ||
| test_autorouter_session_rollup.py | ||
| test_check_migration.py | ||
| test_create_views.py | ||
| test_daily_spend_bulk_upsert.py | ||
| test_db_spend_update_writer.py | ||
| test_db_url_settings.py | ||
| test_exception_handler.py | ||
| test_exception_handler_reconnect_retry.py | ||
| test_gateway_request_tracking.py | ||
| test_prisma_client.py | ||
| test_prisma_planned_engine_restart.py | ||
| test_prisma_self_heal.py | ||
| test_proxy_worker_heartbeat.py | ||
| test_query_engine_reaper.py | ||
| test_rds_iam_token_expiry.py | ||
| test_replica_identity.py | ||
| test_routing_prisma_wrapper.py | ||
| test_spend_log_batching.py | ||
| test_spend_log_tool_index.py | ||
| test_token_auth.py | ||
| test_tool_registry_writer.py | ||