mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-26 23:46:45 +00:00
fix(#705): add estimated_cost_usd_num (float) to usage JSON alongside string field; doc entry filed
This commit is contained in:
@@ -4110,7 +4110,7 @@ fn run_resume_command(
|
||||
"cache_creation_input_tokens": usage.cache_creation_input_tokens,
|
||||
"cache_read_input_tokens": usage.cache_read_input_tokens,
|
||||
"total_tokens": usage.total_tokens(),
|
||||
"estimated_cost_usd": format_usd(usage.estimate_cost_usd().total_cost_usd()),
|
||||
"estimated_cost_usd": format_usd(usage.estimate_cost_usd().total_cost_usd()), "estimated_cost_usd_num": usage.estimate_cost_usd().total_cost_usd(),
|
||||
"pricing": "estimated-default",
|
||||
})),
|
||||
})
|
||||
@@ -4278,7 +4278,7 @@ fn run_resume_command(
|
||||
"cache_creation_input_tokens": usage.cache_creation_input_tokens,
|
||||
"cache_read_input_tokens": usage.cache_read_input_tokens,
|
||||
"total_tokens": usage.total_tokens(),
|
||||
"estimated_cost_usd": format_usd(usage.estimate_cost_usd().total_cost_usd()),
|
||||
"estimated_cost_usd": format_usd(usage.estimate_cost_usd().total_cost_usd()), "estimated_cost_usd_num": usage.estimate_cost_usd().total_cost_usd(),
|
||||
"pricing": "estimated-default",
|
||||
})),
|
||||
})
|
||||
@@ -6766,7 +6766,7 @@ fn status_json_value(
|
||||
"cumulative_cache_creation_input": usage.cumulative.cache_creation_input_tokens,
|
||||
"cumulative_cache_read_input": usage.cumulative.cache_read_input_tokens,
|
||||
"cumulative_total": usage.cumulative.total_tokens(),
|
||||
"estimated_cost_usd": format_usd(usage.cumulative.estimate_cost_usd().total_cost_usd()),
|
||||
"estimated_cost_usd": format_usd(usage.cumulative.estimate_cost_usd().total_cost_usd()), "estimated_cost_usd_num": usage.cumulative.estimate_cost_usd().total_cost_usd(),
|
||||
"pricing": "estimated-default",
|
||||
"estimated_tokens": usage.estimated_tokens,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user