1. 07 Apr, 2026 1 commit
    • shaw's avatar
      fix: 非流式路径在上游终态事件output为空时从delta事件重建响应内容 · b2e379cf
      shaw authored
      上游API近期更新后,response.completed终态SSE事件的output字段可能为空,
      实际内容仅通过response.output_text.delta等增量事件下发。流式路径不受影响,
      但chat_completions非流式路径和responses OAuth非流式路径只依赖终态事件的
      output,导致返回空响应。
      
      新增BufferedResponseAccumulator累积器,在SSE扫描过程中收集delta事件内容
      (文本、function_call、reasoning),当终态output为空时补充重建。
      
      同时修复handleChatBufferedStreamingResponse遗漏response.done事件类型的问题。
      b2e379cf
  2. 04 Apr, 2026 3 commits
    • erio's avatar
      fix: resolve golangci-lint issues — remove unused constants and functions, fix gofmt · 1b5ae71d
      erio authored
      - Remove unused claudeMax*Tokens constants (Claude Max feature not included)
      - Remove unused UsageMapHook type, SetUsageMapHook method, and usageToMap function
      - Fix gofmt formatting in channel_service.go, openai_model_mapping_test.go,
        chatcompletions_to_responses.go
      1b5ae71d
    • erio's avatar
      fix: resolve cherry-pick compilation and test issues · e59fa863
      erio authored
      - Add int64(0) param to SelectAccountWithLoadAwareness callers (signature change from channel scheduling refactor)
      - Add UsageMapHook type and struct field to StreamingProcessor
      - Revert Claude Max cache billing code to upstream/main (not part of channel feature)
      - Revert credits overages logic to upstream/main (non-channel change)
      - Remove Instructions field reference (non-channel OpenAI feature)
      - Restore sora_client_handler_test.go from upstream + add channel service nil params
      e59fa863
    • erio's avatar
      fix: resolve golangci-lint issues · 3851628a
      erio authored
      - Fix errcheck: defer rows.Close() with nolint
      - Fix errcheck: type assertion with ok check in channel cache
      - Fix staticcheck ST1005: lowercase error string
      - Fix staticcheck SA5011: nil check cost before use in openai gateway
      - Fix gofmt: format chatcompletions_to_responses.go
      3851628a
  3. 31 Mar, 2026 1 commit
  4. 24 Mar, 2026 1 commit
  5. 23 Mar, 2026 1 commit
    • Ethan0x0000's avatar
      feat(apicompat): add ResponsesAnthropic bidirectional format conversion · 68f151f5
      Ethan0x0000 authored
      Add reverse-direction converters for Anthropic platform groups to accept
      OpenAI-format requests:
      
      - ResponsesToAnthropicRequest: Responses API input → Anthropic Messages
        request with system extraction, tool/toolChoice mapping, reasoning
        effort conversion, image data URIbase64, and consecutive role merging
      - AnthropicToResponsesResponse: Anthropic response → Responses response
        with content block→output item mapping, usage, stop_reason→status
      - AnthropicEventToResponsesEvents: stateful SSE stream converter
        (Anthropic streaming protocol → Responses streaming protocol)
      - FinalizeAnthropicResponsesStream: synthetic termination for
        incomplete streams
      68f151f5
  6. 21 Mar, 2026 1 commit
  7. 20 Mar, 2026 1 commit
    • alfadb's avatar
      fix(apicompat): 修正 Anthropic→OpenAI 推理级别映射 · 8afa8c10
      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
      8afa8c10
  8. 19 Mar, 2026 2 commits
  9. 14 Mar, 2026 2 commits
  10. 11 Mar, 2026 1 commit
    • shaw's avatar
      refactor: 重构 Chat Completions 端点,采用类型安全的 Responses API 转换 · 9d814679
      shaw authored
      将 /v1/chat/completions 端点从 ResponseWriter 劫持模式重构为独立的
      类型安全转换路径,与 Anthropic Messages 端点架构对齐:
      
      - 在 apicompat 包新增 Chat Completions 完整类型定义和双向转换器
      - 新增 ForwardAsChatCompletions service 方法,走 Responses API 上游
      - Handler 改为独立的账号选择/failover 循环,不再劫持 Responses handler
      - 提取 handleCompatErrorResponse 为 Chat Completions 和 Messages 共用
      - 删除旧的 forwardChatCompletions 直传路径及相关死代码
      9d814679
  11. 09 Mar, 2026 2 commits
  12. 07 Mar, 2026 2 commits
  13. 06 Mar, 2026 2 commits
    • shaw's avatar
      feat: /v1/messages端点适配codex账号池 · 92159994
      shaw authored
      92159994
    • 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