Skip to content

Model ID auto-switches silently during session #28842

Closed as not planned
Closed as not planned

Description

@YoungJurry

Description

The model ID used in a session auto-switches silently (no error, no prompt) to a different model, both at restart time and mid-conversation. There is no fixed pattern — switches observed between OpenAI models and DeepSeek models, and vice versa.

Steps to Reproduce (observed, not perfectly consistent)

  1. Start a session with an explicitly set model.
  2. Either restart OpenCode or continue a long conversation.
  3. At some point, the session silently starts using a different model (e.g. deepseek-ai/DeepSeek-V4-Flash or another model) without any notification.

Expected Behavior

The model should remain stable throughout the session unless the user explicitly changes it (via /model or config edit). Any automatic fallback or switch should be clearly communicated to the user.

Actual Behavior

The model switches silently. The user only notices because response behavior changes (e.g. sudden loss of reasoning, different response style).

Environment

  • OpenCode version: latest
  • Observed with gpt-5.4-mini → deepseek-ai/DeepSeek-V4-Flash and other combinations
  • No error messages in logs

Activity

  1. github-actions commented on May 22, 2026

    @github-actions
    Contributor

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

    If your issue is distinct from these (e.g. it occurs mid-conversation rather than only on the first message, or involves provider routing logic rather than UI picker state), please add a comment clarifying the difference.

  2. YoungJurry commented on May 22, 2026

    @YoungJurry
    Author

    This issue is distinct from #16313 and #23666:

    1. Not UI-related — this is the CLI version, not the web UI model picker.
    2. Occurs mid-conversation — not only on first message or restart. The model can switch halfway through a long session.
    3. Silent, no error — no notification, no log message, no fallback indicator.

    This suggests the issue may be in the provider/model routing logic rather than in UI state persistence.

  3. rekram1-node commented on May 22, 2026

    @rekram1-node
    Contributor

    are u using plugins?

  4. YoungJurry commented on May 22, 2026

    @YoungJurry
    Author

    are u using plugins?

    what i use is dcp ,"@tarquinen/opencode-dcp@latest",just this

  5. rekram1-node commented on May 22, 2026

    @rekram1-node
    Contributor

    maybe share opencode debug config

  6. Rubonnek commented on Jun 11, 2026

    @Rubonnek

    This just happened to me. I'm on version 1.17.3. The bug is inconsistent. I was in the middle of a session, I added a different model as favorite, and then I got a silent model ID switch, but I can't reproduce.

    For what is worth, in my case it seems to auto-switch to the last model found in my favorite list.

    Here's my opencode debug config output:

    {
      "$schema": "https://opencode.ai/config.json",
      "agent": {},
      "mode": {},
      "plugin": [],
      "command": {},
      "username": "wilson"
    }
    
  7. github-actions commented on Aug 11, 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