Skip to content

Commit 99d583c

Browse files
docs(config/readme): 巩固模型分类声明与引导(非思考模型推荐 / 思考模型需实测)
补充记忆巩固模型(dreamProvider/dreamModel)选型引导: - config.js dreamProvider/dreamModel 上方新增模型分类注释:非思考模型(如 glm-5-2 类)fallback 去掉 effort 字段即成功;思考模型(如 deepseek-v4-flash-ga 系)默认开推理可能烧光预算返回空体,且 v4-flash-ga 在 harness 侧声明不接受任何 reasoning effort,去掉 effort 重试也被 defaultEffort 顶回(UNSUPPORTED_REASONING_EFFORT 根因),插件 fallback 无法绕开 - dreamReasoningEffort 注释补英文 caveat 段 - README 中英 dream 段新增「巩固模型分类声明」表格 sync 后 src/lib 一致;npm test 718 全绿。 Co-Authored-By: Anans-Ivresse <[email protected]>
1 parent 7a9774f commit 99d583c

4 files changed

Lines changed: 42 additions & 2 deletions

File tree

‎dsh-mneme/README.en.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ The default `32768` reserves headroom for reasoning models, where reasoning alon
6666
| Medium (10k–50k chars) | `65536` |
6767
| Large (>50k chars) | `131072` (cap) |
6868

69-
> With **reasoning models** (e.g. DeepSeek-R1-like), the model may spend the entire budget on reasoning and return an empty body (the log shows `no json array in llm output`). Resolution order: ① set `dreamReasoningEffort` to `low` to suppress reasoning overhead (when the provider rejects the parameter it is stripped automatically and retried once — the rejection reason lands in `llm_audit`; some models, e.g. v4-flash-ga, reject every effort tier); ② if the retry still returns an empty body under the model's default reasoning behavior, raise `dreamMaxTokens` (reasoning and body share this budget) or route `dreamProvider`/`dreamModel` to a non-reasoning model. The sleep side has the corresponding `sleepReasoningEffort`.
69+
> With **reasoning models** (e.g. DeepSeek-R1-like), the model may spend the entire budget on reasoning and return an empty body (the log shows `no json array in llm output`). Resolution order: ① set `dreamReasoningEffort` to `low` to suppress reasoning overhead (when the provider rejects the parameter it is stripped automatically and retried once — the rejection reason lands in `llm_audit`); ② if the retry still returns an empty body under the model's default reasoning behavior, raise `dreamMaxTokens` (reasoning and body share this budget) or route `dreamProvider`/`dreamModel` to a non-reasoning model. The sleep side has the corresponding `sleepReasoningEffort`.
70+
71+
**Consolidation model classification** (settings panel "consolidation model" = `dreamProvider`/`dreamModel`; sleep side: `sleepProvider`/`sleepModel`):
72+
73+
| Model kind | Examples | Notes |
74+
|-----------|----------|-------|
75+
| **Non-reasoning (recommended)** | glm-5-2-class | No reasoning declaration; even if an effort is configured and the harness rejects it, the fallback strips the field and the retry succeeds. Lowest risk of empty-body runs |
76+
| **Reasoning (test first)** | deepseek-v4-flash-ga and other v4-flash-ga family | Reasons by default and may burn the whole token budget on an empty body; some SKUs (e.g. v4-flash-ga) are additionally declared by the harness as accepting **no reasoning effort at all** — the no-effort retry still gets rejected through the harness `defaultEffort` (`UNSUPPORTED_REASONING_EFFORT`), which the plugin fallback cannot bypass. If you use one, set `dreamReasoningEffort` and test; switch to a non-reasoning model otherwise |
7077

7178
### Sleep Mode: System-Level Sleep 💤 (v0.4.0, opt-in)
7279

‎dsh-mneme/README.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,14 @@ dsh web
8989
| 中等(1 万-5 万字) | `65536` |
9090
| 大型(5 万字以上) | `131072`(上限) |
9191

92-
> 若使用**思考型模型**(如 deepseek-v4-flash / DeepSeek-R1 类),模型可能把全部预算花在 reasoning 上导致正文为空(日志出现 `no json array in llm output`)。处理顺序:① 把 `dreamReasoningEffort` 设为 `low` 显式压低思考(被方舟拒绝该参数时自动去掉重试一次,拒绝原因会记入 llm_audit——部分模型如 v4-flash-ga 不支持任何 effort 档位);② 重试走模型默认思考行为后正文仍为空的,调大 `dreamMaxTokens`(reasoning 与正文共享该预算)或配置 `dreamProvider`/`dreamModel` 指向非思考模型。sleep 侧对应 `sleepReasoningEffort`。
92+
> 若使用**思考型模型**(如 deepseek-v4-flash / DeepSeek-R1 类),模型可能把全部预算花在 reasoning 上导致正文为空(日志出现 `no json array in llm output`)。处理顺序:① 把 `dreamReasoningEffort` 设为 `low` 显式压低思考(被方舟拒绝该参数时自动去掉重试一次,拒绝原因会记入 llm_audit);② 重试走模型默认思考行为后正文仍为空的,调大 `dreamMaxTokens`(reasoning 与正文共享该预算)或配置 `dreamProvider`/`dreamModel` 指向非思考模型。sleep 侧对应 `sleepReasoningEffort`。
93+
94+
**巩固模型分类声明**(settings panel「巩固模型」= `dreamProvider`/`dreamModel`,睡眠侧对应 `sleepProvider`/`sleepModel`):
95+
96+
| 模型类别 | 例子 | 说明 |
97+
|---------|------|------|
98+
| **非思考模型(推荐)** | glm-5-2 类等 | 无 reasoning 声明;即使配了 effort 被 harness 拒绝,fallback 去掉字段重试即成功。空体风险最低 |
99+
| **思考模型(需实测)** | deepseek-v4-flash-ga 等 v4-flash-ga 系 | 默认开推理,可能烧光 token 预算返回空体;且部分型号(如 v4-flash-ga)在 harness 侧被声明为**不接受任何 reasoning effort** —— 去掉 effort 重试时 harness 的 `defaultEffort` 仍会顶上来再次拒绝(`UNSUPPORTED_REASONING_EFFORT`),插件侧 fallback 无法绕开。选用时建议配 `dreamReasoningEffort` 实测,不行就换非思考模型 |
93100

94101
### Sleep Mode 系统级睡眠 💤(v0.4.0,opt-in)
95102

‎dsh-mneme/lib/config.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ export const Config = z.object({
5252
// 起算,失败/degraded 的 run 也占用间隔;间隔内的触发请求静默跳过,下一次
5353
// 写入事件会重新评估。
5454
dreamMinIntervalMinutes: z.natural().min(0).max(10080).default(0),
55+
// 巩固模型路由(settings panel「巩固模型」/ dreamProvider+dreamModel):
56+
// dream 的记忆沉淀专用 LLM 路由,显式配置优先于 agent 默认模型(config-first,
57+
// Issue #25)。模型分类声明:
58+
// - 非思考模型(推荐,如 glm-5-2 类):无 reasoning 声明,effort 请求被 harness
59+
// 拒绝后 withEffortFallback 去掉字段重试即成功;空体/no json array 风险最低。
60+
// - 思考模型(如 deepseek-v4-flash-ga 等 v4-flash-ga 系):默认开推理,可能烧光
61+
// token 预算返回空体;且部分(如 v4-flash-ga)在 harness 侧被声明为不接受任何
62+
// reasoning effort —— 即使去掉 effort 重试,harness 的 defaultEffort 也会顶上来
63+
// 再次拒绝(UNSUPPORTED_REASONING_EFFORT),插件 fallback 无法绕开。
64+
// 选用时建议配 dreamReasoningEffort 并实测;不行就换非思考模型。
5565
dreamProvider: z.string(),
5666
dreamModel: z.string(),
5767
dreamMaxTokens: z.natural().min(256).max(131072).default(32768),
@@ -60,6 +70,9 @@ export const Config = z.object({
6070
// are forwarded verbatim. Useful to cap reasoning spend on thinking-type
6171
// models that would otherwise drain the whole token budget and return an
6272
// empty body ("no json array in llm output").
73+
// Caveat: on some thinking models (e.g. v4-flash-ga) the harness declares NO
74+
// supported effort, so even the fallback retry (field stripped) is rejected
75+
// again via its defaultEffort — prefer a non-reasoning dreamProvider/dreamModel.
6376
dreamReasoningEffort: z.union([
6477
z.const("low"),
6578
z.const("medium"),

‎dsh-mneme/src/config.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ export const Config = z.object({
5252
// 起算,失败/degraded 的 run 也占用间隔;间隔内的触发请求静默跳过,下一次
5353
// 写入事件会重新评估。
5454
dreamMinIntervalMinutes: z.natural().min(0).max(10080).default(0),
55+
// 巩固模型路由(settings panel「巩固模型」/ dreamProvider+dreamModel):
56+
// dream 的记忆沉淀专用 LLM 路由,显式配置优先于 agent 默认模型(config-first,
57+
// Issue #25)。模型分类声明:
58+
// - 非思考模型(推荐,如 glm-5-2 类):无 reasoning 声明,effort 请求被 harness
59+
// 拒绝后 withEffortFallback 去掉字段重试即成功;空体/no json array 风险最低。
60+
// - 思考模型(如 deepseek-v4-flash-ga 等 v4-flash-ga 系):默认开推理,可能烧光
61+
// token 预算返回空体;且部分(如 v4-flash-ga)在 harness 侧被声明为不接受任何
62+
// reasoning effort —— 即使去掉 effort 重试,harness 的 defaultEffort 也会顶上来
63+
// 再次拒绝(UNSUPPORTED_REASONING_EFFORT),插件 fallback 无法绕开。
64+
// 选用时建议配 dreamReasoningEffort 并实测;不行就换非思考模型。
5565
dreamProvider: z.string(),
5666
dreamModel: z.string(),
5767
dreamMaxTokens: z.natural().min(256).max(131072).default(32768),
@@ -60,6 +70,9 @@ export const Config = z.object({
6070
// are forwarded verbatim. Useful to cap reasoning spend on thinking-type
6171
// models that would otherwise drain the whole token budget and return an
6272
// empty body ("no json array in llm output").
73+
// Caveat: on some thinking models (e.g. v4-flash-ga) the harness declares NO
74+
// supported effort, so even the fallback retry (field stripped) is rejected
75+
// again via its defaultEffort — prefer a non-reasoning dreamProvider/dreamModel.
6376
dreamReasoningEffort: z.union([
6477
z.const("low"),
6578
z.const("medium"),

0 commit comments

Comments
 (0)