mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
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 |
||
|---|---|---|
| .. | ||
| cloudformation_stack | ||
| dist | ||
| enterprise_hooks | ||
| enterprise_ui | ||
| litellm_enterprise | ||
| __init__.py | ||
| LICENSE.md | ||
| pyproject.toml | ||
| README.md | ||
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