Files
CLIProxyAPI/internal/runtime/executor/devin_executor.go
Gabriel Voicu eb6e25abe6 fix(devin): count cache-write tokens in total input
Devin reports the prompt in three disjoint parts: uncached (field 2), cache
write (field 4) and cache read (field 5). The executor summed only uncached +
cache read, so a cache miss on the GPT route (almost all cache write)
reported ~3 input tokens for a full prompt, and the Claude route lost the
written part on every first request. CPA's own token accounting expects the
total to include writes and marked those responses inconsistent; the
Claude-format translator already subtracts read + write from the total.

Live: GPT-6.1 Sol miss was 3 uncached + 6103 written, reported as 3 input;
the next request read 6103 of 6106. Updates the #5910 regression test.
2026-11-09 11:32:35 +02:00

94 KiB