zuiho
f7cdc727df
fix: Claude 流式断流时不再整份覆盖 usage,保留 cache 计费字段
HandleStreamFinalResponse 在 !Done 时调用 ResponseText2Usage 整份覆盖
claudeInfo.Usage,导致 message_start 已获取的 CacheReadInputTokens、
CacheCreationInputTokens 等字段丢失,prompt 退化为占位值 1。
修复:
- 只补缺失的 CompletionTokens/PromptTokens,保留已有 cache 数据
- PromptTokens 兜底改用 info.GetEstimatePromptTokens()(与其他渠道对齐)
Fixes #4127
2026-04-07 17:41:08 +08:00
..
2024-12-02 15:59:08 +00:00
2026-04-02 00:15:04 +08:00
2026-03-02 18:54:56 +08:00
2026-03-31 16:54:39 +08:00
2025-11-25 16:45:14 +08:00
2026-04-07 17:41:08 +08:00
2026-03-01 15:47:03 +08:00
2026-03-11 23:39:18 +08:00
2026-03-01 15:47:03 +08:00
2026-03-06 19:10:42 +08:00
2026-02-07 14:21:19 +08:00
2026-03-31 16:54:39 +08:00
2026-04-06 15:54:55 +08:00
2025-10-11 15:30:09 +08:00
2025-10-11 15:30:09 +08:00
2024-05-17 19:37:18 +08:00
2026-03-11 23:39:18 +08:00
2026-03-01 15:47:03 +08:00
2025-10-11 15:30:09 +08:00
2026-03-11 23:39:18 +08:00
2026-04-06 15:54:55 +08:00
2026-03-31 16:54:39 +08:00
2026-03-05 06:12:48 +08:00
2025-12-02 21:34:39 +08:00
2026-03-01 15:47:03 +08:00
2026-03-01 15:47:03 +08:00
2026-03-01 15:47:03 +08:00
2025-10-11 15:30:09 +08:00
2026-04-06 15:54:55 +08:00
2026-03-01 15:47:03 +08:00
2026-03-02 18:54:56 +08:00
2026-03-01 15:47:03 +08:00
2026-03-31 19:16:16 +08:00
2025-06-25 18:04:34 +08:00
2026-03-01 15:47:03 +08:00
2026-03-01 15:47:03 +08:00
2026-03-11 23:39:18 +08:00
2026-02-22 16:00:27 +08:00
2026-02-25 17:24:18 +08:00
2026-03-05 17:49:36 +08:00