mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @konradzamojski on GitHub (Feb 4, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21162
Bug Report: API stream parameter still ignored after #19154 fix
🐛 Description
While issue #19154 fixed the problem where
stream_responsesetting was not being applied in v0.6.36, it introduced a new regression: thestreamparameter sent in API requests is now always overridden by the model'sstream_responsesetting.This breaks OpenAI API compatibility and makes it impossible to control streaming behavior per-request, which is critical for frameworks like LangChain.
📋 Environment
🔍 Problem History
Issue #19154 (November 2025)
Problem: In v0.6.36,
stream_responsesetting was not being appliedFix: Commit
f138be9added code to apply model'sstream_responseResult: ✅ Model setting is now applied, BUT ❌ API parameter is now ignored
Current Problem (v0.7.2+)
Problem: API
streamparameter is always overridden by model settingImpact: Cannot control streaming per-request via API
Breaks: OpenAI API compatibility, LangChain integration
🔧 Root Cause
Current code in
backend/open_webui/main.py(after fix #19154):Problem: This code unconditionally overwrites the
streamparameter from API requests.🎯 Expected Behavior vs Actual
Test 1: API with
stream: falseExpected: JSON response (not streamed) - API parameter should be respected
Actual: Response streaming (SSE) - API parameter ignored ❌
Test 2: API with
stream: trueExpected: SSE chunks (streamed)
Actual: Depends on model setting, not API parameter ❌
Test 3: No stream parameter
Expected: Use model's default setting ✅
Actual: Uses model setting ✅ (this works correctly)
✅ Proposed Solution
The fix should respect both requirements:
stream_responsesetting (from #19154)Recommended Fix:
This solution:
🧪 Test Results
After applying the proposed fix:
stream: falsestream: truefalsetrueAll tests passing! ✅
💥 Impact
Who is affected:
streaming=True/False)Severity: High - Breaks API compatibility
🔗 Related Issues & PRs
f138be9- The commit that needs refinement📝 Additional Notes
Why This Is Important
streamparameter per-requestif "stream" not in form_data and ...)Backward Compatibility
The proposed fix is 100% backward compatible:
streamparam: unchanged ✅🙋 Proposed Solution
I have:
Would you like me to create a Pull Request with this fix?
Priority: High (API compatibility regression)
Difficulty: Trivial (one-line change)
Impact: High (affects all API users)
Regression from: #19154 (commit
f138be9)@silentoplayz commented on GitHub (Feb 4, 2026):
A PR is welcome here!
@konradzamojski commented on GitHub (Feb 5, 2026):
I've created a PR to fix this issue: #21175
The fix is simple and maintains backward compatibility while respecting the API stream parameter.
@konradzamojski commented on GitHub (Feb 5, 2026):
Updated: Created PR #21176 (targeting dev branch with CLA)
The fix is ready for review!
@Classic298 commented on GitHub (Feb 5, 2026):
You didnt add the CLA (correctly)
@tjbck commented on GitHub (Feb 5, 2026):
This is intended, you should set it to default for your use case.