Skip to content

feat(desktop): allow Side Conversations to select an independent model - #4499

Open
amaldevcm wants to merge 4 commits into
apache:mainfrom
amaldevcm:feat/side-conversation-model-picker
Open

feat(desktop): allow Side Conversations to select an independent model#4499
amaldevcm wants to merge 4 commits into
apache:mainfrom
amaldevcm:feat/side-conversation-model-picker

Conversation

@amaldevcm

Copy link
Copy Markdown

Summary

  • Side Conversation Composer now exposes the normal model picker once the fork is committed, scoped to that companion Session only (with the same provider brand marks as the main composer's picker).
  • Selecting a different model updates only the Side Conversation Session; the source Session's model is untouched, and later changes to the source Session's model do not overwrite an existing Side Conversation selection.
  • Model changes are rejected while a Turn is running (same admission rule as ordinary Sessions) and are retryable on failure, without recreating the fork or losing its transcript/drafts/quotes.

Implementation

  • SideChatSessionPort.setModel (session-id scoped) added and wired to the existing bridge.sessions.setModel IPC call.
  • useQuoteCompanion gains a setModel action mirroring the existing setPermissionMode pattern (turn-in-flight guard, pending state, non-destructive failure handling).
  • QuoteCompanionPanel passes activeSession/modelChoices/onModelChange/modelSwitchAvailability/renderProviderMark to Composer once the companion fork exists, which flips the static read-only chip into the real ChatModelSwitcher — the same component and props contract the main conversation already uses.
  • renderProviderMark threaded end-to-end (app-shell.tsxuseWorkbarControllerWorkbarHostWorkbarSurfaceQuoteCompanionPanel) for full visual parity with the main picker.

Closes #4495

Test plan

  • tsc --noEmit clean on the renderer project for all touched files
  • Manual verification: open a Side Conversation, confirm model picker appears after fork commits, switch model, confirm source Session model is unaffected and vice versa
  • Manual verification: attempt a model change mid-Turn is rejected; a failed change is retryable

glm-5.3 (and others) were missing thinking-effort choices because an
unrecognized modality value (upstream's new 'video') aborted the entire
refresh instead of just that one model, so the committed snapshot never
got updated. Filter unknown modality values per-model instead of
rejecting the whole refresh, add a sanity floor to catch a degraded
upstream response, and schedule a nightly refresh job that opens a PR
for review.

Addresses the snapshot-staleness root cause in apache#4398; the client-side
catalog-authority and runtime-refresh changes remain separate work.
Side Conversations still inherit the source Session's model at fork
time, but the Composer now exposes the normal model picker once the
fork is committed, scoped to that companion Session only. Selecting a
different model updates just the Side Conversation; changing the
source Session's model no longer overwrites it. Model changes are
rejected while a Turn is running and are retryable on failure, mirroring
the existing setPermissionMode plumbing.

Closes apache#4495
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 1, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up, but I think we need to discuss if this feature is going to be implemented before doing it. btw It need a before after comparison.

…n-model-picker

# Conflicts:
#	scripts/model-metadata/models-dev-api.snapshot.json
#	scripts/sync-model-metadata.mjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(desktop): allow Side Conversations to select an independent model

2 participants