Skip to content

fix(config): 严格直连模型大小写匹配(r8 配对,上游 #5475 同源) - #18

Merged
h3c-hexin merged 1 commit into
Pinvou:pinvou3-cleanfrom
asto18089:fix/strict-direct-casing-r8
Aug 27, 2026
Merged

fix(config): 严格直连模型大小写匹配(r8 配对,上游 #5475 同源)#18
h3c-hexin merged 1 commit into
Pinvou:pinvou3-cleanfrom
asto18089:fix/strict-direct-casing-r8

Conversation

@asto18089

@asto18089 asto18089 commented Aug 19, 2026

Copy link
Copy Markdown

背景

Z.ai 目录使用市场化拼写 GLM-5.2,而设置页与存量配置可能保存小写 glm-5.2。严格直连解析在精确匹配失败后,会因其他 provider 的同名裸 wire id 将其误判为外部模型。

本 PR 将已合入上游的 Hmbown/CodeWhale#5475 原提交 c0f749731 原样回移到 pinvou3-clean;稳定 patch-id 与上游一致。

No-Issue: 回移已经上游评审并合入的修复,不重复创建 Issue。

变更

  • 仅在官方 DeepSeek/Z.ai 严格直连端点内,在精确匹配穷尽后接受唯一的 provider-owned ASCII 大小写折叠匹配。
  • 大小写歧义时保留未知模型透传,不按目录顺序借用元数据。
  • 自定义 endpoint 继续按原始模型字符串透传。
  • 增加正常匹配和歧义处理两条回归测试。

验证

  • cargo test -p codewhale-config --locked:544 passed,doc-test 1 passed。
  • cargo fmt --all -- --check:通过。
  • cargo clippy -p codewhale-config --lib --locked -- -D warnings:通过。
  • 在最新 pinvou3-clean 上重放无冲突;撤掉实现、保留回归时可稳定复现 ForeignModelForDirectProvider(zai)

父仓配对

父仓 Pinvou/pinvou-agent#295 已落后并产生冲突;本 PR 合并及新 tag 创建后,应从父仓最新 main 刷新 gitlink、fork 登记、指纹和 app 端回归,不沿用旧的在途 head。

Signed-off-by: asto asto18089@users.noreply.github.com

@github-actions

Copy link
Copy Markdown

Thanks @asto18089 for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

asto18089 added a commit to Pinvou/pinvou-agent that referenced this pull request Aug 19, 2026
0.8.1 macOS 版 GLM Coding Plan 国际版选 glm-5.2 报
model "glm-5.2" is not served by direct provider zai:zai 目录行
为市场拼写 GLM-5.2,app 保存的小写选择器精确比较匹配不到自身
行,反而在外部校验中撞上 modelstudio 裸 wire id 被误拒;自定义
glm-5.3 无冲突走透传故可用。

原修复在 Pinvou/CodeWhale#14 按 provider class 泛化,该 PR 关闭
后由维护者按评审收敛并经官方上游 Hmbown/Codewhale#5475 合入
(c0f749731,Co-authored-by 原作者):折叠回退仅作用于官方
Deepseek/Zai 严格直连端点,仅在精确匹配穷尽后接受唯一的
provider-owned 折叠命中,歧义时保持透传。本 PR 将该上游提交原样
cherry-pick 到 pinvou3-clean(Pinvou/CodeWhale#18),父仓按
r6/PR #216 配对流程先指向修复分支 head,同步更新 fork 登记
(r8)与 guard 指纹。

Signed-off-by: asto <asto18089@users.noreply.github.com>
asto18089 added a commit to Pinvou/pinvou-agent that referenced this pull request Aug 19, 2026
zai 目录行是市场拼写 GLM-5.2,设置页与存量配置可能保存小写
glm-5.2。新增回归:经 send_user_message 同款路由入口
resolve_runtime_route_for_model,两种拼写 在 z.ai 直连端点都解析
成功,vendor=glm 路由到 zai provider,且上线模型收敛为底座目录规范
拼写 GLM-5.2(与 CodeWhale resolver 大小写折叠回退配套,
Pinvou/CodeWhale#18,上游 Hmbown/Codewhale#5475 同源)。

Signed-off-by: asto <asto18089@users.noreply.github.com>
asto18089 added a commit to Pinvou/pinvou-agent that referenced this pull request Aug 20, 2026
0.8.1 macOS 版 GLM Coding Plan 国际版选 glm-5.2 报
model "glm-5.2" is not served by direct provider zai:zai 目录行
为市场拼写 GLM-5.2,app 保存的小写选择器精确比较匹配不到自身
行,反而在外部校验中撞上 modelstudio 裸 wire id 被误拒;自定义
glm-5.3 无冲突走透传故可用。

原修复在 Pinvou/CodeWhale#14 按 provider class 泛化,该 PR 关闭
后由维护者按评审收敛并经官方上游 Hmbown/Codewhale#5475 合入
(c0f749731,Co-authored-by 原作者):折叠回退仅作用于官方
Deepseek/Zai 严格直连端点,仅在精确匹配穷尽后接受唯一的
provider-owned 折叠命中,歧义时保持透传。本 PR 将该上游提交原样
cherry-pick 到 pinvou3-clean(Pinvou/CodeWhale#18),父仓按
r6/PR #216 配对流程先指向修复分支 head,同步更新 fork 登记
(r8)与 guard 指纹。

Signed-off-by: asto <asto18089@users.noreply.github.com>
asto18089 added a commit to Pinvou/pinvou-agent that referenced this pull request Aug 20, 2026
zai 目录行是市场拼写 GLM-5.2,设置页与存量配置可能保存小写
glm-5.2。新增回归:经 send_user_message 同款路由入口
resolve_runtime_route_for_model,两种拼写 在 z.ai 直连端点都解析
成功,vendor=glm 路由到 zai provider,且上线模型收敛为底座目录规范
拼写 GLM-5.2(与 CodeWhale resolver 大小写折叠回退配套,
Pinvou/CodeWhale#18,上游 Hmbown/Codewhale#5475 同源)。

Signed-off-by: asto <asto18089@users.noreply.github.com>
@asto18089
asto18089 force-pushed the fix/strict-direct-casing-r8 branch from 33ce0c7 to 125e3fd Compare August 21, 2026 04:56
asto18089 added a commit to Pinvou/pinvou-agent that referenced this pull request Aug 21, 2026
CodeWhale gitlink 33ce0c7d -> 125e3fdcd: Pinvou/CodeWhale#18 was one
commit behind pinvou3-clean (d127aed11, #15 merged); restacked the
r8 casing cherry-pick (patch-identical to Hmbown/Codewhale#5475
c0f749731) onto it. fork-guard EXPECTED_HEAD/EXPECTED_COMMITS
(10 -> 11) and the bilingual r8 in-flight registration follow; the
r8 fingerprints themselves are unchanged.

Signed-off-by: asto <asto18089@126.com>
@asto18089

Copy link
Copy Markdown
Author

Restacked onto the current pinvou3-clean head d127aed11 (was 1 commit behind, on r7): the single commit is unchanged and remains patch-identical to upstream Hmbown/CodeWhale#5475 c0f749731. Re-verified on the restacked head: codewhale-config full suite 544 passed, cargo fmt --check and cargo clippy -p codewhale-config --all-targets clean.

Parent pairing Pinvou/pinvou-agent#295 is green locally (fork-guard --fast, architecture guard, full app cargo test --lib 1249 passed including the #15 turn_tool_security field adaptation) and now tracks this head.

To unblock the parent PR's public-baseline gate, could a maintainer squash-merge this into pinvou3-clean and create the immutable tag pinvou-v0.9.5-r8 at the merge commit? The parent branch will then flip gitlink + verify-public-submodule.sh tag reference + guard expectations to the tagged commit, same paired-PR flow as r6/Hmbown#216 and r7/Hmbown#285. cc @h3c-hexin

DeepSeek 与 Z.ai 的目录可能使用市场化大小写,而保存的选择器通常为小写。仅在官方严格直连端点内接受唯一的 provider-owned 大小写折叠匹配;歧义时保留未知模型透传,避免按目录顺序借用元数据。

Signed-off-by: hexin <372726039@qq.com>
Co-authored-by: asto <44870036+asto18089@users.noreply.github.com>
@h3c-hexin
h3c-hexin force-pushed the fix/strict-direct-casing-r8 branch from 125e3fd to 1e839b3 Compare August 27, 2026 05:51
@h3c-hexin
h3c-hexin merged commit 0d89a31 into Pinvou:pinvou3-clean Aug 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants