test: 添加 Claude signature 场景 e2e 测试

- 新增 TestClaudeMessagesWithClaudeSignature 测试
- 验证历史 thinking block 带有 Claude signature 时的处理
- 修复配额刷新服务的次要问题
This commit is contained in:
song
2025-12-29 00:44:07 +08:00
parent 08ce6de4db
commit 995adaeee4
4 changed files with 161 additions and 25 deletions

View File

@@ -131,15 +131,9 @@ func (r *AntigravityQuotaRefresher) refreshAccountQuota(ctx context.Context, acc
return nil // 没有有效凭证,跳过
}
// 检查 token 是否过期,过期则刷新
// token 过期则跳过,由 TokenRefreshService 负责刷新
if r.isTokenExpired(account) {
tokenInfo, err := r.oauthSvc.RefreshAccountToken(ctx, account)
if err != nil {
return err
}
accessToken = tokenInfo.AccessToken
// 更新凭证
account.Credentials = r.oauthSvc.BuildAccountCredentials(tokenInfo)
return nil
}
// 获取代理 URL