• keh4l's avatar
    fix(gateway): apply D/E/F mimicry to native /v1/messages and count_tokens paths · 7ae378de
    keh4l authored and 陈曦's avatar 陈曦 committed
    The previous commit only wired stripMessageCacheControl,
    addMessageCacheBreakpoints, and tool-name obfuscation into
    applyClaudeCodeOAuthMimicryToBody (used by /chat/completions and
    /responses). The native /v1/messages path and count_tokens path
    have their own independent mimicry code blocks and were missed.
    
    Now all three entry points share the same D/E/F pipeline:
      - /v1/messages (gateway_service.go forwardAnthropic)
      - /v1/messages/count_tokens (gateway_service.go countTokens)
      - OpenAI compat (applyClaudeCodeOAuthMimicryToBody)
    7ae378de
gateway_service.go 313 KB