GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: Add `--variant` flag to root `opencode` command · Issue #7354 · anomalyco/opencode

[FEATURE]: Add --variant flag to root opencode command #7354

New issue
Copy link
New issue
Copy link
Closed
Closed
[FEATURE]: Add --variant flag to root opencode command#7354
Copy link
Assignees
thdxr
Labels
discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Description

@ekweible
ekweible
opened on Jan 8, 2026
Issue body actions

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The --variant flag was added to opencode run in #6805 but is missing from the root opencode command.

Current Behavior

# Works
opencode run --model anthropic/claude-sonnet-4-20250514 --variant max "hello"
# Doesn't work - variant flag not recognized
opencode --model anthropic/claude-sonnet-4-20250514 --variant max --prompt "hello"

Expected Behavior

Both commands should support --variant.

This matters most when --prompt is provided since the model responds immediately - users can't control reasoning effort for that initial response.

Relevant Files

File Current State
src/cli/cmd/run.ts:90-93 Has --variant option
src/cli/cmd/tui/thread.ts Missing --variant option
src/cli/cmd/tui/context/args.tsx Args interface lacks variant

Implementation Notes

The variant infrastructure already exists in the TUI. Changes needed:

  1. thread.ts: Add --variant option to yargs builder
  2. args.tsx: Add variant?: string to Args interface
  3. thread.ts: Pass variant through to tui() args
  4. local.tsx: Initialize variant from CLI arg (similar to how args.model is handled at line 142)

The variant management (model.variant.set(), model.variant.current(), etc.) is already implemented in local.tsx:310-347, so this is just a CLI argument threading task.

Reacted by Maciej Wilczyński, Artem Bambalov, Matthias Vallentin, Devin Gunay, Deferred6555, David Marchante, Xavier Chanthavong, Nelson Pires, zclllyybb and Dylan Barnett

Activity

  1. ekweible
    added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 8, 2026
  2. github-actions
    assigned
    thdxr
    on Jan 8, 2026
  3. github-actions commented on Jan 8, 2026

    @github-actions
    github-actionsBot
    on Jan 8, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue relates to #7138 which implements default variant configuration per agent. While this issue (#7354) focuses on adding the --variant CLI flag to the root command, #7138 adds per-agent default variants in the config. Both approaches are complementary:

    • [FEATURE] Support default variant configuration per agent (#7156) #7138: Set default variant in config (e.g., build agent always uses high variant)
    • [FEATURE]: Add --variant flag to root opencode command #7354: Override via CLI flag (e.g., opencode --variant max --prompt ...)

    These work together to give users flexible variant control at both the configuration and CLI levels.

  4. ekweible commented on Jan 8, 2026

    @ekweible
    ekweible
    on Jan 8, 2026
    Author
    More actions

    This one seemed fairly straightforward and given that opencode run already supports it, I assumed it would be reasonable to have on the root command, too, so I opened a PR here: #7358

    Feel free to close if that's not the case!

    Reacted by Xavier Chanthavong
  5. gjermundgaraba commented on Jan 16, 2026

    @gjermundgaraba
    gjermundgaraba
    on Jan 16, 2026
    More actions

    Just to add to this, would like to see this added.
    For context, I use the root opencode command to quickly spin up a code review with a script that creates a worktree for a PR's branch and launches opencode with a prompt (using a custom slash command). The reason I want variant is becuase I want to use max for claude and xhigh for codex (I usually like to run one with each).

    I am using a fork locally for this, right now, but would love to get this functionality upstreamed. I'll link my fork's commit in the PR, in case there is anything useful there :)

    Reacted by Xavier Chanthavong, Kaoru Shirai and zclllyybb
  6. github-actions commented on Mar 26, 2026

    @github-actions
    github-actionsBot
    on Mar 26, 2026 – with GitHub Actions
    Contributor
    More actions

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

  7. github-actions
    closed this as completedon Mar 26, 2026
  8. zclllyybb commented on Apr 10, 2026

    @zclllyybb
    zclllyybb
    on Apr 10, 2026
    More actions

    Meaningful feature, are there still people following up on it now?

  9. Dicklesworthstone
    added a commit that references this issue on Jun 18, 2026

    fix(oc): drop unsupported --variant from default opencode launch temp…

    c63f4e9
  10. Starefossen commented on Oct 1, 2026

    @Starefossen
    Starefossen
    on Oct 1, 2026
    More actions

    Still affects OpenCode 1.18.34: opencode --model github-copilot/gpt-6-sol --variant low prints root help and exits 1. opencode run --variant low works, but does not start the TUI. This blocks nav-pilot from forwarding its configured reasoning effort to interactive sessions. PR #7358 remains open.

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

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.