litellm/enterprise/litellm_enterprise/proxy
Sameer Kankute cbdc70d544
fix(managed_batches): convert raw output_file_id to managed ID in CheckBatchCost poller (#27984)
* fix(managed_batches): convert raw output_file_id to managed ID in CheckBatchCost poller

CheckBatchCost bypasses async_post_call_success_hook, causing raw provider
output_file_ids to be persisted in LiteLLM_ManagedObjectTable. This fix converts
output_file_id and error_file_id to managed base64 IDs before the DB write.

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

* fix(check_batch_cost): persist managed file before mutating response and propagate team_id

- Move setattr after store_unified_file_id so the response only receives the
  managed ID once the DB record is successfully written. Avoids serializing
  an orphaned managed ID into file_object when the store call fails.
- Populate team_id on the minimal UserAPIKeyAuth from job.team_id so the
  managed file record is created with the correct team ownership, allowing
  other team members to access the batch output file via /files/{id}/content.

Co-authored-by: Yassin Kortam <yassin@berri.ai>

* test(managed_batches): extend test to cover error_file_id conversion

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

* fix managed file test

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Yassin Kortam <yassin@berri.ai>
2026-05-15 04:41:38 -07:00
..
auth chore(auth): require trusted proxy for header identity auth 2026-04-29 21:20:21 -07:00
common_utils fix(managed_batches): convert raw output_file_id to managed ID in CheckBatchCost poller (#27984) 2026-05-15 04:41:38 -07:00
hooks fix(proxy): normalize managed resource team owner field 2026-05-04 17:05:50 -07:00
management_endpoints Merge pull request #27011 from stuxf/fix/project-update-cross-team-hijack 2026-05-01 18:01:06 -07:00
ui_crud_endpoints [Refactor] Proxy: tighten UI settings extras registry 2026-04-13 21:58:02 -07:00
vector_stores litellm_fix(mypy): fix remaining type errors (#20164) 2026-01-31 10:25:23 -08:00
__init__.py Normalize OpenAI SDK BaseModel choices/messages to avoid Pydantic serializer warnings (#18972) 2026-01-14 03:40:11 +05:30
audit_logging_endpoints.py fix(audit): AND semantics for combined JSON filters; remove unused allTeams prop 2026-03-03 14:24:55 -08:00
enterprise_routes.py [Refactor] Proxy: move projects management to enterprise package 2026-04-13 21:41:12 -07:00
proxy_server.py build(ui/): UI - Public Model Hub v2 (#12532) 2025-07-11 22:24:31 -07:00
readme.md Expose /list and /info endpoints for Audit Log events (#11102) 2025-05-23 22:54:59 -07:00
utils.py [Refactor] Move enterprise_routes within litellm_enterprise (#10860) 2025-05-15 10:34:26 -07:00

LiteLLM Proxy Enterprise Features - Readme

Overview

This directory contains enterprise features used on the LiteLLM proxy.

Format

Create a file for every group of endpoints (e.g. key_management_endpoints.py, user_management_endpoints.py, etc.)

If there is a broader semantic group of endpoints, create a folder for that group (e.g. management_endpoints, auth_endpoints, etc.)