- 24 Mar, 2026 1 commit
-
-
shaw authored
-
- 21 Mar, 2026 3 commits
-
-
mutuyihao authored
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
Dave King authored
LegacyPrintf uses inferStdLogLevel() to infer log level from message text. Any message containing the word "error" is classified as ERROR level, causing the entire signature-retry recovery flow (which succeeds) to produce spurious ERROR log entries. Changes: - Remove noisy [SignatureCheck] debug logs inside isThinkingBlockSignatureError that were logging every detected signature check as ERROR - Change retry-start log to WARN level via [warn] prefix - Change retry-success log to INFO level by removing "error" from message Co-Authored-By:Claude Sonnet 4.6 <noreply@anthropic.com>
-
- 20 Mar, 2026 14 commits
-
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
Ethan0x0000 authored
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
QTom authored
1. Start() 中 wg.Add(1) 从 run() goroutine 内部移到 go s.run() 之前, 防止 Stop().wg.Wait() 在 Add 之前返回导致孤儿 goroutine。 2. tryAcquireLeaderLock 返回的 release 闭包改用独立的 context.Background()+5s 超时,避免捕获的 evaluateOnce ctx 在 defer 执行时已过期导致锁释放失败(最长阻塞 90s TTL)。
-
Jiahao Luo authored
-
alfadb authored
旧映射错误地将所有级别上移一档(medium→high, high→xhigh), 导致 effort=max 被原样透传到 OpenAI 上游并返回 400 错误。 根据两边官方 API 定义对齐: - Anthropic: low, medium, high(默认), max - OpenAI: low, medium, high(默认), xhigh 新的 1:1 映射:low→low, medium→medium, high→high, max→xhigh
-
Remx authored
-
wucm667 authored
The quota reset mechanism is lazy — quota_daily_used/quota_weekly_used in the database are only reset on the next IncrementQuotaUsed call. The scheduling layer (IsQuotaExceeded) correctly checks period expiry before enforcing limits, so the account remains usable. However, the API response mapper reads the raw DB value without checking expiry, causing the frontend to display cumulative usage (e.g. 110%) even after the reset period has passed. Add IsDailyQuotaPeriodExpired/IsWeeklyQuotaPeriodExpired methods and use them in the mapper to return used=0 when the period has expired.
-
shaw authored
-
shaw authored
Add maximum Claude Code version limit to complement the existing minimum version check. Refactor the version cache from single-value to unified bounds struct (min+max) with a single atomic.Value and singleflight group. - Backend: new constant, struct field, cache refactor, validation (semver format + cross-validation max >= min), gateway enforcement, audit diff - Frontend: settings UI input, TypeScript types, zh/en i18n - Add CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 to all Claude Code tutorials on /keys page (unix/cmd/powershell/vscode settings.json)
-
- 19 Mar, 2026 11 commits
-
-
erio authored
shouldMarkCreditsExhausted was blocked by isURLLevelRateLimit check when credit overages retry returned "Resource has been exhausted (e.g. check quota).", causing credits to never be marked as exhausted. This led to an infinite loop where each request injected credits, bypassed model rate limits, and failed again. - Remove isURLLevelRateLimit guard from shouldMarkCreditsExhausted (only called for credit retry responses — if credits retry fails, mark exhausted) - Add "resource has been exhausted" to creditsExhaustedKeywords - Update tests to match corrected behavior
-
erio authored
## Problem When a proxy is unreachable, token refresh retries up to 4 times with 30s timeout each, causing requests to hang for ~2 minutes before failing with a generic 502 error. The failed account is not marked, so subsequent requests keep hitting it. ## Changes ### Proxy connection fast-fail - Set TCP dial timeout to 5s and TLS handshake timeout to 5s on antigravity client, so proxy connectivity issues fail within 5s instead of 30s - Reduce overall HTTP client timeout from 30s to 10s - Export `IsConnectionError` for service-layer use - Detect proxy connection errors in `RefreshToken` and return immediately with "proxy unavailable" error (no retries) ### Token refresh temp-unschedulable - Add 8s context timeout for token refresh on request path - Mark account as temp-unschedulable for 10min when refresh fails (both background `TokenRefreshService` and request-path `GetAccessToken`) - Sync temp-unschedulable state to Redis cache for immediate scheduler effect - Inject `TempUnschedCache` into `AntigravityTokenProvider` ### Account failover - Return `UpstreamFailoverError` on `GetAccessToken` failure in `Forward`/`ForwardGemini` to trigger handler-level account switch instead of returning 502 directly ### Proxy probe alignment - Apply same 5s dial/TLS timeout to shared `httpclient` pool - Reduce proxy probe timeout from 30s to 10s
-
QTom authored
- 新增分组列:展示用户的专属/公开分组,支持 hover 查看详情 - 新增分组筛选:下拉选择或模糊搜索分组名过滤用户 - 专属分组替换:点击专属分组弹出操作菜单,选择目标分组后 自动授予新分组权限、迁移绑定的 Key、移除旧分组权限 - 后端新增 POST /admin/users/:id/replace-group 端点,事务内 完成分组替换并失效认证缓存
-
Rose Ding authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Rose Ding authored
当 Claude Code 发来的 MCP tool 的 input_schema 为 {"type":"object"} 且缺少 properties 字段时,OpenAI Codex 后端会拒绝并报错: Invalid schema for function '...': object schema missing properties. 新增 normalizeToolParameters 函数,在 convertAnthropicToolsToResponses 中 对每个 tool 的 InputSchema 做规范化处理后再赋给 Parameters。 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Remx authored
- 接入 gpt-5.4-mini/nano 模型识别与规范化,补充默认模型列表 - 增加 gpt-5.4-mini/nano 输入/缓存命中/输出价格与计费兜底逻辑 - 同步前端模型白名单与 OpenCode 配置 - 补充 service tier(priority/flex) 计费回归测试
-
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 动画)
-
shaw authored
-
Hg authored
-
QTom authored
Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
haruka authored
When all failover accounts are exhausted, handleFailoverExhausted maps the upstream status code (e.g. 403) to a client-facing code (e.g. 502) but did not write the original code to the gin context. This caused ops error logs to show the mapped code instead of the real upstream code. Call SetOpsUpstreamError before mapUpstreamError in all failover- exhausted paths so that ops_error_logger captures the true upstream status code and message. Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
- 18 Mar, 2026 11 commits
-
-
jimmy-coder authored
-
shaw authored
Move 529 overload cooldown configuration from config file to admin settings UI. Adds an enable/disable toggle and configurable cooldown duration (1-120 min) under /admin/settings gateway tab, stored as JSON in the settings table. When disabled, 529 errors are logged but accounts are no longer paused from scheduling. Falls back to config file value when DB is unreachable or settingService is nil.
-
erio authored
Update model mapping target for claude-haiku-4-5 and claude-haiku-4-5-20251001 from claude-sonnet-4-5 to claude-sonnet-4-6. Includes migration script, default constants, and test updates.
-
alfadb authored
-
alfadb authored
Empty text blocks ({"type":"text","text":""}) cause Anthropic upstream to return 400: "text content blocks must be non-empty". This was not caught by the existing error detection pattern in isThinkingBlockSignatureError, nor handled by FilterThinkingBlocksForRetry. - Add empty text block stripping to FilterThinkingBlocksForRetry - Fix isThinkingBlockSignatureError to match new Anthropic error format - Add fast-path byte patterns to avoid unnecessary JSON parsing Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
wucm667 authored
-
wucm667 authored
后端 HTML 注入时同步替换 <title> 标签为自定义站点名称, 前端 fetchPublicSettings 完成后重新设置 document.title, 解决路由守卫先于设置加载导致标题回退为默认值的时序问题。
-
shaw authored
测试数据使用的 session ID "abc-123" 不符合 ParseMetadataUserID 要求的 36 字符 UUID 格式,替换为合法 UUID。
-
shaw authored
Claude Code v2.1.78 起将 metadata.user_id 从拼接字符串改为 JSON: 旧: user_{hex}_account_{uuid}_session_{uuid} 新: {"device_id":"...","account_uuid":"...","session_id":"..."} 新增集中解析/格式化模块 metadata_userid.go: - ParseMetadataUserID: 自动识别两种格式,提取 DeviceID/AccountUUID/SessionID - FormatMetadataUserID: 根据 UA 版本输出对应格式(>= 2.1.78 输出 JSON) - ExtractCLIVersion: 从 UA 提取版本号,消除与 ClaudeCodeValidator.ExtractVersion 的重复 修改消费者统一使用新模块: - claude_code_validator: 用 ParseMetadataUserID 替代只匹配旧格式的 userIDPattern - identity_service: RewriteUserID/WithMasking 增加 fingerprintUA 参数, 解析用 ParseMetadataUserID,输出用 FormatMetadataUserID(版本感知) - gateway_service: GenerateSessionHash 用 ParseMetadataUserID 提取 session_id, buildOAuthMetadataUserID 用 FormatMetadataUserID 输出版本匹配格式, 两处 RewriteUserIDWithMasking 调用传入 fp.UserAgent - account_test_service: generateSessionString 改用 FormatMetadataUserID, 自动跟随 DefaultHeaders UA 版本 删除三个旧正则: userIDPattern, userIDRegex, sessionIDRegex 统一 hex 匹配为 [a-fA-F0-9],修复旧 userIDRegex 只匹配小写的不一致 -
Gemini Wen authored
Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
QTom authored
复用 GroupCapacityService,在 admin 分组列表中添加容量列, 显示每个分组的实时并发/会话/RPM 使用量和上限。 Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-