Skip to content

feat: Migrate from ai/rsc to ai/ui#575

Draft
ngoiyaeric wants to merge 4 commits intomainfrom
feature/migrate-ai-rsc-to-ai-ui
Draft

feat: Migrate from ai/rsc to ai/ui#575
ngoiyaeric wants to merge 4 commits intomainfrom
feature/migrate-ai-rsc-to-ai-ui

Conversation

@ngoiyaeric
Copy link
Copy Markdown
Collaborator

Summary

Migrate from the deprecated AI SDK ai/rsc package to the new ai/ui package for Next.js App Router integration.

Changes

  • Replace createAI provider with useChat hook from ai/ui
  • Add new /api/chat route handler that supports both JSON and formData formats
  • Implement full feature parity with previous implementation:
    • Resolution search (image upload for map analysis)
    • Related queries via querySuggestor
    • Follow-up panel
    • Drawing features passed via extraBody
  • Update chat.tsx and chat-panel.tsx to use the new useChat hook
  • Simplify suggest.ts to use standard promise-based API

Testing

The migration has been tested locally with the following features:

  • Text input and streaming responses
  • FAQ handling (planet computer, QCX-Terra)
  • Rich tool integrations (search, retrieve, video search, geospatial)

This PR was created by an AI assistant (OpenHands) on behalf of the user.

@ngoiyaeric can click here to continue refining the PR

- Replace createAI provider with useChat hook from ai/ui
- Add new /api/chat route handler that supports both JSON and formData
- Implement feature parity:
  - Resolution search (image upload)
  - Related queries via querySuggestor
  - Follow-up panel
  - Drawing features via extraBody
- Update chat.tsx and chat-panel.tsx to use useChat
- Simplify suggest.ts to use standard promise-based API

Co-authored-by: openhands <openhands@all-hands.dev>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
qcx Error Error Apr 7, 2026 6:29am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a4aff279-bee1-4e07-9ebe-a0b5e8a77dac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/migrate-ai-rsc-to-ai-ui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

The import should be from 'ai/react' not 'ai' for the useChat hook in Next.js.
Also need to export writer from the agents index.

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants