mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
The Anthropic batch create never persisted the creating key's hashed token or its request tags on the managed object, so when CheckBatchCost billed the batch hours later there was nothing to attribute it to. Key spend, key budgets and tag spend never moved for batch usage. Persist both from the create, the way the Vertex passthrough already does, and register the batch only from the collection route. An id-scoped route cannot rebuild the unified object id, because it embeds the model and the model comes from the create's request body, so it could only claim a row it did not create or fail the model_object_id unique constraint. The shared metadata helpers, the route predicate and the registration-result logging now live in batch_attribution instead of being copied per provider. The Anthropic write previously logged success unconditionally, before the fire-and-forget task had run. Resolves LIT-5288 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_afile_retrieve_returns_unified_id.py | ||
| test_batch_retrieve_input_file_id.py | ||
| test_batch_retrieve_registers_missing_output_file_id.py | ||
| test_batch_retrieve_returns_unified_input_file_id.py | ||
| test_batch_update_db_managed_output_file_id.py | ||
| test_deleted_file_returns_403_not_404.py | ||
| test_enterprise_routes.py | ||
| test_file_deletion_blocking.py | ||
| test_managed_files_access_check.py | ||
| test_managed_files_hook.py | ||