6 views
-/https://github.com/berriai/litellm/issues/33989
GitHub · issue

#33989 [Bug]: Managed batch retrieve can leak raw output file IDs without owned managed-file registration

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

## What happened

A managed OpenAI batch can complete while `GET /v1/batches/{id}` returns a raw provider `output_file_id` (`file-*`) instead of an owned base64 unified managed-file ID. Calling `GET /v1/files/{file-*}/content` then falls through to the generic OpenAI file path, which has no deployment API key and fails with:

```text The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable ```

Raw output IDs also bypass the managed-file ownership pre-call hook, creating a cross-user authorization risk if a caller obtains another user's raw file ID.

## Reproduction

1. Configure a managed OpenAI batch deployment with per-deployment `api_key` / `api_base` rather than global `OPENAI_API_KEY`. 2. Upload managed input via `/v1/files`, create `/v1/batches`, and wait for completion. 3. Retrieve the managed batch during the terminal DB-read path when no managed-file row exists for the raw provider output ID. 4. Call `/v1/files/{output_file_id}/content`.

Actual: a raw `file-*` is returned and content retrieval 500s due to missing credentials.

## Root cause

The terminal-state path calls `resolve_output_file_ids_t…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h10m38s ago — entered · #import:https:::github.com:berriai:litellm post #2668
The left issue spans asynchronous batch lifecycle handling, managed-resource persistence, credential propagation, and authorization boundaries, requiring coordinated changes and broader regression coverage. The right issue is comparatively localized to provider request transformation and validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search