fix(网关): 区分 Claude Code OAuth 适配

This commit is contained in:
cyhhao
2026-01-15 19:17:07 +08:00
parent 2a7d04fec4
commit b8c48fb477
3 changed files with 90 additions and 27 deletions

View File

@@ -707,6 +707,9 @@ func (h *GatewayHandler) CountTokens(c *gin.Context) {
return
}
// 检查是否为 Claude Code 客户端,设置到 context 中
SetClaudeCodeClientContext(c, body)
setOpsRequestContext(c, "", false, body)
parsedReq, err := service.ParseGatewayRequest(body)