fix(gateway): in auto mode recognize Claude Code IDE clients via any cc_entrypoint#3360
Merged
Wei-Shaw merged 1 commit intoJun 21, 2026
Merged
Conversation
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.
问题
仅在 auto 模式、且分组限定 only Claude client(
claude_code_only)时触发:计费块快速通道只匹配写死的
cc_entrypoint=cli。Claude Code 在 VSCode 扩展里入口是cc_entrypoint=claude-vscode(JetBrains/SDK 各不相同),其安全监视器子请求又不带身份 prose,于是落回 Dice 相似度检查、被claude_code_only分组误拒。修改
改为只要求
cc_entrypoint=字段存在,不绑定具体值。入口值标记的是客户端形态,不是信任边界(伪造者同样可填任意值),写死单一值只会随新增 IDE 入口漂移。计费块前缀仍是必要条件,快速通道未放宽。测试
cc_entrypoint=claude-vscode能被识别。cc_entrypoint=字段时仍落回 Dice 并失败。