Merge PR #142: feat: 多平台网关优化与用户系统增强
主要功能: - Gemini OAuth 配额系统优化:Google One tier 自动推断 - Antigravity 网关增强:Thinking Block 重试、Claude 模型 signature 透传 - 账号调度改进:临时不可调度功能、负载感知调度优化 - 前端用户体验:账号管理界面优化、使用教程改进 冲突解决:保留 handleUpstreamError 的 prefix 参数和日志记录能力, 同时合并 PR 的 thinking block 重试和 model fallback 功能。
This commit is contained in:
@@ -41,7 +41,7 @@ func NewOpenAIGatewayHandler(
|
||||
// POST /openai/v1/responses
|
||||
func (h *OpenAIGatewayHandler) Responses(c *gin.Context) {
|
||||
// Get apiKey and user from context (set by ApiKeyAuth middleware)
|
||||
apiKey, ok := middleware2.GetApiKeyFromContext(c)
|
||||
apiKey, ok := middleware2.GetAPIKeyFromContext(c)
|
||||
if !ok {
|
||||
h.errorResponse(c, http.StatusUnauthorized, "authentication_error", "Invalid API key")
|
||||
return
|
||||
@@ -235,7 +235,7 @@ func (h *OpenAIGatewayHandler) Responses(c *gin.Context) {
|
||||
defer cancel()
|
||||
if err := h.gatewayService.RecordUsage(ctx, &service.OpenAIRecordUsageInput{
|
||||
Result: result,
|
||||
ApiKey: apiKey,
|
||||
APIKey: apiKey,
|
||||
User: apiKey.User,
|
||||
Account: usedAccount,
|
||||
Subscription: subscription,
|
||||
|
||||
Reference in New Issue
Block a user