fix(ai): preserve cache_write_tokens in completions stream usage closes #2802
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed OpenAI-compatible completions streaming usage to preserve `prompt_tokens_details.cache_write_tokens` and normalize OpenRouter `cached_tokens` to previous-request cache hits only, preventing cache read/write double counting in `usage` and cost calculation ([#2802](https://github.com/badlogic/pi-mono/issues/2802))
|
||||
|
||||
## [0.65.0] - 2026-04-03
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user