Skip to content

Model config openrouter/auto not reflected in TUI - config not being applied #15225

Closed as not planned

Description

@WellDread

Description

Setting "model": "openrouter/auto" in the config file does not get reflected in the TUI. The TUI continues to show a different model (MiniMax M2.5 Free) as the current model, despite the config file being correctly loaded.

Steps to reproduce

  1. Add the following to ~/.config/opencode/opencode.json:
{
  \"model\": \"openrouter/auto\",
  \"provider\": {
    \"openrouter\": {
      \"models\": {
        \"auto\": {}
      }
    }
  }
}
  1. Start OpenCode TUI: opencode
  2. Look at the bottom of the TUI - it shows MiniMax M2.5 Free, not openrouter/auto

Expected behavior

  • The TUI should display and use the model specified in the config file
  • OR the TUI should clearly indicate if it's overriding the config

Additional observations

  1. CLI works: opencode run \"test\" -m openrouter/auto works and shows build · auto
  2. Config loads: opencode debug config shows the model is being loaded correctly
  3. Model in list: opencode models shows openrouter/auto at position 14
  4. TUI search fails: Searching for "auto" in /models TUI returns no results
  5. CLI flag error: Using -m openrouter/auto in TUI mode gives "error model openrouter/auto is not valid"

Environment

  • OpenCode version: 1.2.10
  • OS: Pop!OS (Linux)
  • Provider: OpenRouter (with API key configured via /connect)

Suggested fix

Either:

  • Make the TUI respect the config file model setting on startup, OR
  • Allow -m openrouter/auto CLI flag to work in TUI mode (currently gives error), OR
  • Make the model appear in TUI search so it can be selected interactively

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 26, 2026
  2. sergio-agosti commented on Mar 17, 2026

    @sergio-agosti

    For me it's also failing via the CLI other than the TUI not showing the auto model to select from the list of OpenRouter models. Could it be because of this? https://openrouter.ai/docs/guides/routing/routers/auto-router#limitations

  3. fabiandistler commented on Apr 6, 2026

    @fabiandistler

    Any plans on integrating the openrouter/auto router into opencode?

  4. matdombrock commented on Apr 12, 2026

    @matdombrock

    I'm also experiencing this issue.

    Arch Linux latest opencode via npm.

    The provider prop doesn't seem to be respected at all.

    The default model is respected for me.

  5. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. Arcadi4 commented on May 13, 2026

    @Arcadi4
    Contributor

    Any plans on integrating the openrouter/auto router into opencode?

    @fabiandistler This #27382 worked.

    Image
  7. github-actions commented on Jul 13, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions