mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
A poll of a Vertex passthrough batch wrote nothing to the managed-object row, so status and file_object stayed frozen at the create-time snapshot and GET /v1/batches served a stale status and an empty output file id for the life of the batch. Only the create may claim a batch, but every observation of one may refresh its state. store_unified_object_id takes create_if_missing, which the poll clears: it refreshes status and file_object through update_many, and leaves a row that is absent absent rather than creating one owned by the observer, since created_by and team_id are written by whoever reaches the create branch. The update payload is now shared with the upsert so it cannot drift into writing api_key, request_tags, created_by or team_id. The passthrough identity re-assertion that was previously part of this PR ships separately in #36121, so this PR keeps only the batch attribution work. The creating key owns user_api_key_alias only when it actually has one. Guarding the overwrite on the presence of a key rather than on a resolved alias nulled the field out for every key generated without key_alias, and for any key rotated or deleted before its batch finished, losing the creating user's alias that the spend row previously carried. The guard now matches the team-alias line below it. |
||
|---|---|---|
| .. | ||
| __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 | ||