[PR #525] [MERGED] Add streaming and web socket support to UI proxy #524

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

📋 Pull Request Information

Original PR: https://github.com/run-llama/llama_deploy/pull/525
Author: @adrianlyjak
Created: 5/31/2025
Status: Merged
Merged: 6/3/2025
Merged by: @masci

Base: mainHead: stream


📝 Commits (1)

  • 17ef7cb Add streaming and web socket support to UI proxy. Adjust basic UI to better support images

📊 Changes

12 files changed (+4441 additions, -115 deletions)

View changed files

examples/quick_start/ui/app/confetti/page.tsx (+64 -0)
📝 examples/quick_start/ui/app/page.tsx (+25 -15)
📝 examples/quick_start/ui/next.config.ts (+4 -2)
📝 examples/quick_start/ui/package.json (+10 -7)
examples/quick_start/ui/pnpm-lock.yaml (+3783 -0)
📝 llama_deploy/apiserver/routers/ui.py (+165 -23)
📝 pyproject.toml (+4 -2)
📝 templates/basic/ui/app/page.tsx (+2 -2)
📝 templates/basic/ui/next.config.ts (+2 -1)
📝 tests/apiserver/routers/test_deployments.py (+6 -2)
📝 tests/apiserver/routers/test_ui.py (+338 -38)
📝 uv.lock (+38 -23)

📄 Description

This adds streaming support, both HTTP and websockets:

  • next.js dev server works nicely now with hot reloading, and
  • Can support SSE event style things now, when those are returned from the next.js backend

Also noticed basic example had issues with images not rendering, perhaps introduced by the basePath change. To workaround, this introduces some new environment variables. Unfortunately next.js just doesn't take basePath (or assetPrefix I think?) into account for images, so you manually need to prepend the path from some sort of configuration.

https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath#images

image

🔄 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/llama_deploy/pull/525 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 5/31/2025 **Status:** ✅ Merged **Merged:** 6/3/2025 **Merged by:** [@masci](https://github.com/masci) **Base:** `main` ← **Head:** `stream` --- ### 📝 Commits (1) - [`17ef7cb`](https://github.com/run-llama/llama_deploy/commit/17ef7cb1dd94e352d96d5abba1f9f25bc2a27d0c) Add streaming and web socket support to UI proxy. Adjust basic UI to better support images ### 📊 Changes **12 files changed** (+4441 additions, -115 deletions) <details> <summary>View changed files</summary> ➕ `examples/quick_start/ui/app/confetti/page.tsx` (+64 -0) 📝 `examples/quick_start/ui/app/page.tsx` (+25 -15) 📝 `examples/quick_start/ui/next.config.ts` (+4 -2) 📝 `examples/quick_start/ui/package.json` (+10 -7) ➕ `examples/quick_start/ui/pnpm-lock.yaml` (+3783 -0) 📝 `llama_deploy/apiserver/routers/ui.py` (+165 -23) 📝 `pyproject.toml` (+4 -2) 📝 `templates/basic/ui/app/page.tsx` (+2 -2) 📝 `templates/basic/ui/next.config.ts` (+2 -1) 📝 `tests/apiserver/routers/test_deployments.py` (+6 -2) 📝 `tests/apiserver/routers/test_ui.py` (+338 -38) 📝 `uv.lock` (+38 -23) </details> ### 📄 Description This adds streaming support, both HTTP and websockets: - next.js dev server works nicely now with hot reloading, and - Can support SSE event style things now, when those are returned from the next.js backend Also noticed basic example had issues with images not rendering, perhaps introduced by the `basePath` change. To workaround, this introduces some new environment variables. Unfortunately next.js just doesn't take `basePath` (or assetPrefix I think?) into account for images, so you manually need to prepend the path from some sort of configuration. https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath#images <img width="672" alt="image" src="https://github.com/user-attachments/assets/b324ceb1-0a9e-42af-9158-28904799da16" /> --- <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:15:28 -05:00
yindo closed this issue 2026-02-16 02:15:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_deploy#524