- 05 Apr, 2026 4 commits
-
-
erio authored
The options parameter only served to switch between 'openai' and 'sora' platforms. With Sora removed, the parameter is unnecessary.
-
erio authored
- Remove unused accessTokenInput ref from OAuthAuthorizationFlow - Remove unused parsedSessionToken* computed and handleValidateSessionToken - Prefix unused options parameter in useOpenAIOAuth
-
erio authored
- Remove handleImportAccessToken event binding from CreateAccountModal - Remove unused imports/variables from OAuthAuthorizationFlow (useAppStore, parsedAccessToken*, handleImportAccessToken) - Remove unused oauthPlatform variable from useOpenAIOAuth composable
-
erio authored
-
- 30 Mar, 2026 1 commit
-
-
shaw authored
-
- 27 Mar, 2026 1 commit
-
-
shaw authored
新增功能: - 新增 TLS 指纹 Profile CRUD 管理(Ent schema + 迁移 + Admin API + 前端管理界面) - 支持账号绑定数据库中的自定义 TLS Profile,或随机选择(profile_id=-1) - HTTPUpstream.DoWithTLS 接口从 bool 改为 *tlsfingerprint.Profile,支持按账号指定 Profile - AccountUsageService 注入 TLSFingerprintProfileService,统一 usage 场景与网关的 Profile 解析逻辑 代码优化: - 删除已被 TLSFingerprintProfileService 完全取代的 registry.go 死代码(418 行) - 提取 3 个 dialer 的重复 TLS 握手逻辑为 performTLSHandshake() 共用函数 - 修复 GetTLSFingerprintProfileID 缺少 json.Number 处理的 bug - gateway_service.Forward 中 ResolveTLSProfile 从重试循环内重复调用改为预解析局部变量 - 删除冗余的 buildClientHelloSpec() 单行 wrapper 和 int64(e.ID) 无效转换 - tls_fingerprint_profile_cache.go 日志从 log.Printf 改为 slog 结构化日志 - dialer_capture_test.go 添加 //go:build integration 标签,防止 CI 失败 - 去重 TestProfileExpectation 类型至共享 test_types_test.go - 修复 9 个测试文件缺少 tlsfingerprint import 的编译错误 - 修复 error_policy_integration_test.go 中 handleError 回调签名被错误替换的问题
-
- 24 Mar, 2026 1 commit
-
-
QTom authored
在 OpenAI 平台添加独立的"手动输入 Mobile RT"选项,使用 client_id=app_LlGpXReQgckcGGUo2JrYvtJK 刷新 token,与现有 "手动输入 RT"(Codex CLI client_id)互不影响。 共享同一 UI 和批量创建逻辑,通过 clientId 参数区分。 同时修复空名称触发 ent NotEmpty() 校验导致 500 的问题。 Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
- 23 Mar, 2026 2 commits
-
-
Wang Lvyuan authored
-
Wang Lvyuan authored
-
- 19 Mar, 2026 2 commits
-
-
shaw authored
从上游 /v1/messages 响应头被动采集 5h/7d utilization 并存储到 Account.Extra,页面加载时直接读取本地数据而非调用外部 Usage API。 用户可点击"查询"按钮主动拉取最新数据,主动查询结果自动回写被动缓存。 后端: - UpdateSessionWindow 合并采集 5h + 7d headers 为单次 DB 写入 - 新增 GetPassiveUsage 从 Extra 构建 UsageInfo (复用 estimateSetupTokenUsage) - GetUsage 主动查询后 syncActiveToPassive 回写被动缓存 - passive_usage_ 前缀注册为 scheduler-neutral 前端: - Anthropic 账号 mount/refresh 默认 source=passive - 新增"被动采样"标签和"查询"按钮 (带 loading 动画)
-
Wang Lvyuan authored
-
- 17 Mar, 2026 3 commits
-
-
Ethan0x0000 authored
Use utilization-based idle detection instead of local request counts so newly imported OAuth accounts keep countdowns when usage is non-zero.
-
Wang Lvyuan authored
-
haruka authored
- Add compile-time interface assertion for sessionWindowMockRepo - Fix flaky fallback test by capturing time.Now() before calling UpdateSessionWindow - Replace stale hardcoded timestamps with dynamic future values - Add millisecond detection and bounds validation for reset header timestamp - Use pause/resume pattern for interval in UsageProgressBar to avoid idle timers on large lists - Fix gofmt comment alignment Co-Authored-By:Claude Sonnet 4.6 <noreply@anthropic.com>
-
- 16 Mar, 2026 3 commits
-
-
Elysia authored
The 5h window reset time displayed for Setup Token accounts was inaccurate because UpdateSessionWindow predicted the window end as "current hour + 5h" instead of reading the actual `anthropic-ratelimit-unified-5h-reset` response header. This caused the countdown to differ from the official Claude page. Backend: parse the reset header (Unix timestamp) and use it as the real window end, falling back to the hour-truncated prediction only when the header is absent. Also correct stale predictions when a subsequent request provides the real reset time. Frontend: add a reactive 60s timer so the reset countdown in UsageProgressBar ticks down in real-time instead of freezing at the initial value. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Ethan0x0000 authored
-
Ethan0x0000 authored
- Simplify OpenAI rendering: always fetch /usage, prefer fetched data over codex snapshot (snapshot serves as loading placeholder only) - Remove dead code: preferFetchedOpenAIUsage, isOpenAICodexSnapshotStale, and unreachable template branch - Add today-stats support for key accounts (req/tokens/A/U badges) - Use formatCompactNumber for consistent number formatting - Add A/U badge titles for clarity - Filter zero-value window stats in UsageProgressBar to avoid empty badges - Update tests to match new fetched-data-first behavior
-
- 15 Mar, 2026 8 commits
-
-
erio authored
Replace process-memory sync.Map + per-model runtime state with a single "AICredits" key in model_rate_limits, making credits exhaustion fully isomorphic with model-level rate limiting. Scheduler: rate-limited accounts with overages enabled + credits available are now scheduled instead of excluded. Forwarding: when model is rate-limited + credits available, inject credits proactively without waiting for a 429 round trip. Storage: credits exhaustion stored as model_rate_limits["AICredits"] with 5h duration, reusing SetModelRateLimit/isRateLimitActiveForKey. Frontend: show credits_active (yellow
⚡ ) when model rate-limited but credits available, credits_exhausted (red) when AICredits key active. Tests: add unit tests for shouldMarkCreditsExhausted, injectEnabledCreditTypes, clearCreditsExhausted, and update existing overages tests. -
SilentFlower authored
-
SilentFlower authored
-
SilentFlower authored
-
SilentFlower authored
feat: implement resolveCreditsOveragesModelKey function to stabilize model key resolution for credit overages
-
IanShaw027 authored
修复批量编辑账号时,UI 显示的是 plain 模型名(如 GPT-5),但实际落库的是 dated 模型名的问题。 核心改动: 1. 批量编辑白名单不再使用 BulkEditAccountModal.vue 中手写的过期模型列表 - 移除了 allModels 和 presetMappings 的硬编码列表(共 200+ 行) - 直接复用 ModelWhitelistSelector.vue 组件 2. ModelWhitelistSelector 组件支持多平台联合过滤 - 新增 platforms 属性支持传入多个平台 - 添加 normalizedPlatforms 计算属性统一处理单平台和多平台场景 - availableOptions 根据选中的多个平台动态联合过滤模型列表 - fillRelated 功能支持一次性填充多个平台的相关模型 3. 模型映射预设改为动态生成 - filteredPresets 改用 getPresetMappingsByPlatform 从统一模型源按平台动态生成 - 不再依赖弹窗中的手写预设列表 现在的行为: - UI 显示什么模型,勾选什么模型,传给后端的就是什么模型 - 彻底解决了批量编辑链路上"显示与实际不一致"的问题 - 模型列表和映射预设始终与系统定义保持同步
-
Ethan0x0000 authored
将入站、上游与路径三类端点分布统一到使用记录页的一致化卡片交互中,并补齐端点元数据与统计链路,提升排障与流量分析效率。
-
- 14 Mar, 2026 1 commit
-
-
SsageParuders authored
Consolidate two separate channel types (bedrock + bedrock-apikey) into a single "AWS Bedrock" channel. Authentication mode is now distinguished by credentials.auth_mode ("sigv4" | "apikey") instead of separate types. Backend: - Remove AccountTypeBedrockAPIKey constant - IsBedrock() simplified; IsBedrockAPIKey() checks auth_mode - Add IsAPIKeyOrBedrock() helper to eliminate repeated type checks - Extend pool mode, quota scheduling, and billing to bedrock - Add RetryableOnSameAccount to handleBedrockUpstreamErrors - Add "bedrock" scope to Beta Policy for independent control Frontend: - Merge two buttons into one "AWS Bedrock" with auth mode radio - Badge displays "Anthropic | AWS" - Pool mode and quota limit UI available for bedrock - Quota display in account list (usage bars, capacity badges, reset) - Remove all bedrock-apikey type references
-
- 13 Mar, 2026 3 commits
-
-
erio authored
Backend: - Detect and classify 403 responses into three types: validation (account needs Google verification), violation (terms of service / banned), forbidden (generic 403) - Extract verification/appeal URLs from 403 response body (structured JSON parsing with regex fallback) - Add needs_verify, is_banned, needs_reauth, error_code fields to UsageInfo (omitempty for zero impact on other platforms) - Handle 403 in request path: classify and permanently set account error - Save validation_url in error_message for degraded path recovery - Enrich usage with account error on both success and degraded paths - Add singleflight dedup for usage requests with independent context - Differentiate cache TTL: success/403 → 3min, errors → 1min - Return degraded UsageInfo instead of HTTP 500 on quota fetch errors Frontend: - Display forbidden status badges with color coding (red for banned, amber for needs verification, gray for generic) - Show clickable verification/appeal URL links - Display needs_reauth and degraded error states in usage cell - Add Antigravity tier label badge next to platform type Tests: - Comprehensive unit tests for classifyForbiddenType (7 cases) - Unit tests for extractValidationURL (8 cases including unicode escapes) - Integration test for FetchQuota forbidden path
-
Ylarod authored
-
wucm667 authored
- 后端新增 rolling/fixed 两种配额重置模式,支持日配额和周配额 - fixed 模式下可配置重置时刻(小时)、重置星期几(周配额)及时区(IANA) - 在 account_repo.go 中使用 SQL 表达式适配两种模式的过期判断与重置时间推进 - 新增 ComputeQuotaResetAt / ValidateQuotaResetConfig 等辅助函数 - DTO 层新增相关字段并在 mappers 中完整映射 - 前端 QuotaLimitCard 新增 rolling/fixed 切换 UI、时区选择器 - CreateAccountModal / EditAccountModal 透传新配置字段 - i18n(zh/en)同步新增相关翻译词条
-
- 11 Mar, 2026 3 commits
- 09 Mar, 2026 1 commit
-
-
erio authored
QuotaBadge components (daily/weekly/total) were wrapped in a horizontal flex container, making them visually inconsistent with other capacity badges (concurrency, window cost, sessions, RPM) which stack vertically. Remove the wrapper so all badges align consistently. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 08 Mar, 2026 2 commits
-
-
erio authored
Display daily/weekly/total quota utilization as progress bars in the usage window column for API Key accounts, providing visual feedback consistent with other account types (OAuth/Gemini). - Daily quota: "1d" label with reset countdown - Weekly quota: "7d" label with reset countdown - Total quota: "total" label (no reset)
-
kyx236 authored
-
- 07 Mar, 2026 5 commits
-
-
kyx236 authored
- 为定时测试计划增加 auto_recover 配置,补齐前后端类型、接口、仓储与数据库迁移 - 在定时测试成功后自动恢复账号 error、rate-limit 等可恢复运行时状态 - 新增 /admin/accounts/:id/recover-state 接口,合并原有重置状态与清限流操作 - 更新账号管理菜单与定时测试面板,补充自动恢复开关、说明提示和状态展示 - 补充账号恢复、限流清理与仓储同步相关测试
-
神乐 authored
-
神乐 authored
-
神乐 authored
-
erio authored
Extend the existing total quota limit with daily and weekly periodic dimensions. Each dimension is independently configurable and uses lazy reset — when the period expires, usage is automatically reset to zero on the next increment. Any dimension exceeding its limit will pause the account from scheduling. Backend: - Add GetQuotaDailyLimit/Used, GetQuotaWeeklyLimit/Used, HasAnyQuotaLimit - Rewrite IncrementQuotaUsed with atomic CTE SQL for 3-dimension update - Rewrite ResetQuotaUsed to clear all dimensions and period timestamps - Update postUsageBilling to use HasAnyQuotaLimit() - Preserve daily/weekly used values on account edit Frontend: - Refactor QuotaLimitCard from single v-model to 3-dimension props - Add QuotaBadge component for compact D/W/$ display - Update AccountCapacityCell with per-dimension badges - Update Create/Edit modals with daily/weekly quota fields - Update AccountActionMenu hasQuotaLimit to check all dimensions - Add i18n strings for daily/weekly/total quota labels Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-