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

#29431 [Bug]: stream_options sent in non-streaming requests causes 400 from vLLM

  • State: open
  • Author: @Sechma
  • Labels: bug, llm translation

### Check for existing issues

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

### What happened?

I faced this issue over codiumai/pr-agent:latest where the model is my local model, for the interference backend I'm using vLLM

litellm includes stream_options: {"include_usage": True} in the request body even when the call is non-streaming. vLLM strictly rejects this with 400 — stream_options is only valid when stream=True.

This was silently hidden when using Ollama as backend (ignores unknown fields). Switching to vLLM exposed the bug.

### Steps to Reproduce

import litellm

response = litellm.completion( model="openai/my-model", messages=[{"role": "user", "content": "say hi"}], api_base="http://my-vllm-host:8000/v1", api_key="my-key", # stream not set / stream=False )

VLLM -> VLLMValidationError: Stream options can only be defined when `stream=True`.

Or over curl curl https://my-vllm-host:8000/v1/chat/completions \ -H "Authorization: Bearer my-key" \ -H "Content-Type: application/json" \ -d '{ "model": "my-model", "messages": [{"role": "user", "content": "say hi"}], "stream_options": {"include_usa…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d19h1m56s ago — entered · #import:https:::github.com:berriai:litellm post #1820
The right issue is harder because it spans proxy authorization semantics, model discovery filtering, configuration edge cases, and regression coverage, while the left issue is a comparatively localized request-parameter condition.
#0 of 0 · 31d18h15m52s ago — current · #import:https:::github.com:berriai:litellm post #2570
30456 requires defining an unclear integration contract, mapping behavior across SDK/provider paths, and adding broader compatibility and regression coverage. 29431 is a narrowly scoped request-parameter gating fix with a comparatively contained test surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search