[Feature]: Use OpenCode model display names in the TUI sidebar

Author: gufeng0Created Sep 3, 2026Updated Sep 3, 2026

Description

The TUI sidebar currently displays the raw provider/model-id stored in tui-state.json. For custom providers, this can be less readable than the model display name already configured in OpenCode under provider.<provider>.models.<model>.name.

For example, OpenCode can display DeepSeek V4 Flash in its model selector, while the oh-my-opencode-slim sidebar still displays octopus/deepseek-v4-flash.

It would be useful if the sidebar could resolve and display the OpenCode model name, while retaining the raw model ID as a fallback when no display name is configured. An optional per-agent field such as modelDisplayName could also cover cases where model metadata is unavailable.

Suggested behavior:

  1. Resolve provider/model-id against OpenCode model metadata.
  2. Display the configured model name when available.
  3. Fall back to the raw model ID when no friendly name exists.
  4. Continue displaying the selected variant separately.

This would improve readability without changing provider routing or model selection.

Extra context

The current sidebar rendering splits and displays the raw model ID from snapshot.agentModels; it does not consume the friendly model name used by the OpenCode model selector.

Related work:

  • #574 introduced provider/model/variant display in the TUI.
  • #1128 and #1129 addressed layout problems caused by long model IDs through truncation.

Using the configured friendly name could complement the existing truncation behavior, particularly for custom providers.

Source: alvinunreal/oh-my-opencode-slim