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

#29005 [Bug]: streamGenerateContent returns 500 when model is missing, should return 404 model not found

  • State: open
  • Author: @jgiudici-gfm
  • Labels: bug, proxy, llm translation

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

If you use a gemini model that its deprecated, you get a 500 instead of a 404 like the rest of the apis : ``` curl -i -L -X POST 'https://localhost:4000/v1beta/models/gemini/gemini-3.1-flash-lite-preview:streamGenerateContent' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer token123' \ -d '{ "contents": [ { "parts": [ { "text": "Explain quantum computing" } ], "role": "user" } ], "generationConfig": { "maxOutputTokens": 500 } }' HTTP/2 500 content-type: text/plain; charset=utf-8 date: Wed, 27 May 2026 17:32:26 GMT server: uvicorn content-length: 21

Internal Server Error% ``` The 500 should be actually a 404

### Steps to Reproduce

1. 2. 3.

### Relevant log output

```shell

```

### What part of LiteLLM is this about?

Proxy

### What LiteLLM version are you on ?

v1.83.14

### Twitter / LinkedIn details

_No response_

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h57m49s ago — entered · #import:https:::github.com:berriai:litellm post #2911
OpenTelemetry attribute normalization spans shared instrumentation, type handling, compatibility, and regression testing across tracing paths; the HTTP status correction is narrower and likely localized to proxy/provider error mapping.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search