- 08 Feb, 2026 25 commits
-
-
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
-
erio authored
Replace manual header setting (Content-Type, anthropic-version, anthropic-beta) with full client header passthrough in ForwardUpstream/ForwardUpstreamGemini. Only authentication headers (Authorization, x-api-key) are overridden with upstream account credentials. Hop-by-hop headers are excluded. Add unit tests covering header passthrough, auth override, and hop-by-hop filtering.
-
- 07 Feb, 2026 15 commits
-
-
erio authored
- 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
-
erio authored
v0.1.74 merged upstream accounts into the OAuth path, causing requests to hit the wrong protocol and endpoint. Add three upstream-specific methods (testUpstreamConnection, ForwardUpstream, ForwardUpstreamGemini) that use base_url + apiKey auth and passthrough the original body, while reusing the existing response handling and error/retry logic.
-
erio authored
- Change antigravitySmartRetryMaxAttempts from 3 to 1 to prevent repeated rate limiting and long waits - Clear sticky session binding (DeleteSessionAccountID) after smart retry exhaustion, so subsequent requests don't hit the same rate-limited account - Add flow diagrams to Forward/ForwardGemini doc comments - Add comprehensive unit tests covering: - Sticky session cleared on retry failure (429, 503, network error) - Sticky session NOT cleared on retry success - Sticky session NOT cleared for non-sticky requests (empty hash) - Sticky session NOT cleared on long delay path (handled by handler) - Nil cache safety (no panic) - MaxAttempts constant verification - End-to-end retryLoop → switchError propagation with session clear
-
shaw authored
-
shaw authored
-
erio authored
-
erio authored
-
erio authored
The digest chain fallback is only needed for Gemini endpoints, not for the Anthropic Messages API path. Remove the handler integration while keeping the reusable service/repository layer for future use.
-
erio authored
The previous fallback (step 3) in GenerateSessionHash hashed system + all messages together, producing a different hash each round as the conversation grew ([a] -> [a,b] -> [a,b,c]). This made fallback sticky sessions ineffective for multi-turn conversations. Implement per-message Trie digest chain matching (reusing Gemini's Trie infrastructure) so that the previous round's chain is always a prefix of the current round's chain, enabling reliable session affinity.
-
shaw authored
-
shaw authored
- 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
-
erio authored
Remove threshold-based waiting in both sticky session and antigravity pre-check paths. When a model is rate-limited, immediately clear the sticky session and switch accounts instead of waiting for short durations.
-
Wesley Liddick authored
feat(antigravity): comprehensive enhancements - model mapping, rate limiting, scheduling & ops
-
erio authored
-
erio authored
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.
-