Repository navigation
Conversation
Footers and the prompt name a model by its display name, which is the same for a model served by two providers, or by a provider and its clone, and is not what a config or a model picker takes. session.model_label: id shows providerID/modelID instead, in assistant footers and below the prompt. The default is unchanged.
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
Works as described. I ran the TUI from source with the simulated model and session.model_label: "id". On the base, the footer reads Build · Simulated Model. With this PR, both the footer and the prompt read simulation/gpt-sim-model. The default name keeps today's output. The new config test and typecheck in packages/tui pass.
Public API: adds one optional TUI config key, session.model_label ("name" | "id", default "name"), with a matching settings-dialog entry and docs row. Backwards compatible: existing configs are unaffected. The server, SDK and plugin APIs are unchanged.
One small thing is noted inline: in id mode, the prompt drops the (unavailable) marker for a model that isn't in the catalog.
Related: #53846
| const selection = local.model.selection() | ||
| if (config.session?.model_label !== "id" || !selection) | ||
| return { modelLabel: parsed.model, providerLabel: parsed.provider } | ||
| return { modelLabel: `${selection.providerID}/${selection.modelID}`, providerLabel: "" } |
There was a problem hiding this comment.
In id mode this always returns provider/model. If the selected model isn't in the catalog, parsed().model would have shown <id> (unavailable), but here that hint is lost, so the prompt looks normal for a model that can't be used. Could you keep the marker in id mode? For example, append (unavailable) when the model isn't found in the catalog.
|
Closing this for now: I'm limiting myself to at most 3 open PRs on this repo to keep the review load reasonable. I may reopen it later. Thanks for your time! |


Issue for this PR
Closes #53638
Type of change
What does this PR do?
Footers and the prompt name a model by its display name. The same model served by two providers looks identical, and the name is not what a config or the model picker takes.
This adds
session.model_label(nameby default, orid). Withid, assistant footers and the prompt showproviderID/modelID, e.g.anthropic/claude-sonnet-4-5.How did you verify your code works?
bun run typecheckandbun test test/config-v2.test.tsxinpackages/tui. I also ran it in a real terminal: a TUI from this branch (serve --stdioplus--server) on a throwaway tmux server, scratch data dir, and a fake OpenAI-compatible provider on loopback. Withsession.model_label: "id", the footer showsfake/fake-model. The same check fails ondev.Screenshots / recordings
Text captures are in the description above.
Checklist
This PR is AI generated, but under direct supervision and on request of @Nowaker.
Added by the opencode bot (AI-generated).
Related: #53846
Public API: adds the optional TUI config key
session.model_label(name|id, backwards compatible)