Commit graph

9 commits

Author SHA1 Message Date
世界
5e7fd7ad78
Fix lint errors 2026-05-13 23:39:27 +08:00
世界
49c450d942
ccm/ocm: Fix missing metering for 1M context and /fast mode
CCM: Fix 1M context detection - use prefix match for versioned
beta strings (e.g. "context-1m-2025-08-07") and include cache
tokens in the 200K threshold check per Anthropic billing docs.

OCM: Add GPT-5.4 family pricing (standard/priority/flex) with
extended context (>272K) premium pricing support. Add context
window tracking to usage combinations, mirroring CCM's pattern.
Update normalizeGPT5Model defaults to latest known models.
2026-03-11 20:41:29 +08:00
世界
a09ffe6a0f
ccm/ocm: Add by_user_and_week cost summary 2026-03-10 22:04:11 +08:00
Oleg Artyomov
1d388547ee
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
世界
0bc66e5a56
service/ccm,ocm: Fixes and improvements 2026-02-26 13:36:46 +08:00
世界
b2d90b7d86
Fix missing RootPoolFromContext and TimeFuncFromContext in HTTP clients 2026-01-17 05:48:16 +08:00
世界
a89680fa2d
Update pricing for CCM service 2026-01-17 05:47:42 +08:00
世界
1c4614318e
Fix read credentials for ccm service 2026-01-17 05:46:24 +08:00
世界
0f5cda4169
Add claude code multiplexer service 2026-01-17 05:46:23 +08:00