qwen-code/packages/cli
chinesepowered 3836e7e38c
fix(cli): report a genuine $0.00 cost instead of N/A (#7784)
calculateCost ended with 'total > 0 ? total : null', and callers read
null as "no cost to report" - the stats table prints N/A and hides the
Cost section entirely when no model yields a number.

Testing the total conflated a zero cost with an unknown one. A model the
user deliberately priced at 0 (a free OpenRouter variant, a local Ollama
or LM Studio model) was reported as N/A, and the Cost section vanished
when it was the only model in the session.

Decide on the pricing and the usage before the arithmetic, then return
the total unconditionally. The no-usage case still returns null, which
statsCommand.test.ts documents as deliberate.
2026-07-28 05:34:36 +00:00
..
src fix(cli): report a genuine $0.00 cost instead of N/A (#7784) 2026-07-28 05:34:36 +00:00
.gitignore feat(core): add opt-in built-in web_search backed by the DashScope Responses API (#7215) 2026-07-21 10:59:36 +00:00
index.ts fix(cli): add bootstrap fast paths (#6188) 2026-07-02 22:28:11 +00:00
package.json perf(cli): replace comment-json settings parser (#7747) 2026-07-26 14:42:51 +00:00
test-setup.ts feat(serve): persist dynamic workspace registrations (#6716) 2026-07-11 16:49:40 +00:00
tsconfig.json feat(webshell): replay ChatRecord history in readonly WebShell (#6999) 2026-07-19 00:09:44 +00:00
vitest.config.ts feat(core): persist and replay Goal v3 state (#7815) 2026-07-27 23:39:46 +00:00