Commit Graph

6 Commits

Author SHA1 Message Date
Oleg Artyomov
14eb5395b3 service/ccm: strip Accept-Encoding before forwarding to avoid untracked usage
When clients (e.g. Node.js Anthropic SDK) explicitly set Accept-Encoding: gzip,
Go's http.Transport does not transparently decompress the response body, because
it only does so when it added the header itself. This causes CCM's json.Unmarshal
to receive raw gzip bytes, silently failing to parse usage data and leaving the
usage counter unchanged.

Fix: remove Accept-Encoding from the outgoing proxy request. Transport adds it
automatically and transparently decompresses response.Body before CCM reads it.

Wire compression (CCM→Anthropic) is preserved — Transport still negotiates gzip.
Only CCM→localhost path is affected; compression on loopback has no practical
benefit.
2026-03-09 20:06:34 +08:00
世界
847cbcdae8 service/ccm,ocm: Fixes and improvements 2026-02-26 13:36:46 +08:00
世界
984e328839 Fix missing RootPoolFromContext and TimeFuncFromContext in HTTP clients 2026-01-17 05:48:16 +08:00
世界
40ccecb341 Update pricing for CCM service 2026-01-17 05:47:42 +08:00
世界
6d4e1d333f Fix read credentials for ccm service 2026-01-17 05:46:24 +08:00
世界
e354670c36 Add claude code multiplexer service 2026-01-17 05:46:23 +08:00