Skip to content

feat(react): add an opt-in model picker to Chat - #1611

Open
blove wants to merge 3 commits into
mainfrom
blove/react-chat-model-picker
Open

blove wants to merge 3 commits into
mainfrom
blove/react-chat-model-picker

Conversation

@blove

@blove blove commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What

React Chat gets an opt-in modelPicker prop, matching the built-in model picker on the Angular chat composition.

<Chat
  session={session}
  modelPicker={{ options: models, value: model, onValueChange: setModel }}
/>
  • The picker renders in the composer before inputTrailing, the same position as Angular's model-select slot.
  • The app owns the value. Chat holds only the open state and sends nothing about the choice to the session.
  • It is hidden while options is empty, as in Angular.
  • label (default "Model") names the list; placeholder (default "Choose a model") shows while no option matches.
  • Off unless set, so existing Chat usage is unchanged. ChatPopup and ChatSidebar are children shells in React, so a Chat inside them carries the picker.

New export: ChatModelPicker (type).

Verification

  • npx nx run-many -t test,type-tests,lint -p react passes (8 new tests in model-picker.spec.tsx).
  • npx nx run-many -t build --projects=core,content,react and node scripts/react-parity/verify-packages.mjs pass.
  • node scripts/react-parity/inventory.mjs --check --drift warn passes.
  • Checked in a browser with a scratch page: the picker sits before the app's trailing control, opens, reports the choice, closes and returns focus to the trigger, with no console errors.

Not run: the LangGraph and AG-UI candidate verifiers, since nothing they cover changed.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
threadplane Ready Ready Preview Nov 16, 2026 11:03am UTC

Request Review

@blove
blove enabled auto-merge November 16, 2026 05:30

This branch was successfully deployed

1 active deployment
Preview – threadplane — 81be0e7d Deployed Nov 16, 2026 by vercel[bot]
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.

1 participant