Skip to content

[FEATURE]: Auto Model Selection #32736

Closed
Closed

Description

@nhlmg93

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

When I'm working in opencode, I have to manually pick a model before I start a session. If I set it to claude-sonnet-4-5, even trivial requests like "list the files" go through an expensive reasoning model. If I set it to a cheap model, complex tasks like redesigning auth don't get good results.

I'd like an "auto" model mode that looks at what I'm asking and picks the best model for that specific request — cheap and fast for simple things, capable for hard things.

The idea is:

  • The user types auto (or sets "model": "auto" in config) instead of a specific model
  • Before each prompt, a small lightweight model (default: opencode/gpt-5-nano, free on the opencode provider) classifies the request on complexity and task type
  • A routing function then picks the best available model based on that classification
  • The resolved model name shows in the UI so you know what was picked

I have a detailed design in PLAN.md if anyone wants to see the full breakdown, but the gist is: a classifier model + a routing function, wired into the V2 session runner, with config options for constraints like max cost or preferred provider.

This is similar to #8456 (which proposes static env-var model tiers) and #20235 (which focuses on GitHub Copilot's proprietary API), but this proposal is provider-agnostic — it would work with any provider's models, not just Copilot.

I'd like to work on this myself. Happy to discuss the approach with maintainers before diving in.

Activity

  1. github-actions commented on Jun 17, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No recognized issue template was used. All issues must use one of the three templates: Bug Report, Feature Request, or Question. Feature requests must have a title starting with [FEATURE]: and include the verification checkbox.
    • The issue appears to contain AI-generated content (highly structured tables, phased implementation plans, file listings, open questions section) — lengthy AI-generated descriptions are not acceptable per our guidelines.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. changed the title [-]feat: Auto Model Selection (auto model mode)[/-] [+][FEATURE]: Auto Model Selection[/+] on Jun 17, 2026
  3. github-actions commented on Jun 17, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now meets the contributing guidelines — the feature request template is filled out correctly with a clear description of the problem and proposed solution. Appreciate you taking the time to fix it.

  4. nhlmg93 commented on Jun 17, 2026

    @nhlmg93
    Author

    Closing as a duplicate of #8456. The core idea (automatic model selection/routing) overlaps significantly with that issue. My specific angle was a provider-agnostic per-prompt classifier approach, but it's the same general feature. I'm interested in working on this — will follow up on #8456.

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