File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " claude-dev " : minor
3+ ---
4+
5+ fetch cache details from generation endpoint
Original file line number Diff line number Diff line change @@ -107,9 +107,8 @@ export class ClineHandler implements ApiHandler {
107107 const generation = response . data
108108 return {
109109 type : "usage" ,
110- // at this time there's no support for gatting cached_tokens from generation endpoint
111110 cacheWriteTokens : 0 ,
112- cacheReadTokens : 0 ,
111+ cacheReadTokens : generation ?. native_tokens_cached || 0 ,
113112 inputTokens : generation ?. native_tokens_prompt || 0 ,
114113 outputTokens : generation ?. native_tokens_completion || 0 ,
115114 totalCost : generation ?. total_cost || 0 ,
Original file line number Diff line number Diff line change @@ -105,9 +105,8 @@ export class OpenRouterHandler implements ApiHandler {
105105 // console.log("OpenRouter generation details:", generation)
106106 return {
107107 type : "usage" ,
108- // at this time there's no support for gatting cached_tokens from generation endpoint
109108 cacheWriteTokens : 0 ,
110- cacheReadTokens : 0 ,
109+ cacheReadTokens : generation ?. native_tokens_cached || 0 ,
111110 // openrouter generation endpoint fails often
112111 inputTokens : generation ?. native_tokens_prompt || 0 ,
113112 outputTokens : generation ?. native_tokens_completion || 0 ,
You can’t perform that action at this time.
0 commit comments