Fresh chat's model chip names its starting model

Merged
TE
25d ago
+186-1

Summary

A chat started from a New Tab showed Model on its chip, with an empty context ring, for the few seconds before its session reported a model, and then switched to the real name. The chip now names the model the chat starts on right away. It names exactly the model the New Tab asked the chat to start on, by the New Tab's own rule (cx-e2aa): the last pick in this folder, else the agent profile's model, else the agent's first listed model, else the model catalog's default.

The fallback applies only to a fresh chat on this Mac (no turns yet, not remote or cloud), while the session has reported no model and no agent switch is in flight. A resumed or remote chat may run another model, so its chip still waits for the session. Once the session reports, the chip shows what it reports.

Test

webviews/test/model-chip-fresh-chat.test.tsx mounts ComposerPickers with the real bundled model catalog, for chats whose summary names no model yet. It compares the chip with what the New Tab asks for (newTabStart, useNewTabChipModel) under the same storage, with and without a last pick. It also checks that a resumed chat and a remote chat do not guess.

  • Red at 9c74aea43772: Expected: "Claude Sonnet 5", Received: "Model".
  • Review follow-up: red at 1e8e6cc40e75 (Expected: "Claude Fable 5.1", Received: "Claude Sonnet 5", and a resumed chat that guessed), green at 0d3ef98a15d2.
  • First green at ef4f00bfec26.

I also ran:

  • bun run check: clean.
  • The jsdom model-picker, New Tab and composer suites: all passed.

The browser-lane New Tab suites were skipped locally. The New Tab chip is unaffected because its summary always carries a model.

Changelog

  • Fixed: a new chat's model chip names its model right away instead of a bare "Model".

closes cx-21jvw

šŸ¤– Generated with Claude Code