feat(cli): scaffold selected backend framework - #785
Open
vishxrad wants to merge 14 commits into
Open
Conversation
vishxrad
marked this pull request as ready for review
July 16, 2026 14:56
vishxrad
force-pushed
the
visharad/th-2051-route-replacement
branch
from
August 4, 2026 10:04
92faf00 to
dcbc7d3
Compare
…e-replacement # Conflicts: # packages/openui-cli/src/templates/openui-cloud/package-lock.json # packages/openui-cli/src/templates/openui-self-hosted/package-lock.json
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
abhithesys
reviewed
Aug 5, 2026
abhithesys
left a comment
Contributor
There was a problem hiding this comment.
use adapters on frontend for message transformation and framework native streaming
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ToolMessageresults in the frontend adapter so multi-step history remains validget_weatheras the app-owned diagnostic tool for every Cloud route and both self-hosted framework routesFramework behavior
Self-hosted
none: OpenAI SDK Chat Completions route + OpenAI frontend adapter/message formatlanggraph: inlineStateGraphreturnsgraph.stream(..., { encoding: "text/event-stream" }); the frontend useslangGraphAdapter()andlangGraphMessageFormatvercel-ai-sdk:streamText()returnstoUIMessageStreamResponse(); the frontend lets the AI SDK decode its own SSE and maps the typed UIMessage chunks into Agent Interface eventsThe Vercel OSS scaffold consumes
vercelAIAdapter()andvercelAIMessageFormatfrom@openuidev/react-headlessthrough the@openuidev/react-uipublic re-export. This PR carries the reviewed package implementation as a backup and requires@openuidev/react-headless^0.9.6; publish headless 0.9.6 before publishing this CLI update.OpenUI Cloud
OpenUI Cloud remains the model provider and conversation store for every Cloud variant. Artifact generation, web search, image search, and configured MCP tools continue to execute in Cloud.
Selecting LangGraph or Vercel AI SDK does not replace the OpenAI SDK Responses transport or configure a second model provider. It adds framework-native app tools on the user server; the route sends those function outputs back into the same stored Cloud conversation. No second persistence layer is required for the normal tool loop.
Choose the self-hosted template when using a user-owned model provider.
LangChain package note
@openuidev/langchaintargets a separate LangGraph protocol-v2 server and requires an API URL, assistant ID, agent-side stream transformer, and a second process/deployment. The CLI self-hosted LangGraph option is an inlineStateGraphinside the Next.js route, so adopting that package would require a separate scaffold topology rather than a route/page replacement.Issue
TH-2051 — Ask for backend framework in CLI
Validation
main(0 commits behind at push time)pnpm --filter @openuidev/cli run cipnpm --filter @openuidev/cli buildpnpm --filter @openuidev/react-ui run build@openuidev/react-headless@0.9.6, installed it into fresh generated LangGraph and Vercel OSS apps, and completed both Next.js production buildslangGraphAdapter()