1. 06 Mar, 2026 9 commits
    • JIA-ss's avatar
      fix(usage): add negative caching, singleflight, and jitter to usage queries · 3ebebef9
      JIA-ss authored
      
      
      Prevents 429 rate-limit retry storms and reduces upstream correlation risk
      for Anthropic usage API queries.
      
      Three changes:
      1. Negative caching (1 min TTL) — 429/error responses are now cached,
         preventing every subsequent page load from re-triggering failed API calls.
      2. singleflight dedup — concurrent requests for the same account are
         collapsed into a single upstream call, preventing cache stampede.
      3. Random jitter (0–800 ms) — staggers multi-account cache-miss bursts so
         requests from different accounts don't hit upstream simultaneously with
         identical TLS fingerprints, reducing anti-abuse correlation risk.
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      3ebebef9
    • 神乐's avatar
      fix(openai): support remote compact task · 34039093
      神乐 authored
      34039093
    • yangjianbo's avatar
      test(openai): 修复回归测试未使用字段告警 · 230f8abd
      yangjianbo authored
      
      
      移除订阅扣费 stub 中未被使用的状态字段与赋值,
      消除 golangci-lint 的 unused 告警,保持回归测试语义不变。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      230f8abd
    • yangjianbo's avatar
      fix(openai): 统一专属倍率计费链路并补齐回归测试 · a18bbb5f
      yangjianbo authored
      抽取共享的用户分组专属倍率解析器,统一缓存、singleflight 与回退逻辑。\n\n让 OpenAI 独立计费链路复用专属倍率解析,修复 usage 记录与实际扣费未命中用户专属倍率的问题。\n\n补齐 OpenAI 计费与解析器单元测试,并修复全量回归中暴露的 lint 阻塞项。\n\nCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
      a18bbb5f
    • alfadb's avatar
      fix: address PR review - Anthropic error format in panic recovery and nil guard · bc194a7d
      alfadb authored
      
      
      - Add recoverAnthropicMessagesPanic for Messages handler to return
        Anthropic-formatted errors instead of OpenAI Responses format on panic
      - Add nil check for rateLimitService.HandleUpstreamError in
        ForwardAsAnthropic to match defensive pattern used elsewhere
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      bc194a7d
    • alfadb's avatar
      feat(openai): add /v1/messages endpoint and API compatibility layer · ff1f1149
      alfadb authored
      Add Anthropic Messages API support for OpenAI platform groups, enabling
      clients using Claude-style /v1/messages format to access OpenAI accounts
      through automatic protocol conversion.
      
      - Add apicompat package with type definitions and bidirectional converters
        (Anthropic  Chat, Chat  Responses, Anthropic 
      
       Responses)
      - Implement /v1/messages endpoint for OpenAI gateway with streaming support
      - Add model mapping UI for OpenAI OAuth accounts (whitelist + mapping modes)
      - Support prompt caching fields and codex OAuth transforms
      - Fix tool call ID conversion for Responses API (fc_ prefix)
      - Ensure function_call_output has non-empty output field
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      ff1f1149
    • erio's avatar
      fix: OpenAI passthrough accounts bypass model mapping check · 79ae15d5
      erio authored
      透传模式账号仅替换认证,应允许所有模型通过。之前调度阶段的
      isModelSupportedByAccount 不感知透传模式,导致 model_mapping
      中未配置的新模型(如 gpt-5.4)被拒绝返回 503。
      79ae15d5
    • yangjianbo's avatar
      fix(openai): 修复 gpt-5.4 长上下文计费与快照白名单 · f3660264
      yangjianbo authored
      补齐 gpt-5.4 fallback 的长上下文计费元信息,\n确保超过 272000 输入 token 时对整次会话应用\n2x 输入与 1.5x 输出计费规则。\n\n同时将官方快照 gpt-5.4-2026-03-05 加入前端\n白名单候选与回归测试,避免 whitelist 模式误拦截。\n\nCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
      
      (cherry picked from commit d95497af87f608c6dadcbe7d6e851de9413ae147)
      f3660264
    • yangjianbo's avatar
      feat(openai): 增加 gpt-5.4 模型支持与定价配置 · 1a0d4ed6
      yangjianbo authored
      
      
      - 接入 gpt-5.4 模型识别与规范化,补充默认模型列表
      - 增加 gpt-5.4 输入/缓存命中/输出价格与计费兜底逻辑
      - 同步前端模型白名单与 OpenCode 上下文窗口(1050000/128000)
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      (cherry picked from commit 924476dcac6181cd0f3ee731ec7b73672ff03793)
      1a0d4ed6
  2. 05 Mar, 2026 15 commits
  3. 04 Mar, 2026 8 commits
  4. 03 Mar, 2026 8 commits