agy-cli 0.1.22: thinking is not counted twice in billed output (#1023)
ACP's outputTokens already includes the thinking tokens, so `completion_tokens` is outputTokens again, not output + thinking. The totalTokens shape check compares against input + output (and input + cache + output), without thinking. Evidence (klarkxy, agy 1.5.4): for single-turn Flash and Carbon prompts, ACP's totalTokens equals input + output exactly (2322 + 4728 = 7050, 2316 + 9390 = 11706). Output minus thinking is 67 and 68 tokens, which matches the visible replies. The store's gen_metadata output (field 3) equals ACP's outputTokens, with thinking (field 9) below it. 0.1.19 sent 9389 and 18712, double-counting. Run at a0898318 merged onto origin/main (1199adda), on mica with a temp HOME: bun test packages/agy-cli gave 14 pass, 0 fail, and scripts/check.mjs exited 0. CI's test and on-npm jobs pass. Earlier, at d18f2346, putting `output + thinking` back by hand turned five tests red. Not tried: a live agy session here. Co-authored-by: klarkxy <klarkxy@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-agy-cli-auth",
|
||||
"version": "0.1.21",
|
||||
"version": "0.1.22",
|
||||
"description": "Magpie/OpenCode model provider that connects your local agy CLI through the Agent Client Protocol (agy acp), so Antigravity subscription models run through the real CLI",
|
||||
"type": "module",
|
||||
"main": "./opencode.mjs",
|
||||
|
||||
Reference in New Issue
Block a user