feature :: Update chat UI to use Vercel AI SDK + OpenAI support#137
Closed
jjjorgenson wants to merge 2 commits intoreplicatedhq:mainfrom
Closed
feature :: Update chat UI to use Vercel AI SDK + OpenAI support#137jjjorgenson wants to merge 2 commits intoreplicatedhq:mainfrom
jjjorgenson wants to merge 2 commits intoreplicatedhq:mainfrom
Conversation
Replace custom chat implementation with Vercel AI SDK for improved streaming and provider flexibility. Changes: - Add /api/chat streaming endpoint using AI SDK Core streamText - Add AIChatContainer component using useChat hook - Add provider abstraction for easy Anthropic/OpenAI switching - Port system prompts from Go to TypeScript - Add message adapter for DB to AI SDK format conversion - Add tool support (getLatestSubchartVersion, getLatestKubernetesVersion) - Fix middleware to return 401 for unauthenticated API requests - Add USE_AI_SDK_CHAT feature flag for gradual rollout - Add unit tests for message adapter - Add Playwright API tests for /api/chat The existing Centrifugo-based chat for plans/renders is preserved. Set USE_AI_SDK_CHAT=true to enable the new streaming chat.
feat: migrate chat UI to Vercel AI SDK
Member
|
Closing duplicate AI SDK migration attempt - consolidated elsewhere |
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.
/api/chatstreaming endpoint using AI SDK Core'sstreamTextAIChatContainercomponent usinguseChathook from@ai-sdk/reactChanges
/api/chatwith streaming and tool supportAIChatContainer,useChartsmithChathooklib/llm/provider.tsfor LLM switchingpkg/llm/system.goUSE_AI_SDK_CHAT=trueenables new chat