The terminal UI needs a discoverable model switch path that stays scriptable.
The default interactive path is a command-shaped autocomplete popup in the
composer; explicit /model <target> commands remain the only execution
contract.
/model or /model in the composer opens a model popup above the
input area./model show the current session model and
configured selectable models as text./model list is the explicit list form./model main switches to model.main./model lite switches to model.lite when it is configured./model <provider/model> switches to a configured selectable model with that exact id.model.main, optional model.lite, and every model declared under every configured provider.*.models./model <provider/model>
through the normal command center path./model <provider/model> without
submitting, matching the existing slash command autocomplete behavior.TUI must not own model selection state. It may keep a render projection of the current provider, model, and thought level, just like it keeps the current mode and traceId, but session model state lives in bootstrap/core/session storage.
The TUI sends /model ... through the same submit callback as other slash commands. The command center asks the app/server for current model state, available model options, and applies the selected model through an explicit app-level method. The TUI renders the returned command text and updates its session metadata projection from the returned model and thoughtLevel fields.
For composer autocomplete, the CLI passes a read-only list of selectable models
into TUI options. The TUI may recognize the draft shape /model... only to
filter and render local suggestions. It owns only the popup filter, highlighted
index, and completion behavior; it does not cache model catalog state or apply
model switches directly.
Run section renders Provider and Model as separate rows./, matching the runtime provider/model contract where model
ids may themselves contain /.Provider row renders
- and the Model row renders the bare id.model_selected session event with modelRef.providerId and
modelRef.modelId refreshes the same display projection as a /model command
result. The TUI still does not store provider and model as authoritative state./model. It receives optional initialModel,
initialThoughtLevel, and read-only model options from the CLI bootstrap path
before the first render and later updates active model display only from
TuiSubmitPromptResult or live model request events./model and dispatches to the app-level model contract.model.available runtime catalog. It must preserve provider connection fields so switching to a model from another provider can run without TUI state.getModel, getThoughtLevel, listModels, and setModel
as narrow server-side APIs.ModelRef through AgentRuntime.updateConfig({ modelRef, modelProviderOptions }).modelProviderOptions from the configured main
model target, or from the catalog default thought level when the target does
not declare explicit options, so the first turn and first render reflect the
same model provider settings as later /model switches./model returns a command response.model.lite is not configured, /model lite reports the available model ids and aliases./model or /model list reports the condition in text.provider/ separator; command parsing must not lowercase full model refs./model.submitPrompt./model to the app/server contract./model <id>, Tab completion into the draft, and Esc dismissal.provider/model renders as separate Provider
and Model rows, including model ids that contain /.model_selected payloads with providerId and
modelId update the current model projection.model.available.setModel update runtime modelRef and clear/replace
modelProviderOptions, including catalog default thought provider options
when a model has selectable reasoning but no explicit target options.npm run lint and npm test pass before completion.