[PR #107] [MERGED] feat: switch to SSE by default #125

Closed
opened 2026-02-16 02:16:40 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-py/pull/107
Author: @adrianlyjak
Created: 9/22/2025
Status: Merged
Merged: 9/22/2025
Merged by: @adrianlyjak

Base: mainHead: adrian/sse-default


📝 Commits (2)

  • d7ce9de feat: switch to SSE by default
  • 8e75b84 Remove commented out comment

📊 Changes

5 files changed (+129 additions, -100 deletions)

View changed files

📝 examples/server/server_example.py (+1 -1)
📝 src/workflows/server/server.py (+19 -11)
📝 src/workflows/server/static/main.js (+79 -58)
📝 tests/server/test_server_endpoints.py (+28 -28)
📝 uv.lock (+2 -2)

📄 Description

I'm looking at integrating SSE support to llama-ui and the generated workflows-client. For hey-api to generate an SSE stream client, it requires the response format to be explicitly just SSE. Seems reasonable to have this as the default, as its more of a standard. When using SSE, browser are able to render the response stream as data comes in

firefox example:

image

Changes:

  • Changes the SSE response format. Using the event name as a type: field is pretty restrictive to clients. To subscribe to "non default" sse events (those that have a type). You need to add an event handler for each event type. an eventSource.addEventListener("<qualified event name>", (event) => {}). This renders the SSE events largely unusable. Instead, events are emitted very similar to the ndjson, with the fully serialized event
  • Updates the debugger ui to use sse events
  • updates the sse query param default from false to true. This is a breaking change, but I don't think anyone is yet using this server, and our internal clients are all providing the sse true/false param

🔄 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/run-llama/workflows-py/pull/107 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 9/22/2025 **Status:** ✅ Merged **Merged:** 9/22/2025 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `adrian/sse-default` --- ### 📝 Commits (2) - [`d7ce9de`](https://github.com/run-llama/workflows-py/commit/d7ce9de545171e778131fff1a1082a9ac808bd76) feat: switch to SSE by default - [`8e75b84`](https://github.com/run-llama/workflows-py/commit/8e75b8404bb051824ca5c4f7f07297844e45d70c) Remove commented out comment ### 📊 Changes **5 files changed** (+129 additions, -100 deletions) <details> <summary>View changed files</summary> 📝 `examples/server/server_example.py` (+1 -1) 📝 `src/workflows/server/server.py` (+19 -11) 📝 `src/workflows/server/static/main.js` (+79 -58) 📝 `tests/server/test_server_endpoints.py` (+28 -28) 📝 `uv.lock` (+2 -2) </details> ### 📄 Description I'm looking at integrating SSE support to llama-ui and the generated workflows-client. For hey-api to generate an SSE stream client, it requires the response format to be explicitly just SSE. Seems reasonable to have this as the default, as its more of a standard. When using SSE, browser are able to render the response stream as data comes in firefox example: <img width="555" height="333" alt="image" src="https://github.com/user-attachments/assets/39ff9a9b-c70a-41f0-b0ec-5035fa5200f3" /> Changes: - Changes the SSE response format. Using the event name as a `type:` field is pretty restrictive to clients. To subscribe to "non default" sse events (those that have a type). You need to add an event handler for each event type. an `eventSource.addEventListener("<qualified event name>", (event) => {})`. This renders the SSE events largely unusable. Instead, events are emitted very similar to the ndjson, with the fully serialized event - Updates the debugger ui to use sse events - updates the sse query param default from false to true. This is a breaking change, but I don't think anyone is yet using this server, and our internal clients are all providing the sse true/false param --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:16:40 -05:00
yindo closed this issue 2026-02-16 02:16:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#125