litellm/enterprise
Devin AI 97b613d342 fix(batches): bound CheckBatchCost memory and add poll leader election
CheckBatchCost's cost-tracking path downloaded a completed batch's output
file and parsed it into a List[dict], keeping the full base64 image payloads
of Gemini image-gen responses resident on top of the raw bytes; two
json.dumps(..., indent=4) debug calls also re-serialized that whole structure
unconditionally because the argument was evaluated before the log-level check.
The scheduled job had no leader election, so every worker/pod polled and
buffered the same files at once.

- add calculate_batch_cost_and_usage_from_content: a single-pass fold over the
  JSONL output that keeps peak memory bounded to the raw bytes plus one row,
  preserving cost/usage/model/status behavior across providers
- guard the json.dumps debug serialization behind isEnabledFor(DEBUG)
- gate the poll behind PodLockManager so only the lock holder runs each cycle
  when Redis is configured, injected via the constructor with a fallback to the
  shared manager; unchanged unlocked behavior with no Redis

Fixes #33955
2026-07-20 09:38:30 +00: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 fix(guardrails): align banned_keywords + azure_content_safety call_type gates with runtime route_type 2026-05-04 21:27:24 +00:00
enterprise_ui Update README.md 2024-02-21 22:11:39 -08:00
litellm_enterprise fix(batches): bound CheckBatchCost memory and add poll leader election 2026-07-20 09:38:30 +00:00
__init__.py (fix) error cli users see when importing enterprise folder 2024-03-15 08:10:45 -07:00
LICENSE.md docs: document new github + gitlab ci scripts 2026-03-25 20:17:10 -07:00
pyproject.toml bump: litellm-enterprise 0.1.50 -> 0.1.51, litellm-proxy-extras 0.4.77 -> 0.4.78 (#33571) 2026-07-16 15:02:30 -07:00
README.md Fix enterprise doc link (#31815) 2026-07-09 11:48:11 -07: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