mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #1773] [MERGED] Fixed OpenRouter heart beats breaking streaming #20772
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/1773
Author: @Rmaan
Created: 4/26/2024
Status: ✅ Merged
Merged: 4/26/2024
Merged by: @tjbck
Base:
dev← Head:fix-openrouter-streaming📝 Commits (2)
7449634Fix OpenRouter hearbeats breaking streaming4ad7ef8add else📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
📝
src/lib/apis/streaming/index.ts(+4 -0)📄 Description
Pull Request Checklist
No need
No
Description
Open WebUI doesn't work with Open Router as advertised in the Readme. When you try to do a chat completion, you can see errors on the front-end like:

Underlying reason is OpenRouter, when used in streaming mode sends heart beats in the stream like
: OPENROUTER PROCESSINGbut front-end is not ignoring them.According to MDN all events that starts with a colon should be ignored. I simply did that.
Changelog Entry
Fixed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.