yangjianbo
9c910c2049
feat(openai): 支持自动透传开关并透传 User-Agent
...
- OpenAI OAuth/API Key 统一支持自动透传开关,编辑页可开关\n- 透传模式仅替换认证并保留计费/并发/审计,修复 API Key responses 端点拼接\n- Usage 页面显示原始 User-Agent 且不截断,补充回归测试与清单
2026-02-12 10:56:07 +08:00
yangjianbo
d367d1cde6
Merge branch 'main' into test-sora
2026-02-09 20:40:09 +08:00
erio
fc095bf054
refactor: replace scope-level rate limiting with model-level rate limiting
...
Merge functional changes from develop branch:
- Remove AntigravityQuotaScope system (claude/gemini_text/gemini_image)
- Replace with per-model rate limiting using resolveAntigravityModelKey
- Remove model load statistics (IncrModelCallCount/GetModelLoadBatch)
- Simplify account selection to unified priority→load→LRU algorithm
- Remove SetAntigravityQuotaScopeLimit from AccountRepository
- Clean up scope-related UI indicators and API fields
2026-02-09 08:19:01 +08:00
Wesley Liddick
5fa93ebdc7
Merge pull request #519 from bayma888/feature/group-sort-order
...
feat(admin): 新增-分组管理自由拖拽排序功能
2026-02-08 18:00:22 +08:00
bayma888
bac9e2bfd5
feat(admin): add drag-and-drop group sort order
...
- Add `sort_order` field to groups table with migration
- Add `PUT /api/v1/admin/groups/sort-order` API for batch update
- Implement drag-and-drop UI using vue-draggable-plus
- All queries now order groups by sort_order
- Add i18n support (en/zh) for sort-related UI text
- Update test stubs to satisfy new interface methods
2026-02-08 16:53:45 +08:00
shaw
e4d74ae11d
feat(ui): 用户列表页显示当前并发数
...
优化 /admin/users 页面的并发数列,显示「当前/最大」格式,
参考 AccountCapacityCell 的设计风格。
- 后端 UserHandler 注入 ConcurrencyService,批量查询用户当前并发数
- 新增 UserConcurrencyCell 组件,支持颜色状态(空闲灰/使用中黄/满载红)
- 前端 AdminUser 类型添加 current_concurrency 字段
2026-02-08 16:44:51 +08:00
shaw
b1c30df8e3
fix(ui): unify admin table toolbar layout with search and buttons in single row
...
Standardize filter bar layout across admin pages to place search/filters
on left and action buttons on right within the same row, improving
visual consistency and space utilization.
2026-02-08 14:00:02 +08:00
yangjianbo
fd43be8d0b
merge: 合并 main 分支到 test,解决 config 和 modelWhitelist 冲突
...
- config.go: 保留 Sora 配置,合入 SubscriptionCache 配置
- useModelWhitelist.ts: 同时保留 soraModels 和 antigravityModels
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-07 20:18:07 +08:00
shaw
f3605ddc71
chore: /admin/usage页面增加一个刷新按钮
2026-02-07 19:13:43 +08:00
erio
5e98445b22
feat(antigravity): comprehensive enhancements - model mapping, rate limiting, scheduling & ops
...
Key changes:
- Upgrade model mapping: Opus 4.5 → Opus 4.6-thinking with precise matching
- Unified rate limiting: scope-level → model-level with Redis snapshot sync
- Load-balanced scheduling by call count with smart retry mechanism
- Force cache billing support
- Model identity injection in prompts with leak prevention
- Thinking mode auto-handling (max_tokens/budget_tokens fix)
- Frontend: whitelist mode toggle, model mapping validation, status indicators
- Gemini session fallback with Redis Trie O(L) matching
- Ops: enhanced concurrency monitoring, account availability, retry logic
- Migration scripts: 049-051 for model mapping unification
2026-02-07 12:31:10 +08:00
shaw
9e80ed0fa8
fix(frontend): 优化代理管理页面工具栏布局
...
- 将筛选器和操作按钮合并到同一行显示
- 筛选器在左侧,操作按钮在右侧
- 添加响应式支持,窄屏时自动换行并简化按钮文字
2026-02-07 11:09:34 +08:00
shaw
bd7fdb5e6c
refactor(frontend): 调整账号页面错误透传规则按钮位置
...
将错误透传规则按钮从自动刷新按钮前面移动到后面
2026-02-06 16:38:06 +08:00
LLLLLLiulei
7319122e92
merge upstream/main
2026-02-06 11:33:45 +08:00
yangjianbo
d8e405511e
Merge branch 'main' of https://github.com/mt21625457/aicodex2api
2026-02-06 06:56:23 +08:00
shaw
39e05a2dad
feat: 新增全局错误透传规则功能
...
支持管理员配置上游错误如何返回给客户端:
- 新增 ErrorPassthroughRule 数据模型和 Ent Schema
- 实现规则的 CRUD API(/admin/error-passthrough-rules)
- 支持按错误码、关键词匹配,支持 any/all 匹配模式
- 支持按平台过滤(anthropic/openai/gemini/antigravity)
- 支持透传或自定义响应状态码和错误消息
- 实现两级缓存(Redis + 本地内存)和多实例同步
- 集成到 gateway_handler 的错误处理流程
- 新增前端管理界面组件
- 新增单元测试覆盖核心匹配逻辑
优化:
- 移除 refreshLocalCache 中的冗余排序(数据库已排序)
- 后端 Validate() 增加匹配条件非空校验
2026-02-05 21:52:54 +08:00
LLLLLLiulei
0c660f8335
feat: refine proxy export and toolbar layout
2026-02-05 18:35:00 +08:00
LLLLLLiulei
ce9a247a9d
feat: add proxy import flow
2026-02-05 18:23:49 +08:00
LLLLLLiulei
b4bd46d067
feat: add data import/export bundle
2026-02-05 17:46:08 +08:00
shaw
2b192f7dca
feat: 支持用户专属分组倍率配置
2026-02-05 16:05:42 +08:00
shaw
49a3c43741
feat(auth): 实现 Refresh Token 机制
...
- 新增 Access Token + Refresh Token 双令牌认证
- 支持 Token 自动刷新和轮转
- 添加登出和撤销所有会话接口
- 前端实现无感刷新和主动刷新定时器
2026-02-05 12:42:54 +08:00
yangjianbo
de7ff902de
Merge branch 'main' into test
2026-02-04 20:35:09 +08:00
yangjianbo
377bffe281
Merge branch 'main' into test
2026-02-03 22:48:04 +08:00
Wesley Liddick
4cce21b125
Merge branch 'main' into main
2026-02-03 21:43:41 +08:00
Wesley Liddick
c0c9c984d1
Merge pull request #471 from bayma888/feature/api-key-quota-expiration
...
feat(api-key): 添加API密钥独立配额和过期时间功能
2026-02-03 21:11:17 +08:00
Wesley Liddick
c89bbf5130
Merge pull request #458 from bayma888/feature/admin-user-balance-history
...
feat(admin): 管理员可查看每个用户充值和并发变动记录、点击余额可直接查看、优化弹框UI
2026-02-03 20:37:30 +08:00
bayma888
6146be1474
feat(api-key): add independent quota and expiration support
...
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
2026-02-03 19:49:31 +08:00
song
2220fd18ca
merge upstream main
2026-02-03 15:36:17 +08:00
Wesley Liddick
6e54eda41f
Merge pull request #464 from touwaeriol/pr/antigravity-scope-ratelimit
...
feat(antigravity): 支持按配额域(scope)级别限流
2026-02-03 15:02:15 +08:00
Wesley Liddick
df4c0adf0b
Merge pull request #463 from DuckyProject/feat/usage-records-codex-reasoning-effort
...
feat(usage): add reasoning effort column
2026-02-03 14:57:45 +08:00
ducky
53ee6383db
feat(usage): add reasoning effort column
2026-02-03 14:36:29 +08:00
liuxiongfeng
6e8eff9bb9
feat(ops): 运维界面展示 Antigravity 账号 scope 级别限流统计
...
在运维监控的并发/排队卡片中,为 Antigravity 平台账号显示各 scope
(claude/gemini_text/gemini_image) 的限流数量统计,便于管理员了解
哪些 scope 正在被限流。
Cherry-picked from slovx2/sub2api: 08d6dc52
2026-02-03 14:25:30 +08:00
shuike
6c86501d11
feat: 增加邀请码注册功能
2026-02-03 13:38:44 +08:00
shaw
0ab68aa9fb
fix(setup): 修复 Redis TLS 配置选项位置错误
...
- 将 TLS Toggle 从第一步(PostgreSQL)移动到第二步(Redis)
- 添加缺失的 Toggle 组件导入
问题描述:
TLS 配置选项错误地出现在数据库配置步骤中,而不是 Redis 配置步骤
2026-02-03 11:24:04 +08:00
bayma888
606e29d390
feat(admin): add user balance/concurrency history modal
...
- Add new API endpoint GET /admin/users/:id/balance-history with pagination and type filter
- Add SumPositiveBalanceByUser for calculating total recharged amount
- Create UserBalanceHistoryModal component with:
- User info header (email, username, created_at, current balance, notes, total recharged)
- Type filter dropdown (all/balance/admin_balance/concurrency/admin_concurrency/subscription)
- Quick deposit/withdraw buttons
- Paginated history list with icons and colored values
- Add instant tooltip on balance column for better UX
- Add z-index prop to BaseDialog for modal stacking control
- Update i18n translations (zh/en)
2026-02-03 00:16:10 +08:00
song
3ecadf4aad
chore: apply stashed changes
2026-02-02 22:20:08 +08:00
song
0170d19fa7
merge upstream main
2026-02-02 22:13:50 +08:00
liuxiongfeng
e1a4a7b8c0
feat(groups): 添加从其他分组复制账号功能
...
- 创建分组时可选择从已有分组复制账号
- 编辑分组时支持同步账号(全量替换操作)
- 仅允许选择相同平台的源分组
- 添加完整的数据校验:去重、自引用检查、平台一致性检查
- 前端支持多选源分组,带提示说明操作行为
2026-02-02 21:47:47 +08:00
Wesley Liddick
325ed747d8
Merge pull request #455 from ZeroClover/feat/ops-ignore-invalid-api-key-errors
...
feat(ops): 支持过滤无效 API Key 错误,不写入错误日志
2026-02-02 20:28:00 +08:00
Wesley Liddick
4329f72abf
Merge pull request #450 from bayma888/feature/show-admin-adjustment-notes
...
feat: 向用户显示管理员调整余额的备注
2026-02-02 20:19:23 +08:00
Zero Clover
ad1cdba338
feat(ops): 支持过滤无效 API Key 错误,不写入错误日志
...
新增 IgnoreInvalidApiKeyErrors 开关,启用后 INVALID_API_KEY 和
API_KEY_REQUIRED 错误将被完全跳过,不写入 Ops 错误日志。
这些错误由用户错误配置导致,与服务质量无关。
2026-02-02 20:16:17 +08:00
小北
ae18397ca6
feat: 向用户显示管理员调整余额的备注
...
- 为RedeemCode DTO添加notes字段(仅用于admin_balance/admin_concurrency类型)
- 更新mapper使其有条件地包含备注信息
- 在用户兑换历史UI中显示备注
- 备注以斜体显示,悬停时显示完整内容
用户现在可以看到管理员调整其余额的原因说明。
Changes:
- backend/internal/handler/dto/types.go: RedeemCode添加notes字段
- backend/internal/handler/dto/mappers.go: 条件性填充notes
- frontend/src/api/redeem.ts: TypeScript接口添加notes
- frontend/src/views/user/RedeemView.vue: UI显示备注信息
2026-02-02 17:44:50 +08:00
shaw
bbdc8663d3
feat: 重新设计公告系统为Header铃铛通知
...
- 新增 AnnouncementBell 组件,支持 Modal 弹窗和 Markdown 渲染
- 移除 Dashboard 横幅和独立公告页面
- 铃铛位置在 Header 文档按钮左侧,显示未读红点
- 支持点击查看详情、标记已读、全部已读等操作
- 完善国际化,移除所有硬编码中文
- 修复 AnnouncementTargetingEditor watch 循环问题
2026-02-02 15:15:39 +08:00
Wesley Liddick
d3062b2e46
Merge pull request #434 from DuckyProject/feat/announcement-system-pr-upstream
...
feat(announcements): admin/user announcement system
2026-02-02 10:50:26 +08:00
yangjianbo
399dd78b2a
feat(Sora): 直连生成并移除sora2api依赖
...
实现直连 Sora 客户端、媒体落地与清理策略\n更新网关与前端配置以支持 Sora 平台\n补齐单元测试与契约测试,新增 curl 测试脚本\n\n测试: go test ./... -tags=unit
2026-02-01 21:37:10 +08:00
yangjianbo
618a614cbf
feat(Sora): 完成Sora网关接入与媒体能力
...
新增 Sora 网关路由、账号调度与同步服务\n补充媒体代理与签名 URL、模型列表动态拉取\n完善计费配置、前端支持与相关测试
2026-01-31 20:22:22 +08:00
iBenzene
f2e206700c
feat: add support for using TLS to connect to Redis
2026-01-31 03:58:01 +08:00
ducky
b7f69844e1
feat(announcements): add admin/user announcement system
...
Implements announcements end-to-end (admin CRUD + read status, user list + mark read) with OR-of-AND targeting. Also breaks the ent<->service import cycle by moving schema-facing constants/targeting into a new domain package.
2026-01-30 16:45:04 +08:00
ducky
04a509d45e
feat(purchase): 增加购买订阅 iframe 页面与配置
...
- 新增 /purchase 页面(iframe + 新窗口兜底)
- 管理员系统设置可配置开关与URL
- 非 simple mode 才在侧边栏展示入口
2026-01-28 13:54:32 +08:00
song
877c17251d
feat(group): 添加 MCP XML 注入开关
...
- Group 新增 mcp_xml_inject 字段,控制 Antigravity 平台的 MCP XML 协议注入
- 默认启用,可在分组设置中关闭
- 修复 GetByKeyForAuth 遗漏查询 mcp_xml_inject 字段导致认证缓存值始终为 false 的问题
2026-01-27 13:09:56 +08:00
song
08d6dc5227
feat(ops): 运维界面展示 Antigravity 账号 scope 级别限流统计
...
在运维监控的并发/排队卡片中,为 Antigravity 平台账号显示各 scope
(claude/gemini_text/gemini_image) 的限流数量统计,便于管理员了解
哪些 scope 正在被限流。
2026-01-27 09:34:10 +08:00