This repository was archived by the owner on Aug 24, 2026. It is now read-only.
fix: route Pro/Flash persona by the session-selected model (assembled.variables), not agent.options (issue #9) - #21
Open
baka-world wants to merge 1 commit into
Open
Conversation
This was referenced Aug 16, 2026
huozhetiaozhehuopopo
added a commit
to huozhetiaozhehuopopo/dsh-router-standard
that referenced
this pull request
Aug 16, 2026
- yjh051108#17.1: agent/inbox/claimed 监听——首轮路由不再依赖 user/message 事件时序 (claim 先于 assemble,首轮即真实分类),过滤 kind=user - yjh051108#17.2: sessionMode 只分类真实用户消息(插件注入不再钉死 weak); 并修复上游过滤对嵌套形状(issue yjh051108#1)的回归——兼容 data.message.source - yjh051108#21: 会话选择模型(assembled.variables)优先于 agent.options 用于 persona/dev_router_status/dev_mode_subagent(issue yjh051108#9) - yjh051108#5: 子代理(parentSession)跳过 router 组装,修复 shell-less 崩溃 - 回归测试 6 项先红后绿(负向验证:吸收前 17/23,吸收后 23/23) (由 DSH 生成:model=deepseek-v4-flash · router-mode=spec(band=weak) · harness=dsh web · preset=router-spec v0.2.1-local)
huozhetiaozhehuopopo
added a commit
to huozhetiaozhehuopopo/dsh-router-standard
that referenced
this pull request
Aug 16, 2026
- version 0.2.1 → 0.2.2(吸收 yjh051108#17/yjh051108#21/yjh051108#5 后的版本) - README 新增「Fork 版本说明」:0.2.1(吸收前,5 项修复,17/17)vs 0.2.2(吸收后,23/23)差异表 + 版本语义 + 与上游关系 - CHANGELOG.md 新建:两版完整变更记录 + 上游互证/观察项 (由 DSH 生成:model=deepseek-v4-flash · router-mode=spec(band=weak) · harness=dsh web · preset=router-spec v0.2.1-local)
huozhetiaozhehuopopo
added a commit
to huozhetiaozhehuopopo/dsh-router-standard
that referenced
this pull request
Aug 16, 2026
- yjh051108#17.1: agent/inbox/claimed 监听——首轮路由不再依赖 user/message 事件时序 (claim 先于 assemble,首轮即真实分类),过滤 kind=user - yjh051108#17.2: sessionMode 只分类真实用户消息(插件注入不再钉死 weak); 并修复上游过滤对嵌套形状(issue yjh051108#1)的回归——兼容 data.message.source - yjh051108#21: 会话选择模型(assembled.variables)优先于 agent.options 用于 persona/dev_router_status/dev_mode_subagent(issue yjh051108#9) - yjh051108#5: 子代理(parentSession)跳过 router 组装,修复 shell-less 崩溃 - 回归测试 6 项先红后绿(负向验证:吸收前 17/23,吸收后 23/23) (由 DSH 生成:model=deepseek-v4-flash · router-mode=spec(band=weak) · harness=dsh web · preset=router-spec v0.2.1-local)
huozhetiaozhehuopopo
added a commit
to huozhetiaozhehuopopo/dsh-router-standard
that referenced
this pull request
Aug 16, 2026
- version 0.2.1 → 0.2.2(吸收 yjh051108#17/yjh051108#21/yjh051108#5 后的版本) - README 新增「Fork 版本说明」:0.2.1(吸收前,5 项修复,17/17)vs 0.2.2(吸收后,23/23)差异表 + 版本语义 + 与上游关系 - CHANGELOG.md 新建:两版完整变更记录 + 上游互证/观察项 (由 DSH 生成:model=deepseek-v4-flash · router-mode=spec(band=weak) · harness=dsh web · preset=router-spec v0.2.1-local)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
router 判断 Pro/Flash 时读
agent.options?.model,但 DSH 中这是启动默认模型;会话里手动切换模型后,实际请求走的是会话选择,agent.options不会更新。结果:全局默认 Flash、会话选 Pro 时,weak 模式的 persona 仍按 Flash 选(issue #9 已给出稳定复现与 request/header 证据)。根因
DSH rc.6 的
dsh-agent里,会话级模型选择由installModelSelection在system-prompt/assemble阶段写入assembled.variables.provider/model,并在agent/request应用。router 没读这个来源。修复
四个 bootstrap 文件(
router-standard/router-spec的-v1.mjs与旧router-bootstrap.mjs)统一改为:sessionModels记录assembled.variables中的{provider, model},personaFor用selected.model ?? agent.options.model;dev_router_status:显示会话实际模型(fallbackagent.options);dev_mode_subagent:子调用路由用会话实际provider/model(fallbackagent.options)。回归测试(17/17)
新增 2 条插件层测试:
weak persona follows the session-selected model, not agent.options (issue #9)——launch 默认 Pro、会话实际 Flash 时,persona 必须是 WEAK_FLASH;weak persona falls back to agent.options when no session selection is present。红→绿:修复前 16/17(新测试红),修复后 17/17。
说明
本 PR 与 #8 同文件不同行,互补;与 #16 的测试 import 路径修复重叠(本分支同样修正该路径,
npm test才能运行)。Closes #9