8 views
-/https://github.com/berriai/litellm/issues/33423
GitHub ยท issue

#33423 [Bug]: POST /v1/videos encodes empty model_id โ†’ status/content fail with invalid_api_key for STORE_MODEL_IN_DB per-model keys (OpenAI)

  • State: open
  • Author: @ekpog200
  • Labels: proxy, llm translation

### What happened?

**Env:** LiteLLM Proxy **v1.92.0**, `STORE_MODEL_IN_DB=True`. An OpenAI `sora-2` model is registered with a **per-model** `litellm_params.api_key` (there is **no** global `OPENAI_API_KEY` in the environment).

- `POST /v1/videos` (create) **works** โ€” it correctly uses the per-model key by deployment. - `GET /v1/videos/{id}` (status) and `GET /v1/videos/{id}/content` (download) **fail** with: - `invalid_api_key` โ†’ - `APIConnectionError: 3 validation errors for VideoObject (id / object / status โ€” Field required)`

**Root cause:** the `video_id` returned by create decodes to:

``` litellm:custom_llm_provider:openai;model_id:;video_id:video_... ```

i.e. **`model_id` is empty**. On status/content the proxy has no `model_id` to resolve the deployment (and thus the per-model key) from, so it falls back to a provider default key that doesn't exist โ†’ `invalid_api_key`.

Scope: **video only** (any async job + retrieve). Text / image / audio are single-shot and work fine with per-model keys.

### Analysis (against `main`)

- `video_status` and `video_content` (`litellm/proxy/video_endpoints/endpoints.py`) set `data["model"]` **exclusively** from `resolve_model_name_frโ€ฆ

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 ยท 31d18h2m28s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #2807
The left issue spans identifier serialization, asynchronous endpoint state, deployment resolution, credential fallback, and compatibility with existing encoded IDs, requiring coordinated code and regression tests. The right issue is comparatively localized: make handler iteration operate on a stable snapshot and validate concurrent callback behavior. The left therefore carries substantially greater integration and regression risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search