Skip to content

After integrating oh-my-opencode, the conversation sent will automatically switch to the Claude Opus 4.6 model #16313

Closed as not planned

Description

@zk1991-github

Description

For example, when selecting the Agent and Big Pickle models and sending a question, the model automatically switches to Claude Opus 4.6 after sending. One needs to manually switch back to the Big Pickle model

Plugins

oh-my-opencode

OpenCode version

v1.2.20

Steps to reproduce

  1. Select Sisyphus (Ultraworker) Agent
  2. Select Big Pickle model
  3. Send the question
Image

Screenshot and/or share link

No response

Operating System

windows 10

Terminal

Desktop

Activity

  1. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

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

  2. neriousy commented on Mar 6, 2026

    @neriousy
    Member

    That's an issue within oh-my-opencode rather than the this repository

  3. Electricitysheep commented on Apr 29, 2026

    @Electricitysheep

    附加复现报告:DeepSeek v4-pro + oh-my-opencode 模型切换后仍显示切换前模型

    环境

    • OpenCode 版本:v1.14.25
    • 操作系统:Windows 10.0.26200.0
    • 终端:PowerShell 5.1.26100.8115
    • 插件:oh-my-opencode@latest
    • 主模型:deepseek/deepseek-v4-pro(通过 @ai-sdk/openai-compatible 配置)
    • 代理配置:oh-my-opencode 的 Sisyphus + 多个子智能体

    描述的问题

    在现有对话(非新会话)中切换模型后,界面仍然偶尔显示切换前的模型。具体表现:

    1. 当前对话使用 Agent 1 + Model A
    2. 用户通过 /models 切换到 Model B
    3. 发送消息后,模型确实使用了 B
    4. 但 TUI 底部状态栏仍然显示 Model A(切换前的模型)
    5. 某些情况下,后续消息甚至会自动回退到 Agent 的默认模型

    根因分析

    根据 @zk1991-github 的描述和我的实际观察,这个问题的根本原因在于 oh-my-opencode 的 noReply: true 机制:

    // oh-my-opencode 内部 (manager.ts)
    await client.session.prompt({
      path: { id: currentSessionId },
      body: {
        agent: 'subagent-name',  // 切换为子智能体
        parts: [{ type: 'text', text: '...', synthetic: true }],
        noReply: true            // ← 关键:silent 注入
      }
    });

    执行路径:

    1. 用户手动选择 Model B(覆盖当前 agent 的默认 Model A)
    2. oh-my-opencode 的后台任务完成后,调用 session.prompt() 注入通知
    3. noReply: true 导致 OpenCode 将 agent 重置为 子智能体(如 librarian、explore)
    4. 子智能体没有显式配置 model,因此 OpenCode 使用其硬编码的默认模型(如 claude-opus-4-6)
    5. TUI 状态栏读取的是 agent 的 model 而非当前会话的 model → 显示切换前的模型

    相关 Issue

    临时解决方案

    1. 完全卸载插件后重启(已验证有效)
    2. 显式配置所有子智能体的 model:
    {
      "providers": {
        "deepseek": {
          "npm": "@ai-sdk/openai-compatible",
          "options": {
            "baseURL": "https://api.deepseek.com/v1",
            "apiKey": "{env:DEEPSEEK_API_KEY}"
          }
        }
      },
      "models": {
        "deepseek-v4-pro": {
          "name": "DeepSeek V4 Pro",
          "interleaved": { "field": "reasoning_content" }
        }
      }
    }

    请求

    希望 maintainers 能:

    1. 让 noReply: true 在子智能体注入时保持父会话的 model 选择,而不是回退到 agent 默认
    2. 或者在子智能体执行完成后恢复父会话的 model 覆盖
    3. 更新 oh-my-opencode 的 delegate_task() 显式传递 model 参数,避免依赖隐式默认值

    这个问题在 DeepSeek v4-pro 等新模型上尤为突出,因为用户需要频繁通过 /models 切换来测试不同推理模型的能力。

  4. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  5. github-actions commented on Jul 3, 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