- 22 Feb, 2026 2 commits
-
-
yangjianbo authored
- 新增 UsageRecordWorkerPool,支持有界队列、溢出降级策略与自动扩缩容 - 将 Gateway/OpenAI/Sora/Gemini 使用量记录改为提交到统一任务池执行 - 增加 usage_record 配置默认值与校验规则,并补充配置与任务提交相关测试 - 注入并托管 worker 池生命周期,服务退出时统一 StopAndWait Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
yangjianbo authored
-
- 21 Feb, 2026 8 commits
-
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
- 在 CreateAccountModal 为 Anthropic API Key 增加自动透传开关 - 创建请求写入 extra.anthropic_passthrough 并补充状态重置 - 新增 AccountHandler 单测,验证 extra 字段从请求到 CreateAccountInput 的透传
-
yangjianbo authored
- 新增 Anthropic API Key 自动透传开关与后端透传分支(仅替换认证) - 账号编辑页新增自动透传开关,默认关闭 - 优化透传性能:SSE usage 解析 gjson 快路径、减少请求体重复拷贝、优化流式写回与非流式 usage 解析 - 补充单元测试与 benchmark,确保 Claude OAuth 路径不受影响
-
yangjianbo authored
将 /v1/chat/completions 的拦截文案改为旧协议不支持,避免误导为会路由到 Sora。 明确要求客户端改用 /v1/responses。 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
yangjianbo authored
-
yangjianbo authored
- 为 codex_cli_only 增加 originator 判定通道,避免仅依赖 User-Agent 误拦截 - 扩展官方客户端家族标识,补充 codex_chatgpt_desktop 等常见前缀 - 新增并更新单元测试与网关透传回归测试,覆盖 UA 与 originator 组合场景 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
yangjianbo authored
-
- 20 Feb, 2026 2 commits
-
-
yangjianbo authored
-
yangjianbo authored
-
- 19 Feb, 2026 10 commits
-
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
- 在 failover 场景透传上游响应头并识别 Cloudflare challenge/cf-ray - 统一 Sora 任务请求的 UA 与代理使用,sentinel 与业务请求保持一致 - 修复流式错误事件 JSON 转义问题并补充相关单元测试
-
yangjianbo authored
-
yangjianbo authored
- 后端新增 Sora2 邀请码与剩余额度探测,并补充对应结果解析 - Sora 测试流程补齐请求头与 Cloudflare 场景提示,完善单测覆盖 - 前端测试弹窗对 Sora 账号改为免选模型流程,并新增中英文提示文案 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
yangjianbo authored
- 将 refresh_token 恢复请求改为表单编码并匹配 OAuth 约定 - 流式错误改为 JSON 序列化,避免消息含引号或换行导致 SSE 非法 - 补充 Sora token 恢复与 failover 流式错误透传回归测试 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
yangjianbo authored
- 新增并接通 Sora 专用 OAuth 接口与 ST/RT 换取能力 - 完成前端 Sora 授权、RT/ST 手动导入与账号创建流程 - 强化 Sora token 恢复、转发日志与网关路由隔离行为 - 补充后端服务层与路由层相关测试覆盖 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 18 Feb, 2026 8 commits
-
-
yangjianbo authored
-
yangjianbo authored
# Conflicts: # backend/cmd/server/VERSION # backend/ent/migrate/schema.go # backend/ent/mutation.go # backend/ent/runtime/runtime.go # backend/ent/usagelog.go # backend/ent/usagelog/usagelog.go # backend/ent/usagelog/where.go # backend/ent/usagelog_create.go # backend/ent/usagelog_update.go # backend/internal/repository/usage_log_repo.go # backend/internal/server/api_contract_test.go # backend/internal/server/middleware/cors.go # backend/internal/service/gateway_service.go
-
-
shaw authored
-
shaw authored
-
Wesley Liddick authored
feat: add Cache TTL Override per account
-
Wesley Liddick authored
fix: strip unsupported parameters from Codex model requests
-
Wesley Liddick authored
fix: accept openai x-stainless-* header to fix CORS error
-
- 17 Feb, 2026 1 commit
-
-
John Doe authored
- Account-level cache TTL override: rewrite Anthropic cache_creation token classification (5m
↔ 1h) in streaming/non-streaming responses - New DB field cache_ttl_overridden in usage_log for billing tracking - Migration 055_add_cache_ttl_overridden - Frontend: CacheTTL override toggle in account create/edit modals - Ent schema regenerated for new usage_log fields Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 16 Feb, 2026 2 commits
-
-
0-don authored
-
yangjianbo authored
- 仅在 delta 中 5m/1h 值大于0时覆盖 usage 明细 - 新增回归测试覆盖 delta 默认 0 不应覆盖 message_start 非零值 - 迁移 054 在删除 legacy 字段前追加一次回填,避免升级实例丢失历史写入 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 15 Feb, 2026 2 commits
-
-
yangjianbo authored
-
程序猿MT authored
-
- 14 Feb, 2026 5 commits
-
-
yangjianbo authored
-
yangjianbo authored
-
shaw authored
Anthropic API 的 cache_creation 对象区分了 ephemeral_5m 和 ephemeral_1h 两种缓存创建 token,1h 单价远高于 5m(如 claude-3-5-haiku: 5m=$1/MTok, 1h=$6/MTok)。此前系统统一按 5m 单价计费,导致计费偏低。 后端: - pricing_service: 加载 LiteLLM 的 cache_creation_input_token_cost_above_1hr - billing_service: GetModelPricing 启用分类计费(安全守卫 1h>5m), CalculateCost 按 5m/1h 分别计费,无明细时回退到 5m 单价 - gateway_service: parseSSEUsage/handleNonStreamingResponse 用 gjson 提取嵌套 cache_creation 对象的 ephemeral_5m/1h_input_tokens - antigravity_gateway_service: extractSSEUsage/extractClaudeUsage 同步提取 - usage_log: 修复 GORM column tag 确保写入正确的数据库列 - 新增迁移 054: 删除 GORM 自动生成的重复列 前端: - 使用记录 tooltip 展示 5m/1h 缓存创建明细(带彩色 badge 区分) - 表格单元格缓存写入数值旁显示 1h 标识
-
Kortan authored
-
yangjianbo authored
-