Skip to content
Trazum

2.5.0

Each request at its own size

A minor, because two published formats grew a field: a usage row may say how many requests it sums (requests), and a receipt names a new gap, tier-ceiling. No new command. Four providers' models are billed by prompt length, one request at a time: Claude Haiku 5.5, Gemini 3.1 Pro Preview, OpenAI's GPT-5.6 and later and every current Grok, each call in its own band, and a usage report's summed row at the dearer rate with the cheaper figure printed beside it. OpenAI, Moonshot and xAI's current models are priced, and a model says how long its cache entry lives, so an OpenAI entry is judged against its 30 minutes. A Responses API log is billed at its real cache rates: every cached token had been billed as plain input. grok-4 bills at Grok 4.3's prices since xAI retired it, and neither it nor kimi-k2 is recommended any more.

Added#

  • Moonshot and xAI's current models are priced: Kimi K3, Kimi K2.7 Code (and its high-speed variant), Kimi K2.6, Grok 4.7, 4.6, 4.5, 4.3, the Grok 4.20 family (reasoning, non-reasoning, multi-agent) and Grok Build 0.1. Off each provider's pages read in their Markdown form on 2026-10-11; the September review read the HTML, which renders its tables in the browser, saw no context windows and added nothing. Kimi K3 is $3/$15 with a 1,048,576 window, reads its cache at $0.30 and bills writes as their own line by TTL, $3 for five minutes and $6 for an hour; K2.7 Code and K2.6 are $0.95/$4 with a 262,144 window, hits at $0.19 and $0.16, and a batch API at 60% of the price. Every Grok bills a request whose prompt reaches 200,000 tokens at double input, cache and output: $2/$6 to $4/$12 on 4.7, 4.6 and 4.5, $1.25/$2.50 to $2.50/$5 on 4.3 and 4.20, $1/$2 to $2/$4 on Build 0.1, with cached input at each model's own figure and a 20% batch discount on 4.3 and 4.20. grok-code-fast-1 is left unpriced: xAI routes it to Build 0.1 and also says retired ids bill at Grok 4.3's prices, and a guess between the two is not a price. packages/core/test/moonshot-xai.test.js (22 tests) holds every figure and the line at exactly 200,000.

  • OpenAI's current generation is priced: GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol, GPT-6 Luna, GPT-5.6 Sol, GPT-5.6 Terra and GPT-5.6 Luna. Off the pricing page, each model's own page and the prompt-caching guide (2026-10-10 and 2026-10-11): input, cached input, cache write and output, a long-context band over 272,000 input tokens (2x input and cache, 1.5x output, for the whole request, priced per request like Haiku 5.5), batch at half, 1,050,000 context, a 1,024-token cache minimum. Cache writes cost 1.25x input on all seven and reads 10%, 5% on GPT-6.1 Sol.

  • The README starts with the bill, drawn from the CLI. The start section leads with npx @trazum/cli bill, no path, and under it the statement that command prints: a total, a table by project and one by model, each share drawn as a bar. It is docs/assets/bill.svg, drawn by scripts/draw-bill.mjs from what the built CLI prints on two illustrative Claude Code projects in examples/claude-projects (usage only, no prompt or answer text). packages/cli/test/bill-image.test.js fails when the picture and the output disagree, or when the README's description of it quotes other figures, so a price change or a reworded line means a redraw, never a hand edit. A stray sentence about pasting into a browser, left in the start section by an earlier edit, is gone; it belongs to the Playground paragraph further down, where it still is.

  • Claude Haiku 5.5 and Gemini 3.1 Pro Preview are priced, per request. Both charge by prompt length: Haiku 5.5 $0.10/$0.50 up to 100,000 tokens and $0.50/$2.50 over it, Gemini 3.1 Pro $2/$12 up to 200,000 and $4/$18 over, where the prompt is every input token the request carried, cache reads and writes included. Both read off their providers' pages on 2026-10-10 and 2026-10-11 (pricing, model and caching pages), with the cache and batch ratios that hold in both bands, 1M context each, and cache minimums of 512 and 4,096. Haiku 5.5 was the unpriced model in a Claude Code bill; the README picture now prices it, $0.0456 across 14 calls.

  • A usage row says how many requests it sums: requests. Absent on a call, which is every line a per-call log holds; a number above one, or null for "a sum, count not given", on a row out of a usage report. The Anthropic, OpenAI and OpenRouter converters write it (null, num_model_requests, the day's requests), and docs/usage-logs.md names it. A value that is not a positive integer or null is somebody else's field and is read as absent.

Changed#

  • A size tier can be inclusive: input-tokens-at-least. xAI's words are "requests whose prompt reaches 200k tokens", so a prompt of exactly 200,000 pays the higher rate. The condition is its own kind rather than "over 199,999" written by hand, so a report prints xAI's sentence ("prompts of 200,000 input tokens or more"), and a usage report's row of exactly 200,000 is undecided, billed at the ceiling with the floor beside it, rather than called cheap.

  • Moonshot and xAI rows carry no cache minimum, and say so. Neither provider publishes the shortest prefix it caches, and the 1,024 that kimi-k2 and grok-4 carried came from no page. A null minimum on a model that caches was refused by the catalogue tests; it is now allowed only on a row whose note says "no minimum prefix length is published", so a forgotten minimum still cannot pass as a deliberate one. The bill prices these caches as before; the advice that needs a minimum to promise a saving, or to call a prefix too short, stays quiet on them.

  • kimi-k2 and grok-4 are no longer recommended. Moonshot discontinued kimi-k2 on 2026-05-25 and xAI retired grok-4 on 2026-05-15, both by their own notices. Both stay priced, because calls in somebody's log really happened at them, and neither is offered as somewhere to move.

  • A model says how long its cache entries live: cacheTtl. The TTL verdict judged every write against Anthropic's five minutes and offered the 1-hour entry as the cure. An OpenAI GPT-5.6 entry lives at least 30 minutes with no longer one to buy, so a ten-minute pause would have been reported as a cache that expires before it is read. Each verdict now reads the model's own entry, carries it (entryTtlMs, longerTtlMs), and on a model with one kind of entry says so instead of suggesting the hour, in the CLI, the documents, the MCP report and the web app. A write reported as cache_write_tokens names no TTL, so it is an assumption only on a model that sells two entries at two prices (Kimi K3); on one that sells one, or two at one price, nothing is assumed and nothing is said.

  • A model priced by prompt length is billed one request at a time. A call is billed in its own band. A row that sums requests gives only a bound, its own total: at or under the line it is under it throughout and billed at the lower rate; over it, it is billed at the dearer rate and the report prints what the same tokens cost at the cheaper one. effectivePricing takes the bound as inputTokensAtMost beside inputTokens, and an undecided tier now carries its floor. The range is printed by bill, profile, connect, the receipt summary, the HTML, PDF and Markdown documents, the MCP report and the web app, in English and Spanish, and a receipt carries it as a tier-ceiling gap with the rows, the models, the ceiling and the floor. Every place that prices a prompt it holds passes its length: optimize prices the prompt before and after on their own bands, so an edit that brings a prompt under the line is credited with the rate it saves; spend_guard, the gateway and the cost answer price the call at its own prompt; a what-if onto one of these models bounds each slice by its largest call and reports the cheaper figure as tierCeiling when a slice holds a call over the line.

  • The span line says what it means. Under a bill or a profile, "the monthly arithmetic is yours to do, and now it is valid" read as a riddle; it is now "stated, never extrapolated. Scale it to a month yourself, now that you know what it covers", in English and Spanish.

Fixed#

  • A grok-4 call after 2026-05-15 was billed at $3/$15; xAI has billed it at Grok 4.3's $1.25/$2.50 since. "Requests to the retired model slugs ... will be billed at grok-4.3 pricing ... rather than the rates of the original model", from 12:00 PT that day. Input was overstated 2.4 times, output 6 times and cache reads nearly 4 times. The row now bills at Grok 4.3's rates, its long-context line included, and keeps $3/$15 as a period ending at 19:00 UTC on 2026-05-15, so a log spanning the retirement is billed both ways; grok-4-0709, the dated id the notice names, is an alias.

  • The packaged Action pin in README.md and docs/running.md advanced to 2.4.3's release commit, the one v2.4.3 points at, in the pull request after the release as docs/releasing.md says it must.

  • connect billed every bucket at the date the report ran. 2.4.3 taught profile to bill each call at its own moment and this path kept the old rule, so a pull across a published price change came out entirely at whichever price applied the day it ran. Each bucket is now billed at its own start, with that moment's cache ratios.

  • The findings under a bill priced its calls at the report's date. Conversation cost, truncation retries, repeated calls, the cache TTL verdict, the session ledger and the input and output shapes each priced a call at the date the report ran, while the total above them billed it at its own moment: a DeepSeek conversation held at peak was costed off-peak in the row beneath a total that had it at peak. They now ask the total's two questions, when a call was billed and on what prompt, through one module (billing.ts).

  • A budget priced every model with one set of cache ratios. A store record's cache reads were priced at 10% of input and its writes at 1.25x and 2x, Anthropic's ratios of 2025, whatever the model: an Opus 5.5 read (5%), a Fable 5.1 read (2.5%) and every provider whose writes cost what input costs were priced at the wrong multiple, so a month's budget disagreed with the connect report the same records came from. Each model's own ratios now, at the record's own date.

  • A block of Spanish messages had no accents. The help for the from-* converters and bill, the converters' own messages and reconcile's were written as "aqui", "pagina", "sesion", "Anade", "esta dentro de ese resto y no fuera de el", "Trazum cobro mas": 204 words across 79 lines of es.ts, now "aquí", "página", "sesión", "Añade", "está ... de él", "cobró más". Words that read two ways ("esta", "tu", "el", "que", "como", "en cuanto") were settled one sentence at a time rather than by rule.

  • A Responses API log billed every cached token at the full input rate. OpenAI's Responses API, its default, reports input_tokens with the cached tokens inside it and the split in input_tokens_details; only the Chat Completions spelling, prompt_tokens_details, was read. A call that read 90,000 of its 100,000 tokens from the cache came out at $0.135 on GPT-5 instead of $0.034, and the cache verdict said caching was never used. Both spellings are read now, and cache_write_tokens with them.

  • OpenAI cache writes were billed as plain input. The usage report's input_cache_write_tokens sat inside the input total and was priced at the input rate, through from-openai and connect alike; it is now taken out and priced as a write. The 12-hour write, input_cache_write_12h_tokens, has no published price Trazum can read, so it stays in the total at the input rate and from-openai names it as a floor.

  • The VS Code extension's tests could read a half-written build. One packaging test rebuilt dist/ in place while the shim's tests, running in parallel, imported it; CI caught fourteen of them failing with "activate is not a function". It builds into a directory of its own now.

  • --exact-tokens told somebody to install a package they had. On a model @trazum/tokenizer-openai holds no rank table for, GPT-6 among them, the refusal said the package "is not installed". It now says the package is installed, names the tables it does hold, and declines to count with the nearest one, which would put the word exact on a guess.