Skip to content

[Bug]: Code Mate DSH launch rejects cherryin enterprise reasoning models with Unified Gateway error #18756

Description

@lianshuang-photo

This issue was translated automatically.

Issue Checklist

  • I understand that issues are for feedback and problem solving, not for complaining in the comment section, and will provide as much information as possible to help solve the problem.
  • My issue is not listed in the FAQ.
  • I've looked at pinned issues and searched for existing Open Issues, Closed Issues, and Discussions, no similar issue or discussion was found.
  • I've filled in short, clear headings so that developers can quickly identify a rough idea of what to expect when flipping through the list of issues. And not "a suggestion", "stuck", etc.
  • I've confirmed that I am using the latest version of Cherry Studio.

Platform

macOS

Version

v2.0.7

Bug Description

When launching DeepSeek Harness in Code Mate, the list allows selecting cherryin Enterprise + GPT-5.6 Luna. After clicking "Launch", it fails immediately with a toast:

Provider 934f5cb6-afac-4bb5-91dd-9fd5bc0eacc6 must be used through the Unified Gateway for DeepSeek Harness

934f5cb6-... is the internal ID of the enterprise provider, not a model ID. There's already a "Unified Gateway" card at the top of the same page, but the error shows raw English text with a UUID, without guiding users to use the Unified Gateway.

DSH version shows as v0.1.0-rc.6.

Steps To Reproduce

  1. Open Cherry Studio v2.0.7 → Code Mate.
  2. Select DeepSeek Harness.
  3. In model provider, select cherryin Enterprise, and model GPT-5.6 Luna (do not click "Unified Gateway").
  4. Click "Launch".
  5. See the above toast, DSH does not start.

Expected Behavior

At least one of the following should be implemented:

  • Combinations of "reasoning model + provider that doesn't support developer role" should not appear in the launchable list; or
  • Automatically route through the Unified Gateway when launching; or
  • Show a localized, actionable prompt: "Please launch this model through the Unified Gateway", instead of throwing an internal provider UUID.

Selecting and clicking launch should not fail first and then let the user guess.

Relevant Log Output

Provider 934f5cb6-afac-4bb5-91dd-9fd5bc0eacc6 must be used through the Unified Gateway for DeepSeek Harness

Additional Context

When launching, only clicking "Unified Gateway" results in mode: 'gateway', while clicking a specific provider uses direct:

// src/renderer/pages/code/hooks/useDeepSeekHarnessController.ts
mode: isApiGatewayProviderId(enabledProvider.id) ? 'gateway' : 'direct'

In direct mode, resolveDeepSeekHarnessEndpoint() checks: when reasoning models use OpenAI-compatible endpoints, DSH/pi-ai requires the developer role. The default is apiFeatures.developerRole === false. Enterprise cherryin generally has this default value as well, and lacks an Anthropic fallback endpoint, so it throws:

throw new Error(`Provider ${provider.id} must be used through the Unified Gateway for DeepSeek Harness`)

However, Code Mate's DSH provider filter (CLI_TOOL_PROVIDER_MAP[DEEPSEEK_HARNESS]) only checks: non-pure login, has API Key, has OpenAI/Anthropic endpoints, but does not check this launch hard rule.

So the UI thinks it can launch, but the main process rejects it. Current workaround: select "Unified Gateway", then select the same GPT-5.6 Luna.


Original Content

Issue Checklist

  • I understand that issues are for feedback and problem solving, not for complaining in the comment section, and will provide as much information as possible to help solve the problem.
  • My issue is not listed in the FAQ.
  • I've looked at pinned issues and searched for existing Open Issues, Closed Issues, and Discussions, no similar issue or discussion was found.
  • I've filled in short, clear headings so that developers can quickly identify a rough idea of what to expect when flipping through the list of issues. And not "a suggestion", "stuck", etc.
  • I've confirmed that I am using the latest version of Cherry Studio.

Platform

macOS

Version

v2.0.7

Bug Description

Code Mate 里启动 DeepSeek Harness 时,列表允许选择 cherryin企业版 + GPT-5.6 Luna,点「启动」后立刻失败,toast:

Provider 934f5cb6-afac-4bb5-91dd-9fd5bc0eacc6 must be used through the Unified Gateway for DeepSeek Harness

934f5cb6-... 是该企业版服务商的内部 id,不是模型 id。同一页上方已经有「统一网关」卡片,但报错是原始英文 + UUID,没有引导改点统一网关。

DSH 版本显示为 v0.1.0-rc.6

Steps To Reproduce

  1. 打开 Cherry Studio v2.0.7 → Code Mate。
  2. 选择 DeepSeek Harness。
  3. 在模型服务商里选 cherryin企业版,模型选 GPT-5.6 Luna(不要点「统一网关」)。
  4. 点「启动」。
  5. 看到上述 toast,DSH 未启动。

Expected Behavior

下面至少做到一件:

  • 这种「reasoning 模型 + 服务商不支持 developer role」的组合不要出现在可启动列表里;或
  • 启动时自动改走统一网关;或
  • 用本地化、可操作的提示:「该模型请通过统一网关启动」,而不是抛内部 provider UUID。

选中并点启动不应先失败再让用户猜。

Relevant Log Output

Provider 934f5cb6-afac-4bb5-91dd-9fd5bc0eacc6 must be used through the Unified Gateway for DeepSeek Harness

Additional Context

启动时只有点「统一网关」才是 mode: 'gateway',点具体服务商走 direct

// src/renderer/pages/code/hooks/useDeepSeekHarnessController.ts
mode: isApiGatewayProviderId(enabledProvider.id) ? 'gateway' : 'direct'

直连在 resolveDeepSeekHarnessEndpoint() 里会检查:reasoning 模型走 OpenAI 兼容端点时,DSH/pi-ai 需要 developer role。默认 apiFeatures.developerRole === false。企业版 cherryin 一般也是这个默认值,又没有 Anthropic 备用端点,于是抛:

throw new Error(`Provider ${provider.id} must be used through the Unified Gateway for DeepSeek Harness`)

但 Code Mate 的 DSH 服务商过滤(CLI_TOOL_PROVIDER_MAP[DEEPSEEK_HARNESS])只看了:非纯登录、有 API Key、有 OpenAI/Anthropic 端点,没有检查这条启动硬规则。

所以 UI 认为可以启动,主进程再拒绝。当前绕过:改选「统一网关」,再选同一套 GPT-5.6 Luna。

Metadata

Metadata

Assignees

No one assigned

    Labels

    modelsRelated to model providers, configuration, capabilities, or compatibility

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions