- 09 Feb, 2026 12 commits
-
-
erio authored
-
erio authored
Add ShouldHandleErrorCode guard at the entry of handleGeminiUpstreamError and AntigravityGatewayService.handleUpstreamError so that accounts with custom error codes (e.g. [599]) are not rate-limited when the upstream returns a non-matching status (e.g. 429).
-
erio authored
When custom error codes are enabled and the upstream error code is NOT in the configured list, return HTTP 500 to the client instead of transparently forwarding the original status code. Also adds integration test TestCustomErrorCode599 verifying that 429, 500, 503, 401, 403 all return 500 without triggering SetRateLimited or SetError.
-
Wesley Liddick authored
fix: pass platform prop to GroupBadge in GroupSelector
-
erio authored
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).
-
shaw authored
-
Wesley Liddick authored
feat(admin): 新增 CRS 同步预览和账号选择功能
-
QTom authored
-
QTom authored
- 后端新增 PreviewFromCRS 接口,允许用户先预览 CRS 中的账号 - 后端支持在同步时选择特定账号,不选中的账号将被跳过 - 前端重构 SyncFromCrsModal 为三步向导:输入凭据 → 预览账号 → 执行同步 - 改进表单无障碍性:添加 for/id 关联和 required 属性 - 修复 Back 按钮返回时的状态清理 - 新增 buildSelectedSet 和 shouldCreateAccount 的单元测试 - 完整的向后兼容性:旧客户端不发送 selected_account_ids 时行为不变
-
Wesley Liddick authored
feat: Antigravity improvements and scope-to-model rate limiting refactor
-
erio authored
- Fix gofmt alignment in ops_realtime_models.go - Remove SetAntigravityQuotaScopeLimit mock from api_contract_test.go - Add UpdateSortOrders mock to mockGroupRepoForGateway
-
erio authored
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
-
- 08 Feb, 2026 28 commits
-
-
erio authored
Add post-sort shuffle for accounts with identical (priority, loadRate, lastUsedAt) to break deterministic ordering when concurrent requests read the same scheduler snapshot. Applies to both Antigravity and OpenAI scheduling paths, plus the sortAccountsByPriorityAndLastUsed helper. Keeps upstream CallCount/ModelLoadInfo scheduling intact; shuffle is additive and only randomises within equivalent-rank groups.
-
erio authored
Without this routing guard, ForwardUpstream is never called because Forward() always proceeds with the standard OAuth/cookie flow.
-
erio authored
- In handleSmartRetry, use the actual upstream retryDelay to set model rate limit duration instead of always using the 30s default - Return info.RetryDelay from shouldTriggerAntigravitySmartRetry when shouldRateLimitModel=true, so callers know the actual delay - Extract getDefaultRateLimitDuration() and resolveResetTime() helpers to reduce duplication in handleUpstreamError 429 handling - Improve debug logging with upstream_retry_delay and response body
-
erio authored
-
erio authored
-
erio authored
-
erio authored
-
erio authored
-
erio authored
-
erio authored
-
erio authored
ParseGatewayRequest only parsed Anthropic format (system/messages), ignoring Gemini native format (systemInstruction/contents). This caused GenerateSessionHash to produce identical hashes for all Gemini sessions. Add protocol parameter to ParseGatewayRequest to branch between Anthropic and Gemini parsing. Update GenerateSessionHash message traversal to extract text from both formats.
-
erio authored
Mix SessionContext (ClientIP, UserAgent, APIKeyID) into GenerateSessionHash 3rd-level fallback to differentiate requests from different users sending identical content. Also switch hashContent from SHA256-truncated to XXHash64 for better performance, and optimize Trie Lua script to match from longest prefix first.
-
erio authored
Previously, thoughtSignature cleanup only applied to Gemini CLI requests (detected via x-gemini-api-privileged-user-id header or tmp dir pattern). This caused 400 errors for non-CLI clients when session cache expired and they sent stale signatures. Remove the isGeminiCLIRequest guard so all clients benefit from proactive thoughtSignature cleanup on session binding miss.
-
Wesley Liddick authored
feat(admin): 新增-分组管理自由拖拽排序功能
-
bayma888 authored
记录项目环境配置、CI 流程、常见坑点和解决方案。
-
bayma888 authored
CI 的 pnpm install --frozen-lockfile 需要 lock 文件同步更新
-
bayma888 authored
- 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
-
shaw authored
优化 /admin/users 页面的并发数列,显示「当前/最大」格式, 参考 AccountCapacityCell 的设计风格。 - 后端 UserHandler 注入 ConcurrencyService,批量查询用户当前并发数 - 新增 UserConcurrencyCell 组件,支持颜色状态(空闲灰/使用中黄/满载红) - 前端 AdminUser 类型添加 current_concurrency 字段
-
shaw authored
新增通过手动输入 Refresh Token 创建 OpenAI OAuth 账号功能, 参考 Anthropic sessionKey 批量创建方式: - useOpenAIOAuth 添加 validateRefreshToken 方法 - accounts.ts 添加 refreshOpenAIToken API - AuthInputMethod 类型新增 refresh_token 选项 - 支持多行输入 RT(每行一个)批量创建账号 - 账号名称自动累加后缀 #1, #2 等 - UI 显示 RT 数量徽章和批量创建提示 - 添加中英文 i18n 翻译
-
Wesley Liddick authored
refactor(upstream): replace upstream account type with apikey + auto-append base_url
-
Wesley Liddick authored
feat(antigravity): comprehensive enhancements — rate limiting, scheduling & smart retry
-
shaw authored
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.
-
erio authored
-
shaw authored
-
erio authored
-
erio authored
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
-
erio authored
ForwardUpstream/ForwardUpstreamGemini should pipe the upstream response directly to the client (headers + body), not parse it as SSE stream.
-
erio authored
-