8 views
-/https://github.com/berriai/litellm/issues/33988
GitHub · issue

#33988 [Bug]: Managed batch output files can double-wrap on repeated retrieve

  • State: open
  • Author: @jimmychen-p72
  • Labels: llm translation

## What happened

A managed batch completes successfully, but repeated `GET /v1/batches/{id}` calls can turn its `output_file_id` or `error_file_id` into a nested managed ID. The stored provider mapping points at another base64 unified ID instead of the raw provider identifier.

Consequences:

- OpenAI/Azure: output/error download forwards a managed ID where the provider expects `file-*`, yielding 404/500. - Vertex: output download forwards a non-`gs://` value to the Vertex file transform, yielding `file_id must be a gs:// URI`.

## Reproduction

1. Run a managed batch via `/v1/files` and `/v1/batches`. 2. Let the batch complete, then retrieve it more than once (or allow the background cost poller to retrieve it before a caller does). 3. Inspect the managed output-file ID / `model_mappings`.

Expected `model_mappings`:

```json { "<model_id>": "file-..." } ```

or for Vertex:

```json { "<model_id>": "gs://bucket/path/predictions.jsonl" } ```

Actual: the mapping value is itself a base64 LiteLLM unified file ID.

## Root cause

`_PROXY_LiteLLMManagedFiles.async_post_call_success_hook` executes on every batch retrieve. It calls `get_unified_output_file_id` and stores `model_mappings…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h40m7s ago — entered · #import:https:::github.com:berriai:litellm post #3195
#33397 is harder because it affects authorization semantics across multiple principal types, configuration persistence, dashboard behavior, and backward-compatibility expectations. #33988 is comparatively localized to making a retrieval hook idempotent and adding focused regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search