- 07 Feb, 2026 14 commits
-
-
erio authored
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
-
Wesley Liddick authored
feat(frontend): show seconds in rate limit time display
-
Wesley Liddick authored
fix(antigravity): reduce 429 fallback cooldown from 5min to 30s
-
Wesley Liddick authored
fix(antigravity): auto-fix max_tokens <= budget_tokens causing 400 error
-
Wesley Liddick authored
chore: add .gitattributes to enforce LF line endings
-
erio authored
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.
-
erio authored
The default fallback cooldown when rate limit reset time cannot be parsed was 5 minutes, which is too aggressive and causes accounts to be unnecessarily locked out. Reduce to 30 seconds for faster recovery. Config override still works (unit remains minutes).
-
erio authored
When extended thinking is enabled, Claude API requires max_tokens > thinking.budget_tokens. If misconfigured, this auto-adjusts max_tokens to budget_tokens + 1000 instead of returning a 400 error. - Add ensureMaxTokensGreaterThanBudget helper function - Extract Gemini25FlashThinkingBudgetLimit constant (24576) - Log adjustment for debugging
-
erio authored
Ensures consistent line endings for SQL migration files, Go source, shell scripts, YAML configs, and Dockerfiles. Fixes checksum mismatches on Windows where CRLF line endings cause migration hash differences.
-
shaw authored
- OAuth 账号:使用完整的 DefaultBetaHeader 和 Claude Code 客户端 headers - API Key 账号:使用 APIKeyBetaHeader(不含 oauth beta)
-
shaw authored
-
shaw authored
- 将筛选器和操作按钮合并到同一行显示 - 筛选器在左侧,操作按钮在右侧 - 添加响应式支持,窄屏时自动换行并简化按钮文字
-
shaw authored
-
shaw authored
-
- 06 Feb, 2026 16 commits
-
-
shaw authored
用户 Dashboard 的 Token 使用趋势图表现在显示 Input/Output/Cache 三种类型, 并在 Tooltip 中显示 Actual 和 Standard 价格,与管理员页面保持一致。
-
shaw authored
将 /api/health 改为 /health,与后端实际注册的路由一致
-
shaw authored
在敏感字段检测中添加白名单,排除 API 参数和用量统计字段: - max_tokens, max_completion_tokens, max_output_tokens - completion_tokens, prompt_tokens, total_tokens - input_tokens, output_tokens - cache_creation_input_tokens, cache_read_input_tokens 这些字段名虽然包含 "token" 但只是数值参数,不应被脱敏处理。
-
shaw authored
将错误透传规则按钮从自动刷新按钮前面移动到后面
-
Wesley Liddick authored
feat: implement account & proxy import/export with migration-ready JSON bundles
-
shaw authored
移除响应阶段的工具名/schema/description 转换逻辑,修复第三方工具调用时 工具名被错误转换的问题(如 Task → task)。 移除内容: - 工具名相关正则变量(toolPrefixRe, toolNameBoundaryRe 等) - openCodeToolOverrides 和 claudeToolNameOverrides 映射表 - 工具名转换函数(normalizeToolNameForClaude, normalizeToolNameForOpenCode 等) - 响应体工具名替换函数(replaceToolNamesInText, replaceToolNamesInResponseBody 等) - 参数名转换函数(normalizeParamNameForOpenCode, rewriteParamKeysInValue) - 工具描述清理函数(sanitizeToolDescription) - 输入 schema 转换函数(normalizeToolInputSchema) - 模型 ID 正则替换函数(replaceModelIDInText) 保留内容: - 系统提示词清理(sanitizeSystemText) - Claude Code 指纹 headers 处理 - 模型 ID 映射(通过 JSON 对象操作)
-
LLLLLLiulei authored
-
Wesley Liddick authored
fix(兼容): 将 Kimi cached_tokens 映射到 Claude 标准 cache_read_input_tokens
-
yangjianbo authored
-
https://github.com/mt21625457/aicodex2apiyangjianbo authored
# Conflicts: # backend/internal/service/gateway_cached_tokens_test.go
-
yangjianbo authored
Kimi 等 Claude 兼容 API 返回缓存信息使用 OpenAI 风格的 cached_tokens 字段, 而非 Claude 标准的 cache_read_input_tokens,导致客户端收不到缓存命中信息且 内部计费缓存折扣为 0。 新增 reconcileCachedTokens 辅助函数,在 cache_read_input_tokens == 0 且 cached_tokens > 0 时自动填充,覆盖流式(message_start/message_delta)和 非流式两种响应路径。对 Claude 原生上游无影响。 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
程序猿MT authored
-
shaw authored
-
yangjianbo authored
Kimi 等 Claude 兼容 API 返回缓存信息使用 OpenAI 风格的 cached_tokens 字段, 而非 Claude 标准的 cache_read_input_tokens,导致客户端收不到缓存命中信息且 内部计费缓存折扣为 0。 新增 reconcileCachedTokens 辅助函数,在 cache_read_input_tokens == 0 且 cached_tokens > 0 时自动填充,覆盖流式(message_start/message_delta)和 非流式两种响应路径。对 Claude 原生上游无影响。 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Wesley Liddick authored
feat(模型): 添加 gpt-5.3 Codex 映射与价格配置
-
Wesley Liddick authored
fix: 修复了 codex 更新用量窗口异常的 bug
-
- 05 Feb, 2026 10 commits
-
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
iBenzene authored
-
Wesley Liddick authored
fix(gemini): 修复已注册用户 OAuth 授权问题并增强错误提示
-
shaw authored
问题原因:Redis Pipeline 执行 Lua 脚本时出现 NOSCRIPT 错误, 因为 redis.NewScript 使用 EVALSHA 执行脚本,当 Redis 重启或 脚本未被缓存时,Pipeline 模式无法自动回退到 EVAL。 解决方案:在 NewSessionLimitCache 初始化时预加载所有 Lua 脚本 到 Redis,确保后续 Pipeline 执行时脚本已被缓存。
-
shaw authored
支持管理员配置上游错误如何返回给客户端: - 新增 ErrorPassthroughRule 数据模型和 Ent Schema - 实现规则的 CRUD API(/admin/error-passthrough-rules) - 支持按错误码、关键词匹配,支持 any/all 匹配模式 - 支持按平台过滤(anthropic/openai/gemini/antigravity) - 支持透传或自定义响应状态码和错误消息 - 实现两级缓存(Redis + 本地内存)和多实例同步 - 集成到 gateway_handler 的错误处理流程 - 新增前端管理界面组件 - 新增单元测试覆盖核心匹配逻辑 优化: - 移除 refreshLocalCache 中的冗余排序(数据库已排序) - 后端 Validate() 增加匹配条件非空校验
-
ianshaw authored
-
ianshaw authored
当 Gemini for Google Cloud API 未启用时(SERVICE_DISABLED 错误), 系统现在会: - 自动检测 403 PERMISSION_DENIED 错误 - 从错误响应中提取 API 激活 URL - 向用户显示清晰的错误消息和可点击的激活链接 - 提供操作指引(启用后等待几分钟) 新增文件: - internal/pkg/googleapi/error.go: Google API 错误解析器 - internal/pkg/googleapi/error_test.go: 完整的测试覆盖 - GEMINI_API_ERROR_HANDLING.md: 实现文档 修改文件: - internal/repository/geminicli_codeassist_client.go: 在 LoadCodeAssist 和 OnboardUser 中增强错误处理 这大大改善了用户体验,用户不再需要手动从错误日志中查找激活 URL。
-