litellm/enterprise/litellm_enterprise
Sameer Kankute c2141b1113
feat(batches): track cost for unmanaged Bedrock batches, generalize the flag (#32315)
* feat(batches): track cost for unmanaged Bedrock batches, generalize the flag

CheckBatchCost skipped Bedrock batches whose unified_object_id is a raw
model-invocation-job ARN, the same root cause previously fixed for
unmanaged Vertex batches. Bedrock batches embed the model name in their
s3:// input file name instead (litellm-bedrock-files-{model}-{uuid}.jsonl),
so the same routing mechanism now derives the model from that layout and
matches it to a configured bedrock deployment.

track_unmanaged_vertex_batch_cost is renamed to track_unmanaged_batch_cost
since two providers now share this mechanism.

* fix(batches): parse Bedrock batch output and price with deployment model name

Bedrock model-invocation-job results use modelOutput/error rows and short
internal model ids that are not in the cost map, so unmanaged batch cost
tracking logged tokens but $0 spend. Use deployment model name for pricing
and add regression tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 10:33:13 +05:30
..
enterprise_callbacks refactor(ui): point invitation links at the dedicated /onboarding route (#30857) 2026-07-08 19:47:05 -07:00
integrations feat: allow multiple calls from tags 2026-03-07 11:24:18 +05:30
litellm_core_utils fix(litellm_logging.py): log custom headers in requester metadata (#10818) 2025-05-13 23:04:37 -07:00
proxy feat(batches): track cost for unmanaged Bedrock batches, generalize the flag (#32315) 2026-07-13 10:33:13 +05:30
types Max budget alerts 2025-12-17 15:04:20 -08:00
__init__.py [Refactor] Use pip package for enterprise/ folder (#10709) 2025-05-09 17:18:48 -07:00