Repository navigation
fix: 记忆巩固因 defaultEffort trap 反复失败(resolveDreamEffort 主动探测能力) - #96
Conversation
…efaultEffort trap resolveDreamEffort queries ctx.llm.resolveModelInfo for the exact dream/sleep route up front and forwards an effort the model actually declares, instead of relying on the withEffortFallback retry — which the harness's defaultEffort substitution makes useless when the adapter's declared default (e.g. volcano adapter defaultEffort "low") is itself rejected by the model. - configured effort supported -> forwarded verbatim - configured unsupported -> remapped to defaultEffort/first declared effort - model declares no reasoning capability -> field omitted entirely - capability query unavailable or throws -> configured value forwarded, withEffortFallback still guards the rejection path 5 regression tests cover all four branches plus the sleep path. 723 tests pass (718 + 5). Co-Authored-By: Anans-Ivresse <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds capability-aware reasoning-effort resolution for dream and sleep LLM calls. It selects supported efforts, omits unsupported settings, preserves configured values on lookup failure, and adds configuration metadata and tests. ChangesReasoning effort resolution
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to Memory consolidation and sleep requests now select only model-supported reasoning-effort values or omit the field for non-reasoning models, preventing unsupported-effort failures while retaining fallback behavior. The covered behavior presents no remaining merge-readiness risk. Sequence Diagram(s)sequenceDiagram
participant Dream or Sleep Flow
participant resolveDreamEffort
participant Model Capability API
participant LLM
Dream or Sleep Flow->>resolveDreamEffort: Provide route and configured effort
resolveDreamEffort->>Model Capability API: Query model reasoning capabilities
Model Capability API-->>resolveDreamEffort: Return supported efforts or failure
resolveDreamEffort-->>Dream or Sleep Flow: Return resolved effort or null
Dream or Sleep Flow->>LLM: Send request with resolved effort
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…thinking models) The DSH settings panel renders from the exported Config schema, so attaching schemastery .description() to dreamProvider/dreamModel/dreamReasoningEffort/ sleepProvider/sleepModel/sleepReasoningEffort surfaces the consolidation-model guidance in the UI itself — no panel-frontend change needed. Points users at non-thinking models for consolidation and notes that unsupported reasoning efforts are auto-remapped (v0.7.26+). Co-Authored-By: Anans-Ivresse <[email protected]>
…replacement)
The assertion replaced "${nativeCls} mneme-topentry-native" with the identical
literal — a no-op flagged by CodeQL. The check is the raw string presence test;
the replace never did anything. Removed; behavior unchanged.
Co-Authored-By: Anans-Ivresse <[email protected]>
问题
UI「记忆巩固 · 失败」,报错
UNSUPPORTED_REASONING_EFFORT: provider "volcano-engine" model "deepseek-v4-flash-ga-260731" does not support reasoning effort "low"。根因是 harness 的 defaultEffort trap:volcano 适配器声明
reasoning.defaultEffort = "low",但模型并不支持 "low",导致不管传不传 effort 字段,harness 都会代入 "low" → 必失败。v0.7.21 的「去掉字段重试」绕不过这个坑。修复
新增
resolveDreamEffort(dream.js + sleep.js 共用),跑 LLM 前先调ctx.llm.resolveModelInfo(provider, model)查模型真实能力:第一次请求即携带合法 effort,不再触发 defaultEffort trap。
验证
新增 5 个回归测试(毒 default 重映射 / 无推理能力省略字段 / 支持值透传 / 查询失败回退 / sleep 路径),723/723 通过。
Summary by CodeRabbit
Bug Fixes
Documentation