litellm/enterprise
Ishaan Jaffer 5d572b0c01 Batch-limit stale managed object cleanup with single bounded SQL query
Two fixes to _cleanup_stale_managed_objects:

1. Replace unbounded update_many with a single execute_raw using a
   subquery LIMIT, capping each poll cycle to STALE_OBJECT_CLEANUP_BATCH_SIZE
   rows. Zero rows loaded into Python memory — everything stays in Postgres.
   Uses the same PostgreSQL raw-SQL pattern as spend_log_cleanup.py
   (the proxy requires PostgreSQL per schema.prisma).

2. Extract _expire_stale_rows as a separate method for testability.

Keeps the file_purpose='response' filter to avoid incorrectly expiring
long-running batch or fine-tune jobs that legitimately exceed the
staleness cutoff.

Made-with: Cursor
2026-03-23 17:17:33 -07:00
..
cloudformation_stack (fix) litellm cloud formation stack 2024-03-07 18:06:59 -08:00
dist BUMP Enterprise PIP 2026-02-14 13:40:48 -08:00
enterprise_hooks Add using managed vector store creds for vector store files endpoint 2026-02-13 10:33:49 +05:30
enterprise_ui Update README.md 2024-02-21 22:11:39 -08:00
litellm_enterprise Batch-limit stale managed object cleanup with single bounded SQL query 2026-03-23 17:17:33 -07:00
__init__.py (fix) error cli users see when importing enterprise folder 2024-03-15 08:10:45 -07:00
LICENSE.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
poetry.lock [Prometheus] Move Prometheus to enterprise folder (#12659) 2025-07-18 11:54:47 -07:00
pyproject.toml bump: litellm-enterprise 0.1.34 → 0.1.35 2026-03-21 20:42:34 +05:30
README.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00

LiteLLM Enterprise

Code in this folder is licensed under a commercial license. Please review the LICENSE file within the /enterprise folder

These features are covered under the LiteLLM Enterprise contract

👉 Using in an Enterprise / Need specific features ? Meet with us here

See all Enterprise Features here 👉 Docs