yangjianbo
9cafa46dd3
fix(accounts): 账号管理改为单行增量更新并避免全量刷新
...
- 将编辑与重新授权成功事件改为回传更新后的账号对象
- 在账号列表页按 id 就地补丁更新单行数据并保留运行时容量字段
- 单账号操作(刷新凭证/清错/清限流/临时不可调度重置)改为单行更新
- 后端增强 clear-rate-limit 接口,返回更新后的账号对象
- 同步前端 clearRateLimit API 类型定义
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-14 12:06:17 +08:00
yangjianbo
f6bff97d26
fix(frontend): 修复前端审计问题并补充回归测试
2026-02-14 11:56:08 +08:00
yangjianbo
3734abed4c
feat(openai): 支持 gpt-5.3-codex-spark 并统一 gpt-5.3 到 codex 计费
2026-02-13 09:28:07 +08:00
yangjianbo
abf5de69fb
Merge branch 'main' into test
2026-02-12 23:43:47 +08:00
yangjianbo
7582dc53d2
fix(openai): 修复关闭 codex_cli_only 无法持久化问题
...
在编辑 OpenAI OAuth 账号时,若 codex_cli_only 从开启切换为关闭,
现改为显式写入 false,避免 extra 为空时后端忽略更新导致旧值残留。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-12 23:15:41 +08:00
yangjianbo
a9518cc5be
feat(openai): 增加 OAuth 账号 Codex 官方客户端限制开关
...
新增 codex_cli_only 开关并默认关闭,关闭时完全绕过限制逻辑。
在 OpenAI 网关引入统一检测入口,集中判定账号类型、开关与客户端族。
开启后仅放行 codex_cli_rs、codex_vscode、codex_app 客户端家族。
补充后端判定与网关分支测试,并在前端创建/编辑页增加开关配置与回显。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-12 22:32:59 +08:00
yangjianbo
eaa7d899f0
fix(ops): 优化系统日志展示为可读文本
...
解析 extra 字段(status_code/latency_ms/method/path 等)并拼成普通文本\n表格改为 3 列并固定时间/级别宽度,详情列填满后自动换行
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-12 18:00:16 +08:00
yangjianbo
fff1d54858
feat(log): 落地统一日志底座与系统日志运维能力
2026-02-12 16:27:29 +08:00
yangjianbo
208c5380f4
fix(ops): 排除刷新信号避免分页重置页码
2026-02-12 15:00:22 +08:00
yangjianbo
65661f24e2
feat(ops): 运维监控新增 OpenAI Token 请求统计表
...
- 新增管理端接口 /api/v1/admin/ops/dashboard/openai-token-stats,按模型聚合统计 gpt% 请求
- 支持 time_range=30m|1h|1d|15d|30d(默认 30d),支持 platform/group_id 过滤
- 支持分页(page/page_size)或 TopN(top_n)互斥查询
- 前端运维监控页新增统计表卡片,包含空态/错误态与分页/TopN 交互
- 补齐后端与前端测试
2026-02-12 14:20:14 +08:00
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
Wesley Liddick
c7b42148a5
Merge pull request #559 from wucm667/fix/auth-page-logo
...
fix: 修复登录/注册页面自定义 Logo 不显示及闪烁问题
2026-02-11 20:01:03 +08:00
Wesley Liddick
bc1abb6a23
Merge pull request #557 from james-6-23/main
...
feat(admin): 为账户和兑换码新增邮箱搜索及限流过滤功能
2026-02-11 20:00:43 +08:00
wucm667
ef2c35dbb1
🐛 fix: 修复登录/注册页面自定义 Logo 不显示及闪烁问题
...
- sanitizeUrl 新增 allowDataUrl 选项,支持 data:image/ 格式的 base64 图片 URL
- AuthLayout 改用 appStore 缓存数据,避免重复 API 请求和默认 Logo 闪烁
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-11 17:04:57 +08:00
kyx236
04a1a7c2b5
feat(admin): Add email search and rate limit filtering for accounts and redeem codes
...
- Add used_by_email column to redeem code export CSV for better user identification
- Implement rate_limited status filter in account listing with RateLimitResetAt check
- Extend redeem code search to include user email in addition to code matching
- Add API key search capability to user listing filters
- Display user email in redeem code table used_by column for improved visibility
- Update search placeholders in UI to reflect expanded search capabilities (email, username, notes, API key)
- Improve Chinese and English localization strings for search hints
2026-02-11 16:39:42 +08:00
Tian
c8f87a9c92
feat(antigravity): 支持 Refresh Token 批量导入创建 OAuth 账号
...
后端新增 ValidateRefreshToken service 方法和 POST /oauth/refresh-token 端点,
前端新增 API/Composable/UI 集成,OAuthAuthorizationFlow i18n 动态化,
支持在 Antigravity 创建账号时批量粘贴 Refresh Token 自动验证并创建账号。
2026-02-11 01:23:21 +08:00
yangjianbo
f1e884ce2b
feat(openai): 增加 OAuth 透传开关
...
- 仅对 Codex CLI 且账号开启时走原样透传(只替换认证)
- 透传模式禁用工具修正/模型替换,并旁路解析 usage 用于计费
- 管理后台增加开关与文案,ops upstream error 记录 passthrough 标记
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-11 00:59:39 +08:00
yangjianbo
3b0910f664
Merge branch 'main' into test-sora
2026-02-10 18:01:17 +08:00
Edric Li
7d0a30fa8f
merge: sync upstream main (antigravity single-account 503 retry)
...
合并上游新增的 Antigravity 单账号 503 退避重试机制,
解决与本地 MODEL_CAPACITY_EXHAUSTED 逻辑的冲突,两者共存。
2026-02-10 12:00:21 +08:00
Edric Li
d95e04fd1f
feat: 错误透传规则支持 skip_monitoring 跳过运维监控记录
...
在每条错误透传规则上新增 skip_monitoring 选项,开启后匹配该规则的错误
不会被记录到 ops_error_logs,减少监控噪音。默认关闭,不影响现有规则。
2026-02-10 11:42:39 +08:00
shaw
5dd83d3cf2
fix: 移除特定system以适配新版cc客户端缓存失效的bug
2026-02-10 10:28:34 +08:00
yangjianbo
29ca1290b3
chore(test): 清理测试用例与类型导入
2026-02-10 00:37:56 +08:00
shaw
aa4b102108
fix: 移除Antigravity的apikey账户额外的表单
2026-02-09 22:15:14 +08:00
yangjianbo
d367d1cde6
Merge branch 'main' into test-sora
2026-02-09 20:40:09 +08:00
erio
4a84ca9a02
fix: support clearing model-level rate limits from action menu and temp-unsched reset
2026-02-09 20:37:30 +08:00
erio
470b37be7e
fix: pass platform prop to GroupBadge in GroupSelector
...
GroupBadge in GroupSelector was missing the platform prop, causing all
group badges in account edit/detail pages to use fallback colors instead
of platform-specific colors (e.g. Claude=orange, Gemini=blue).
2026-02-09 14:33:05 +08:00
QTom
5e0d789440
feat(admin): 新增 CRS 同步预览和账号选择功能
...
- 后端新增 PreviewFromCRS 接口,允许用户先预览 CRS 中的账号
- 后端支持在同步时选择特定账号,不选中的账号将被跳过
- 前端重构 SyncFromCrsModal 为三步向导:输入凭据 → 预览账号 → 执行同步
- 改进表单无障碍性:添加 for/id 关联和 required 属性
- 修复 Back 按钮返回时的状态清理
- 新增 buildSelectedSet 和 shouldCreateAccount 的单元测试
- 完整的向后兼容性:旧客户端不发送 selected_account_ids 时行为不变
2026-02-09 10:39: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
erio
2f1182e8a9
feat: unified error policy for Antigravity + enable custom error codes for Gemini accounts
2026-02-09 06:54:42 +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
2eb32a0ed7
chore: update pnpm-lock.yaml for vue-draggable-plus
...
CI 的 pnpm install --frozen-lockfile 需要 lock 文件同步更新
2026-02-08 17:10:25 +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
8a0a8558cf
feat(ui): OpenAI OAuth 账号支持批量 RT 输入创建
...
新增通过手动输入 Refresh Token 创建 OpenAI OAuth 账号功能,
参考 Anthropic sessionKey 批量创建方式:
- useOpenAIOAuth 添加 validateRefreshToken 方法
- accounts.ts 添加 refreshOpenAIToken API
- AuthInputMethod 类型新增 refresh_token 选项
- 支持多行输入 RT(每行一个)批量创建账号
- 账号名称自动累加后缀 #1 , #2 等
- UI 显示 RT 数量徽章和批量创建提示
- 添加中英文 i18n 翻译
2026-02-08 16:10:15 +08:00
Wesley Liddick
2185a3b674
Merge pull request #517 from touwaeriol/fix/upstream-baseurl
...
refactor(upstream): replace upstream account type with apikey + auto-append base_url
2026-02-08 14:03:12 +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
erio
fb58560d15
refactor(upstream): replace upstream account type with apikey, auto-append /antigravity
...
Upstream accounts now use the standard APIKey type instead of a dedicated
upstream type. GetBaseURL() and new GetGeminiBaseURL() automatically append
/antigravity for Antigravity platform APIKey accounts, eliminating the need
for separate upstream forwarding methods.
- Remove ForwardUpstream, ForwardUpstreamGemini, testUpstreamConnection
- Remove upstream branch guards in Forward/ForwardGemini/TestConnection
- Add migration 052 to convert existing upstream accounts to apikey
- Update frontend CreateAccountModal to create apikey type
- Add unit tests for GetBaseURL and GetGeminiBaseURL
2026-02-08 13:06:25 +08:00
yangjianbo
bb5a5dd65e
test: 完善自动化测试体系(7个模块,73个任务)
...
系统性地修复、补充和强化项目的自动化测试能力:
1. 测试基础设施修复
- 修复 stubConcurrencyCache 缺失方法和构造函数参数不匹配
- 创建 testutil 共享包(stubs.go, fixtures.go, httptest.go)
- 为所有 Stub 添加编译期接口断言
2. 中间件测试补充
- 新增 JWT 认证中间件测试(有效/过期/篡改/缺失 Token)
- 补充 rate_limiter 和 recovery 中间件测试场景
3. 网关核心路径测试
- 新增账户选择、等待队列、流式响应、并发控制、计费、Claude Code 检测测试
- 覆盖负载均衡、粘性会话、SSE 转发、槽位管理等关键逻辑
4. 前端测试体系(11个新测试文件,163个测试用例)
- Pinia stores: auth, app, subscriptions
- API client: 请求拦截器、响应拦截器、401 刷新
- Router guards: 认证重定向、管理员权限、简易模式限制
- Composables: useForm, useTableLoader, useClipboard
- Components: LoginForm, ApiKeyCreate, Dashboard
5. CI/CD 流水线重构
- 重构 backend-ci.yml 为统一的 ci.yml
- 前后端 4 个并行 Job + Postgres/Redis services
- Race 检测、覆盖率收集与门禁、Docker 构建验证
6. E2E 自动化测试
- e2e-test.sh 自动化脚本(Docker 启动→健康检查→测试→清理)
- 用户注册→登录→API Key→网关调用完整链路测试
- Mock 模式和 API Key 脱敏支持
7. 修复预存问题
- tlsfingerprint dialer_test.go 缺失 build tag 导致集成测试编译冲突
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-08 12:05:39 +08:00
erio
df3346387f
fix(frontend): upstream account edit fields and mixed_scheduling on create
...
- EditAccountModal: add Base URL / API Key fields for upstream type
- EditAccountModal: initialize editBaseUrl from credentials on upstream account open
- EditAccountModal: save upstream credentials (base_url, api_key) on submit
- CreateAccountModal: pass mixed_scheduling extra when creating upstream account
2026-02-08 02:08:51 +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
shaw
da9546ba24
fix(ui): widen CreateAccountModal to fix platform selector overflow
2026-02-07 17:25:52 +08:00
shaw
1439eb39a9
fix(gateway): harden digest logging and align antigravity ops
...
- avoid panic by using safe UUID prefix truncation in Gemini digest fallback logs\n- remove unconditional Antigravity 429 full-body debug logs and honor log truncation config\n- align Antigravity quick preset mappings to opus 4.6-thinking targets only\n- restore scope rate-limit aggregation/output in ops availability stats
2026-02-07 17:12:15 +08:00
Wesley Liddick
c4615a1224
Merge pull request #509 from touwaeriol/pr/antigravity-full
...
feat(antigravity): comprehensive enhancements - model mapping, rate limiting, scheduling & ops
2026-02-07 16:44:28 +08:00
erio
2656320d04
fix(antigravity): fetch default mapping from API and sync Redis on rate limit
...
1. Frontend: replace hardcoded antigravityDefaultMappings with async
fetch from GET /admin/accounts/antigravity/default-model-mapping,
eliminating the duplicate data source that caused frontend/backend
mapping inconsistency.
2. Backend: convert handleSmartRetry and antigravityRetryLoop from
standalone functions to AntigravityGatewayService methods, enabling
Redis cache sync (updateAccountModelRateLimitInCache) after both
rate-limit write paths — long-delay branch and retry-exhausted branch.
2026-02-07 15:59:27 +08:00
shaw
5d4327eb14
fix: 前端codex教程里模型ID升级为gpt-5.3-codex
2026-02-07 14:53:53 +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
erio
8826705e71
feat(frontend): show seconds in rate limit time display
...
Change formatTime() to include seconds (HH:MM:SS) instead of only
hours and minutes (HH:MM). This gives users more precise information
about when rate limits will reset.
2026-02-07 11:59:27 +08:00
shaw
35a55e10aa
fix: 前端快捷添加模型id新增gpt5.3系列
2026-02-07 11:13:51 +08:00
shaw
9e80ed0fa8
fix(frontend): 优化代理管理页面工具栏布局
...
- 将筛选器和操作按钮合并到同一行显示
- 筛选器在左侧,操作按钮在右侧
- 添加响应式支持,窄屏时自动换行并简化按钮文字
2026-02-07 11:09:34 +08:00