Skip to content

tui: bindable "set as default model for this agent" action in model dialog #47836

Description

@abran-labs

Summary

The model dialog (/models) supports ctrl+f to favorite a model, but there is no way to persist a model as the default for an agent from the UI. Setting an agent default — including for subagent-mode agents — currently requires hand-editing opencode.json(c) or agent Markdown frontmatter.

Environment

  • opencode version: 0.0.0-beta-19157
  • OS: Linux 7.1.6-arch1-1 (x64)
  • Terminal: ghostty (xterm-ghostty, truecolor)
  • Shell: /usr/bin/bash
  • Install/channel: beta
  • Active plugins: omo-v2 (local), local TUI plugins under ~/.config/opencode/plugins/tui

Reproduction

  1. Open /models in the TUI and highlight a model.
  2. Press ctrl+f — favorite toggles.
  3. Look for a "set as default" action — none exists.

Expected Behavior

A bindable action in the model dialog (e.g. ctrl+d) that sets the highlighted model as the default model for the current agent — equivalent to writing agents.<id>.model in config. Ideally this also works for subagent-mode agents, e.g. reachable from the agent list or a child-session view, since subagent models are otherwise only configurable by editing config files by hand. Subagents that have no configured model silently inherit the parent session model, so there is currently no UI surface at all for controlling what model a subagent runs on.

Actual Behavior

No such action exists. Switching an agent's default model requires manually editing agents.<id>.model in opencode.json(c) or the agent's frontmatter.

Additional Context

/models on a primary session only changes that session's model; it does not persist a per-agent default. As a workaround I built a local TUI plugin with its own agent→model picker dialog that writes agents.<id>.model (format-preserving JSONC edit). The missing built-in pieces are:

  1. A "set as default for this agent" action in the model dialog.
  2. Agent context in that action so it can target subagents, not just the current primary agent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions