makecindy / makecindy/cindy

Model picker: DeepSeek V4 Flash missing "reasoning effort" selector (xd-route models drop `efforts` metadata)

Open
#1,872 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**客户端版本**: 0.1.33
**反馈类型**: bug

---

### 现象 / Symptom

在模型选择器中选中 **DeepSeek V4 Flash** 时,下拉面板里不显示「推理强度」区块;而选中 **Kimi K2.6** 等其他模型时,「推理强度」区块正常显示。

### 期望行为 / Expected

官方模型目录(`model-access.cindy.com.cn/api/model-catalog/catalog`,registry 更新于 2026-08-04)明确声明该模型支持推理强度:

```json
{
"id": "deepseek/deepseek-v4-flash",
"description": "DeepSeek V4 Flash efficiency-optimized MoE; supports low/high/max effort",
"contextWindow": 1048576,
"maxOutputTokens": 384000,
"efforts": ["low", "high", "max"],
"defaultEffort": "high",
"routes": [
{ "providerId": "xd", "modelId": "deepseek/deepseek-v4-flash", "agents": ["claude-code", "codex"] }
]
}
```

因此 UI 理应显示 低 / 高 / 最高 三档推理强度。

### 实际行为 / Actual

DeepSeek V4 Flash 在下拉面板中没有「推理强度」区块,用户无法在界面切换档位。

### 复现步骤 / Repro

1. 打开模型选择器(新建会话或切换模型)。
2. 选择 DeepSeek V4 Flash。
3. 观察下拉面板:无「推理强度」区块。
4. 对照组:选择 Kimi K2.6,可见「推理强度」区块。

### 链路分析 / Root-cause analysis

1. **UI 渲染门槛:efforts 非空才显示** — 模型下拉面板中,「推理强度」区块仅在模型条目 `efforts` 非空时渲染(`app.asar` 内 `Ot = et && ((he?.efforts.length) ?? 0) > 0`),即 `efforts.length === 0` 时整块档位区不渲染。

2. **模型条目的 efforts 来源** — UI 模型条目由 provider 模型定义直接映射(`app.asar` 内 `Een` / `_en`,字段包括 `id` / `displayName` / `efforts` / `defaultEffort`)。档位是否显示完全取决于 provider 侧模型条目有没有带上 `efforts`。

3. **关键点:model plane 跳过 xd 路由的模型** — 模型物化逻辑 `planRegistryRoots` 只处理有策略的 provider:

```js
MODEL_PLANE_POLICIES = new Map([
["openai", { roots: ["codex"], … }],
["anthropic", { roots: ["claude-code"], … }],
["xai", { roots: ["claude-code", "codex"], … }],
// 注意:没有 "xd"
]);

function planRegistryRoots(r) {

for (const a of i.routes) {
const l = MODEL_PLANE_POLICIES.get(a.providerId);
if (!l) continue; // ← xd 无策略,整条路由被静默跳过

}
}
```

`xd` 不在 `MODEL_PLANE_POLICIES` 中,因此所有 `providerId: "xd"` 的路由(包括 DeepSeek V4 Flash)在物化时被跳过,`efforts` / `defaultEffort` 不会进入 model plane,最终 UI 拿到的是无 efforts 的模型条目。

4. **为什么 Kimi K2.6 有档位** — 目录中 `moonshotai/kimi-k2.6` 本身 `efforts: []`(thinking 由 provider 管理);用户看到的 Kimi K2.6 档位来自非 xd 的路径(OpenRouter / moonshot preset 直接暴露的模型条目),这些条目自带 effort 信息,所以能显示。DeepSeek V4 Flash 只通过 xd 路由暴露,属于「xd 专属模型」,因此是受影响最明显的模型。

> 补充:应用日志显示另有 "xd gateway models synced: 36" 的实时模型同步通道。最终 UI 条目是否直接复用该通道数据、该通道是否携带 efforts,是尚待进一步确认的点。

### 验证记录 / Verification(2026-08-06)

- 抓取在线目录(`version: 2`,`updatedAt: 2026-08-04T01:23:02.000Z`),确认 `modelRegistry` 中 `deepseek/deepseek-v4-flash` 条目与上文一致:`efforts: ["low","high","max"]`、`defaultEffort: "high"`、唯一路由 `providerId: "xd"`。
- 检查本机 `app.asar`(Cindy 0.1.33),确认 `MODEL_PLANE_POLICIES` 仅含 `openai` / `anthropic` / `xai`,无 `"xd"`。
- 目录 `moonshotai/kimi-k2.6` 条目 `efforts: []`、描述 "thinking is provider-managed",并在 OpenRouter / moonshot preset 中以带名称的条目出现。

### 影响 / Impact

- 无法在 UI 为 DeepSeek V4 Flash(以及任何仅走 xd 路由的模型)切换推理强度。
- 与官方目录声明的能力(low/high/max)不一致。

### 修复建议 / Suggested fixes

1. 在 `MODEL_PLANE_POLICIES` 中补充 `xd` 策略(`roots: ["claude-code", "codex"]`),使 xd 路由模型正常物化 efforts / defaultEffort;或
2. 将无策略 provider 改为「透传」而非静默跳过,避免 xd 专属模型丢失 efforts 元数据;或
3. 在 xd 网关同步的模型条目中直接补充 per-agent efforts 字段。

### 附注 / Notes

- 若「xd 内部通道隐藏档位」是有意设计,请忽略本报告;从目录数据与通用 UI 逻辑看,这更像 efforts 元数据在 xd 路由物化环节丢失导致的 bug。
- 本次结论基于静态代码分析(`app.asar`)与公开模型目录(2026-08-06 在线核对)。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26100)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start by locating MODEL_PLANE_POLICIES, planRegistryRoots, and the xd gateway model-sync path in the application sources or app.asar. Trace whether the catalog's efforts and defaultEffort reach the model-picker entry, then verify the UI condition that renders the selector. Done means DeepSeek V4 Flash exposes low, high, and max effort options without breaking other providers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.