IanShaw027
67a05dfccd
fix: honor table defaults and preserve dispatch mappings
2026-04-10 17:55:37 +08:00
erio
62e80c602d
revert: completely remove all Sora functionality
2026-04-05 17:11:01 +08:00
shaw
92d35409de
feat: 为openai分组增加messages调度开关和默认映射模型
2026-03-07 17:02:19 +08:00
shaw
a80ec5d8bb
feat: apikey支持5h/1d/7d速率控制
2026-03-03 15:01:10 +08:00
yangjianbo
bb664d9bbf
feat(sync): full code sync from release
2026-02-28 15:01:20 +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
yangjianbo
ae1ba45350
perf(service): jitterTTL 改用 rand/v2 并移除锁
2026-02-06 21:22:38 +08:00
yangjianbo
c4182f8c33
perf(service): 移除 jitter 随机数全局锁
2026-02-06 21:20:25 +08:00
yangjianbo
de7ff902de
Merge branch 'main' into test
2026-02-04 20:35:09 +08:00
Wesley Liddick
4cce21b125
Merge branch 'main' into main
2026-02-03 21:43:41 +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
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
yangjianbo
78d0ca3775
fix(sora): 修复流式重写与计费问题
2026-01-31 21:46:28 +08:00
yangjianbo
618a614cbf
feat(Sora): 完成Sora网关接入与媒体能力
...
新增 Sora 网关路由、账号调度与同步服务\n补充媒体代理与签名 URL、模型列表动态拉取\n完善计费配置、前端支持与相关测试
2026-01-31 20:22:22 +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
fd0370c07a
Add invalid-request fallback routing
2026-01-23 22:24:46 +08:00
shaw
2028cc29b7
fix: 修复多个管理后台问题
...
- 分页接口 page_size 最大限制从 100 改为 1000
- 通过 Redis Pub/Sub 实现跨实例认证缓存失效
- 允许订阅类型分组编辑计费倍率
- 账号计费倍率支持 3 位小数
2026-01-18 22:13:47 +08:00
longgexx
392a8ac7ea
修复格式问题。
2026-01-16 17:35:17 +08:00
longgexx
19865b865f
feat(group): 添加分组级别模型路由配置功能
...
支持为分组配置模型路由规则,可以指定特定模型模式优先使用的账号列表。
- 新增 model_routing 字段存储路由配置(JSONB格式,支持通配符匹配)
- 新增 model_routing_enabled 字段控制是否启用路由
- 更新后端 handler/service/repository 支持路由配置的增删改查
- 更新前端 GroupsView 添加路由配置界面
- 添加数据库迁移脚本 040/041
2026-01-16 17:26:05 +08:00
yangjianbo
9d0a4f3d68
perf(认证): 引入 API Key 认证缓存与轻量删除查询
...
增加 L1/L2 缓存、负缓存与单飞回源
使用 key+owner 轻量查询替代全量加载并清理旧接口
补充缓存失效与余额更新测试,修复随机抖动 lint
测试: make test
2026-01-10 22:23:51 +08:00