Skip to content

[FEATURE]: Session-persistent model override via Ctrl+M #12669

Closed

Description

@yazcaleb

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

Problem

When a user presses Ctrl+M to select a different model mid-session, the selection only applies to the current message. On the next turn, the agent reverts to its hardcoded "model" field from opencode.jsonc. There is no way to persistently override the model for the duration of a session while keeping the rest of the agent config intact (permissions, steps, options).

Current behavior

  1. User is on the build agent (model: openai/gpt-5.3-codex)
  2. User hits Ctrl+M, selects gitlab/duo-chat-sonnet-4-5
  3. Current message uses Sonnet 4.5 ✓
  4. Next message silently reverts to openai/gpt-5.3-codex ✗

Expected behavior

  1. User hits Ctrl+M, selects a model
  2. That model persists for all subsequent messages in the session
  3. The agent's other config (permissions, steps, options, temperature) remains unchanged
  4. Starting a new session or switching agents resets to the agent's default model

Why this matters

Rate limit recovery. When a provider rate-limits you mid-task, you need to switch to another provider's model for the rest of the session. Currently you'd have to re-select via Ctrl+M on every single message, or abandon the agent entirely and switch to one with no default model — losing the agent's permission/step/option config in the process.

Multi-provider setups. Users with access to the same model through multiple providers (e.g., Claude Sonnet 4.5 via GitLab, Google Antigravity, and GitHub Copilot) want to spread load across providers. When one gets hot, they switch to another — but only if the switch actually sticks.

Experimentation. Sometimes you want to try a different model on a task that's already in progress, within the same agent's behavioral constraints.


Current workaround

Define an agent with no "model" field (e.g., "free": { "mode": "primary", "steps": 400, ... }). In this case, Ctrl+M selection does persist because there's no default to revert to. But this loses all the agent-specific config — you're starting from a blank slate.


Relationship to #7602

#7602 requests automatic model fallback on errors/rate limits. This issue is about manual, user-initiated model selection that persists across turns. They're complementary — #7602 handles the automatic case, this handles the intentional case.


Proposed behavior

  • Ctrl+M override is session-scoped: once set, it overrides the agent's default model for the remainder of the session.
  • Agent config preserved: permissions, steps, options, temperature all remain from the agent definition. Only the model changes.
  • Reset on agent switch or new session: changing agents or starting a new session reverts to the agent's configured default.
  • Visual indicator: show the overridden model name in the status bar so the user knows they're not on the agent default.
  • Optional: a keybind or command to clear the override and revert to the agent default without switching agents.

Activity

  1. github-actions commented on Feb 8, 2026

    @github-actions
    Contributor

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

    However, this issue is distinct in that it requests manual, user-initiated model selection that persists across turns, whereas the above issues primarily focus on automatic fallback mechanisms. Feel free to ignore if you believe this is a separate use case.

  2. github-actions commented on Apr 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 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