Skip to content

[Bug]: Message header hover reveals the raw model id when a modelLabel is configured #15490

Description

@aruj0

What happened?

Since #14851 the message header crossfades the sender label to the raw message.model on pointer hover or keyboard focus, and always renders an sr-only "Model: …" line. That ignores a configured modelLabel.

A preset or modelSpecs entry that sets modelLabel has chosen what the header says. The persisted message.sender (getResponseSender), the streaming placeholder and the composer (useGetSender) all honour it. The hover swap then shows the underlying model one interaction later, and the sr-only text announces it regardless of hover.

The four header sites pass message.model straight through:

// client/src/components/Chat/Messages/ui/MessageRender.tsx:160
hoverLabel={getHeaderModelName(agent?.model, assistant?.model, msg.model, ...)}
// same in Chat/Messages/MessageParts.tsx, Messages/ContentRender.tsx, Share/Message.tsx

getHeaderModelName only filters out agent_ / asst_ document ids. Nothing on this path reads conversation.modelLabel.

#14909 already exempted agent conversations from surfacing the model for the same reason. Any conversation that carries a modelLabel should get the same treatment.

Concrete case: a custom endpoint exposed to users under a product name through a model spec with preset.modelLabel. Every surface shows the product name except the header on hover, which shows the provider's model id. Shared conversations (Share/Message.tsx) leak it too.

Expected: when conversation.modelLabel is set, the header renders the label with no hover swap and no sr-only model text. Without a label, unchanged.

Version Information

main @ 16e4d14 (source build). Also present on dev @ a3c2277; the header files are identical.

Steps to Reproduce

  1. Add a modelSpecs entry with preset.modelLabel: "Acme Assistant" pointing at any endpoint/model.
  2. Start a conversation on that spec and send a message.
  3. Hover the "Acme Assistant" header on the response, or Tab focus onto the message row.
  4. The label crossfades to the raw model id. Inspect the header: the sr-only "Model: " span is present without hovering.
  5. Share the conversation and open the share link: same behaviour.

Relevant log output

No errors; UI only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions