refactor(antigravity): countTokens 端点直接返回空值
- Gemini 端点 countTokens 直接返回 {"totalTokens": 0}
- Claude 端点 countTokens 返回 {"input_tokens": 0}
- 移除透传上游和本地估算逻辑
This commit is contained in:
@@ -1750,10 +1750,9 @@ func (s *GatewayService) ForwardCountTokens(ctx context.Context, c *gin.Context,
|
||||
body := parsed.Body
|
||||
reqModel := parsed.Model
|
||||
|
||||
// Antigravity 账户不支持 count_tokens 转发,返回估算值
|
||||
// 参考 Antigravity-Manager 和 proxycast 实现
|
||||
// Antigravity 账户不支持 count_tokens 转发,直接返回空值
|
||||
if account.Platform == PlatformAntigravity {
|
||||
c.JSON(http.StatusOK, gin.H{"input_tokens": 100})
|
||||
c.JSON(http.StatusOK, gin.H{"input_tokens": 0})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user