Files
CLIProxyAPI/internal/translator/codex
sususu 883660fb81 fix(translator): deduct cache_write_tokens from input_tokens in openai/codex to claude (#5956)
Deduct cache_write_tokens and cache_creation_tokens from gross prompt/input tokens
when translating OpenAI Chat Completions and Codex Responses API to Anthropic Claude
Messages format to prevent downstream double-counting.

Include defensive guards against int64 overflow, clamp negative input_tokens to 0,
and support <= 0 fallback to cache_creation_tokens alias.
2026-09-19 13:31:17 +08:00
..