Skip to content

feat(tui): add model_label to show provider and model ids - #53639

Closed
Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:tui-model-id
Closed

Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:tui-model-id

Conversation

@Nowaker

@Nowaker Nowaker commented Oct 7, 2026 •

Copy link
Copy Markdown

Note: I'm aware v1 is now the maintenance branch and new features go to v2 only. This PR is here for others who want to use it on v1. I will submit a v2 version once I've migrated my plugin setup to v2.

Issue for this PR

Closes #53638

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds model_label to tui.json, so you can see which provider answered each turn when the same model is reachable through more than one provider.

  • "name" (default): unchanged display names.
  • "id": providerID/modelID, e.g. anthropic/claude-opus-4-5, in every assistant message footer, and in the prompt's model indicator, where it replaces the model and provider names.

The footer uses the IDs stored on the message, so it names the provider the turn actually ran on, not the current selection. Variant and duration are unchanged. Model.label in src/util/model.ts picks the label; the footer and the prompt indicator call it.

How did you verify your code works?

  • test/util/model.test.ts covers both labels, including nested model IDs; test/config.test.tsx covers decoding. bun test and bun typecheck pass in packages/tui.
  • Isolated XDG_* dirs on a throwaway tmux socket, two OpenAI-compatible providers (qa-alpha, qa-beta) serving the same model named "QA Model". One turn on each; footers and the prompt line as captured:
# dev, or "model_label": "name"
▣  Build · QA Model · 5.3s
▣  Build · QA Model · 620ms
┃  Build · QA Model QA Beta · high

# "model_label": "id"
▣  Build · qa-alpha/qa-model · 4.9s
▣  Build · qa-beta/qa-model · 148ms
┃  Build · qa-beta/qa-model · high

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

This PR is AI generated, but under direct supervision and on request of @Nowaker.

Message footers name the model by its display name only, so the same
model served through two providers (openai and a gateway clone, a
direct API key and a proxy) reads identically, and nothing on screen
says which provider answered a turn.

model_label in tui.json picks the label: 'name' (default) keeps the
display name; 'id' shows providerID/modelID, e.g.
anthropic/claude-sonnet-4-5, in every assistant message footer and in
the prompt's model indicator, where it replaces the model and provider
names. Variant and duration stay as they are.
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
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.

[FEATURE]: show the provider and model id in message footers

2 participants