litellm/enterprise/litellm_enterprise/proxy/common_utils
Sameer Kankute 6d796d0f1f
feat(proxy): track cost for unmanaged Vertex AI batch jobs (#31442)
* feat(proxy): track cost for unmanaged Vertex AI batch jobs

CheckBatchCost previously skipped Vertex batches created via the raw GCS
input_file_id path, since their unified_object_id is a raw provider job id
that fails the base64 managed-id check. Behind the opt-in general_settings
flag track_unmanaged_vertex_batch_cost, the poller now derives the model
from the gs:// input_file_id, maps it to a configured vertex_ai deployment,
polls the batch, computes cost, and marks batch_processed=True.

* Update tracking for failed", "expired", "cancelled"

* fix(proxy): apply ruff format to proxy_server.py

* address greptile review feedback (greploop iteration 1)

Filter unmanaged Vertex batch deployments by vertex_ai provider so a
shared model group name can't route to a wrong-provider deployment.
Move gs:// URI parsing into VertexAIBatchTransformation. Add test
coverage for the failed/expired/cancelled terminal-status DB update.

* fix: route unmanaged vertex batches to matching deployment

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-07-02 21:19:54 +05:30
..
__init__.py Normalize OpenAI SDK BaseModel choices/messages to avoid Pydantic serializer warnings (#18972) 2026-01-14 03:40:11 +05:30
check_batch_cost.py feat(proxy): track cost for unmanaged Vertex AI batch jobs (#31442) 2026-07-02 21:19:54 +05:30
check_responses_cost.py fix: batch-limit stale managed object cleanup to prevent 300K row UPD… (#25258) 2026-04-06 19:11:55 -07:00