[PR #23930] [CLOSED] fix: add delta.role and consistent chunk ID to Ollama SSE conversion #43072

Closed
opened 2026-04-25 14:46:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23930
Author: @pvyswiss
Created: 4/21/2026
Status: Closed

Base: mainHead: fix/ollama-sse-role-and-chunk-id


📝 Commits (1)

  • 944f99c fix: add delta.role and consistent chunk ID to Ollama SSE conversion

📊 Changes

1 file changed (+11 additions, -0 deletions)

View changed files

📝 backend/open_webui/utils/response.py (+11 -0)

📄 Description

Summary

Fixes #23922 (Ref: #23917 Bug 3)

  • Generate one chatcmpl-{uuid4()} ID before the stream loop, assign to all chunks
  • Add delta.role: "assistant" to the first SSE chunk
  • Both required by the OpenAI SSE spec for proper SDK chunk correlation

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23930 **Author:** [@pvyswiss](https://github.com/pvyswiss) **Created:** 4/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/ollama-sse-role-and-chunk-id` --- ### 📝 Commits (1) - [`944f99c`](https://github.com/open-webui/open-webui/commit/944f99cc9a9ea6872489b4d6ae0b7811d2872440) fix: add delta.role and consistent chunk ID to Ollama SSE conversion ### 📊 Changes **1 file changed** (+11 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/response.py` (+11 -0) </details> ### 📄 Description ## Summary Fixes #23922 (Ref: #23917 Bug 3) - Generate one `chatcmpl-{uuid4()}` ID before the stream loop, assign to all chunks - Add `delta.role: "assistant"` to the first SSE chunk - Both required by the OpenAI SSE spec for proper SDK chunk correlation --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 14:46:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#43072