litellm - ✅(Solved) Fix Docs: clarify timeout vs stream_timeout for OpenAI streaming reliability [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24317Fetched 2026-04-08 01:13:21
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1

In a remote self-hosted setup (Open WebUI/OpenHands -> LiteLLM -> OpenAI), we observed intermittent streaming interruptions with:

  • Timeout on reading data from socket

Root Cause

Without explicit guidance, users often tune only router timeout and still see mid-stream cutoffs.

Fix Action

Fix / Workaround

Our temporary mitigation

Per-model config for premium-openai:

  • timeout: 180
  • stream_timeout: 180

PR fix notes

PR #24376: Docs: clarify timeout vs stream_timeout guidance

Description (problem / solution / changelog)

Summary

  • clarify that stream_timeout applies to streamed reads / chunk gaps, not just the first token
  • explain fallback behavior when stream_timeout is not set
  • add practical starting values for remote/self-hosted streaming setups

Fixes #24317 EOF

Changed files

  • docs/my-website/docs/proxy/config_settings.md (modified, +1/-1)
  • docs/my-website/docs/proxy/request_headers.md (modified, +1/-3)
  • docs/my-website/docs/proxy/timeout.md (modified, +25/-10)
RAW_BUFFERClick to expand / collapse

Summary

In a remote self-hosted setup (Open WebUI/OpenHands -> LiteLLM -> OpenAI), we observed intermittent streaming interruptions with:

  • Timeout on reading data from socket

Request

Please clarify in docs the operational difference and recommended defaults for:

  • timeout
  • stream_timeout for OpenAI streaming scenarios.

Why this matters

Without explicit guidance, users often tune only router timeout and still see mid-stream cutoffs.

Our temporary mitigation

Per-model config for premium-openai:

  • timeout: 180
  • stream_timeout: 180

This reduced failures in our environment, but we are looking for project-recommended settings and caveats.

Optional docs addition

A short troubleshooting note for Open WebUI/OpenHands users on streaming behavior and timeout knobs.

extent analysis

Fix Plan

To resolve intermittent streaming interruptions, we will update the configuration for OpenAI streaming scenarios.

  • Update timeout and stream_timeout settings in the model configuration:
    • Set timeout to 180 seconds
    • Set stream_timeout to 180 seconds

Example configuration:

premium-openai:
  timeout: 180
  stream_timeout: 180

Verification

To verify the fix, monitor the streaming interruptions and check for Timeout on reading data from socket errors. If the errors persist, further tuning of the timeout settings may be necessary.

Extra Tips

  • When tuning timeout settings, consider the trade-off between interruption frequency and latency.
  • For users experiencing mid-stream cutoffs, check the router timeout settings and adjust accordingly.
  • Additional troubleshooting notes can be added to the documentation to help users resolve streaming issues:
### Troubleshooting Streaming Issues
If you experience intermittent streaming interruptions, check the following:
* `timeout` and `stream_timeout` settings in your model configuration
* Router timeout settings

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING