Skip to content

fix(gateway): in auto mode recognize Claude Code IDE clients via any cc_entrypoint#3360

Merged
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
feitianbubu:fix/auto-mode-cc-entrypoint-ide
Jun 21, 2026
Merged

fix(gateway): in auto mode recognize Claude Code IDE clients via any cc_entrypoint#3360
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
feitianbubu:fix/auto-mode-cc-entrypoint-ide

Conversation

@feitianbubu

Copy link
Copy Markdown
Contributor

问题

仅在 auto 模式、且分组限定 only Claude clientclaude_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 并失败。

@feitianbubu feitianbubu changed the title fix(gateway): in auto mode, recognize Claude Code IDE clients via any cc_entrypoint fix(gateway): in auto mode recognize Claude Code IDE clients via any cc_entrypoint Jun 18, 2026
@Wei-Shaw Wei-Shaw merged commit bed12b7 into Wei-Shaw:main Jun 21, 2026
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants