Skip to content

[FEATURE]: Router presets — named, switchable configurations for multi-provider routers (OmniRoute, OpenRouter, LiteLLM, 9Router) #34711

Closed as not planned

Description

@chirag127

Feature Request: Named, switchable router presets

Problem

When using OpenCode with multi-provider routing (OmniRoute, OpenRouter, LiteLLM, 9Router), users must manually reconfigure the \\provider\\ / \\model\\ settings each time they want to switch routing strategies. For example:

  • Cost routing: cheap models for drafting, expensive for review
  • Reliability routing: failover chain (Bedrock → Together → OpenRouter)
  • Offline routing: local Ollama only, no cloud calls
  • Experimental routing: latest preview models, accept breakage

Currently there is no way to save these configurations as named presets and switch between them without editing the config file.

Proposed behavior

Add a \
outer.presets\\ section to the OpenCode config (JSONC or similar) that lets users define named routing configurations:

\\jsonc
{
"router": {
"activePreset": "cost",
"presets": {
"cost": {
"provider": "omniroute",
"model": "auto",
"baseUrl": "http://localhost:20128/v1"
},
"local": {
"provider": "ollama",
"model": "llama3.1:8b",
"baseUrl": "http://localhost:11434/v1"
},
"reliable": {
"provider": "anthropic",
"model": "claude-opus-latest"
}
}
}
}
\\

Switching presets via slash command: \/preset cost\\ or \/preset local\\

Why

Multi-provider router setups are common in fleet-style agent workflows. Switching routing strategy mid-session (e.g., switching to local when offline, or to a high-capacity router for a long refactor) requires editing config files and restarting. Named presets would make this a one-command operation.

Environment

  • OpenCode CLI on Windows 11 Enterprise
  • Using OmniRoute (localhost:20128) as primary router

Activity

  1. github-actions commented on Jul 1, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The issue body is empty (contains only @-). A Feature Request requires a description explaining the problem or need, and a verification checkbox confirming no duplicate exists.

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

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

  2. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Jul 1, 2026
  3. github-actions commented on Jul 1, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now clearly describes the problem, the proposed behavior, and includes environment info. Everything looks good — the needs:compliance label has been removed.

  4. github-actions commented on Aug 31, 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