Merge pull request #316 from cyhhao/fix/claude-oauth-compat

fix(网关): 完善 Claude OAuth/Claude Code 兼容
This commit is contained in:
Wesley Liddick
2026-02-03 14:26:19 +08:00
committed by GitHub
12 changed files with 1526 additions and 133 deletions

View File

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