Skip to content

fix: model mentions name a model in the prompt instead of switching - #17

Open
ScriptedAlchemy wants to merge 3 commits into
mainfrom
fix/model-mentions-insert-text
Open

ScriptedAlchemy wants to merge 3 commits into
mainfrom
fix/model-mentions-insert-text

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Picking a model from the composer's @ menu switched the thread's provider and model. Mentions are meant to tell the agent which model you're talking about (for example "delegate this to …"), not to change the current chat.

Selecting a model mention now inserts model:<provider-instance>/<model> (e.g. model:codex/gpt-5.4) into the prompt on web and mobile, and the thread's model stays put. Because nothing switches anymore:

  • Mentions list models from every ready provider, not only ones a started thread could switch to (dropped the locked-provider filter on web; mobile builds unlocked options for the menu).
  • Mentions stay available while a turn is running.
  • Removed the mobile onSelectModel / onUpdateModelSelection wiring that only existed for mention switching.

The inserted text avoids a leading @, since the editor renders any @token as a file chip.

Tests: formatComposerModelMention unit test, matcher test updated, and the web browser test now asserts the text is inserted and onProviderModelSelect is never called.

🤖 Generated with Claude Code (Claude Opus 5.5)

Picking a model from the @ menu switched the thread's provider and
model. Mentions are meant to tell the agent which model to use, for
example when delegating, so they now insert `model:<instance>/<model>`
into the prompt and leave the thread's model alone. Since nothing
switches, mentions offer every ready provider's models, not only those
the thread could switch to. The text has no `@` because the editor
turns `@` tokens into file chips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 63ae1e3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ScriptedAlchemy and others added 2 commits October 27, 2026 15:03
…model state

Remove the obsolete model-switch gate from web mentions, including question answers, while keeping the model picker gate intact. Drop the dead mobile selection prop, resolve model insertion through the pure command resolver, and reuse unlocked model options when possible.

Add the mobile text-and-cursor regression, assert the exact web prompt, and correct the composer guide to describe model references for delegation without changing the thread model.

Implemented with GPT-6.1 via the Codex harness.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…sert-text

# Conflicts:
#	apps/mobile/src/features/threads/ThreadComposer.tsx

This branch has not been deployed

No deployments
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