- 03 Feb, 2026 40 commits
-
-
Wesley Liddick authored
Antigravity 相关BUG修复及调度优化
-
Wesley Liddick authored
-
Wesley Liddick authored
feat(api-key): 添加API密钥独立配额和过期时间功能
-
bayma888 authored
-
bayma888 authored
Add quota, quota_used, expires_at fields to expected JSON responses in POST /api/v1/keys and GET /api/v1/keys test cases.
-
Wesley Liddick authored
fix(proxy): 增加代理探测的多 URL 回退机制
-
bayma888 authored
- Add missing IncrementQuotaUsed method to stubApiKeyRepo in api_contract_test.go - Fix gofmt formatting issues in api_key_service.go, dto/types.go, api_key_handler.go
-
Wesley Liddick authored
feat(admin): 管理员可查看每个用户充值和并发变动记录、点击余额可直接查看、优化弹框UI
-
bayma888 authored
Add the missing IncrementQuotaUsed method to: - fakeAPIKeyRepo (api_key_auth_google_test.go) - stubApiKeyRepo (api_key_auth_test.go) - apiKeyRepoStub (api_key_service_delete_test.go) - authRepoStub (api_key_service_cache_test.go)
-
bayma888 authored
This feature allows API Keys to have their own quota limits and expiration times, independent of the user's balance. Backend: - Add quota, quota_used, expires_at fields to api_key schema - Implement IsExpired() and IsQuotaExhausted() checks in middleware - Add ResetQuota and ClearExpiration API endpoints - Integrate quota billing in gateway handlers (OpenAI, Anthropic, Gemini) - Include quota/expiration fields in auth cache for performance - Expiration check returns 403, quota exhausted returns 429 Frontend: - Add quota and expiration inputs to key create/edit dialog - Add quick-select buttons for expiration (+7, +30, +90 days) - Add reset quota confirmation dialog - Add expires_at column to keys list - Add i18n translations for new features (en/zh) Migration: - Add 045_add_api_key_quota.sql for new columns
-
bayma888 authored
Add ListByUserPaginated and SumPositiveBalanceByUser methods
-
bayma888 authored
Add ListByUserPaginated and SumPositiveBalanceByUser to redeemRepoStub Add GetUserBalanceHistory to stubAdminService Fixes CI test compilation errors
-
JIA-ss authored
某些 AI API 专用代理只允许访问特定域名(如 anthropic.com、openai.com), 会拦截对 ip-api.com 的请求。本次修改增加了多 URL 回退机制: 1. 优先使用 ip-api.com(可获取详细地理信息:城市、地区、国家) 2. 若失败则回退到 httpbin.org/ip(仅获取 IP 地址,速度快) 主要变更: - 新增 probeURLs 列表支持多个探测 URL - 重构 ProbeProxy() 实现回退逻辑 - 新增 parseHTTPBin() 解析 httpbin.org 响应 - 优化错误信息,JSON 解析失败时显示响应体前 200 字符 Co-Authored-By:Claude <noreply@anthropic.com>
-
song authored
-
song authored
-
song authored
-
song authored
-
song authored
-
song authored
-
Wesley Liddick authored
fix: 混合渠道警告确认框和过滤 prompt_cache_retention 参数
-
Wesley Liddick authored
feat(antigravity): 支持按配额域(scope)级别限流
-
Wesley Liddick authored
feat(usage): add reasoning effort column
-
Wesley Liddick authored
feat(antigravity): map all gemini-2.5 to gemini-3 series
-
Wesley Liddick authored
fix(gemini): 为 Gemini 工具调用添加 thoughtSignature 避免 INVALID_ARGUMENT 错误
-
Wesley Liddick authored
feat: 增加邀请码注册功能
-
ianshaw authored
-
ducky authored
-
Wesley Liddick authored
fix(网关): 完善 Claude OAuth/Claude Code 兼容
-
liuxiongfeng authored
-
liuxiongfeng authored
- 后端 DTO 新增 scope_rate_limits 字段,从 extra 提取限流信息 - 前端状态列显示 scope 级限流徽章(Claude/Gemini/Image) - 清除速率限制时同时清除账号级和 scope 级限流(已有实现) Cherry-picked from slovx2/sub2api: 66f49b67
-
liuxiongfeng authored
在运维监控的并发/排队卡片中,为 Antigravity 平台账号显示各 scope (claude/gemini_text/gemini_image) 的限流数量统计,便于管理员了解 哪些 scope 正在被限流。 Cherry-picked from slovx2/sub2api: 08d6dc52
-
liuxiongfeng authored
PostgreSQL jsonb_set 在 create_if_missing=true 时无法一次性创建多层嵌套路径。 例如设置 {antigravity_quota_scopes,gemini_image} 时,如果 antigravity_quota_scopes 不存在, jsonb_set 不会自动创建外层 key,导致更新静默失败(affected=1 但数据未变)。 修复方案:嵌套两次 jsonb_set,先确保外层 key 存在,再设置内层值。 同时在设置限流时更新 last_used_at,使刚触发 429 的账号调度优先级降低。 Cherry-picked from slovx2/sub2api: 4b57e80e -
liuxiongfeng authored
将 GATEWAY_ANTIGRAVITY_429_SCOPE_LIMIT 的默认值从关闭改为开启。 当 Gemini 模型触发 429 限流时,只会限制对应的配额域(gemini_text), 而 Claude 和 gemini_image 仍可继续使用,提高账号利用率。
-
liuxiongfeng authored
Antigravity 上游不再支持 gemini-2.5 系列,统一映射到 gemini-3: - gemini-2.5-flash → gemini-3-flash - gemini-2.5-flash-lite → gemini-3-flash - gemini-2.5-flash-thinking → gemini-3-flash - gemini-2.5-flash-image → gemini-3-pro-image - gemini-2.5-pro → gemini-3-pro-high - gemini-2.5-pro-preview → gemini-3-pro-high - gemini-2.5-pro-exp → gemini-3-pro-high
-
liuxiongfeng authored
Update test expectation to reflect new mapping: gemini-2.5-pro -> gemini-3-pro-high
-
liuxiongfeng authored
Add prefix mapping rules for gemini-2.5-pro variants: - gemini-2.5-pro -> gemini-3-pro-high - gemini-2.5-pro-preview -> gemini-3-pro-high - gemini-2.5-pro-exp -> gemini-3-pro-high
-
song authored
-
shuike authored
-
shuike authored
-
Call White authored
merge to main
-