Gemini 3.8 Flash 智能體成本對照 Google 帳單:冷/暖快取方式每個已驗證步驟分別為主機保留狀態方式的 61.2 倍和 10.4 倍
LLM agent cost per verified step, checked against Google's own bill (Gemini 3.8 Flash): 61 times cold, 10.4 times warm
作者以 Google 帳單核對 Gemini 3.8 Flash 的智能體成本測算,主機保留狀態方式每個已驗證步驟約 $0.0014。保留完整對話的冷快取和暖快取方式,費用分別為主機保留狀態方式的 61.2 倍和 10.4 倍;主機每步重建的提示詞平均約 1,177 tokens。
Every cost figure I had published was a token count from my own logs times a price I typed in. A reader fairly asked what the provider's bill says. This is that check, on Gemini 3.8 Flash.
AXI is a layer on the host side, between a model and the state it edits. The host holds the exact state, the model proposes one change per step, a deterministic check admits or refuses it, and the prompt is rebuilt short from the held state at every step. The model is unchanged. It is for the company that runs the model, not for end users, and it fits any LLM application that holds state, short jobs and long, from the first step. The architecture is by Rajnish Choubey. The tests and measurements are mine, run with an AI assistant as a tool. I am not affiliated with Google. ("AXI" here is not the ARM AMBA chip-bus protocol.)
The job and the three ways of holding the state
One job of 400 steps that edits a state, one change per step. Three ways of holding the state:
- A: the host holds the state as data and rebuilds a short prompt each step (AXI).
- KC: the whole chat is kept and the cache is cold.
- KW: the whole chat is kept and the cache is warm (97.0 percent of its prompt tokens were read from the cache).
A verified step is a step after which the held state equals the true state.
What Google's report says about the rates
In Google's billing report (Cloud console, Billing, Reports, grouped by SKU) an output token costs 5.000 times an input token and a cached token costs 0.100 of an input token. Those are the prices I had typed: $0.75 a million input tokens, $3.75 a million output tokens, and a cached token at a tenth of the input price. The ratios do not depend on any exchange rate. The report is in rupees and prints no rate; the typed $0.75 is ₹71.42 on the report, so ₹95.23 to the dollar.
What it says about the totals
- 22 November, the cache pair test (A and KC ran that day): Google charged ₹2,805.00, about $29.45. My logs gave $29.09. Google's figure is 1.25 percent higher.
- 2 to 3 November, an earlier test: ₹168.92, about $1.77, against $1.75 from the logs (1.1 percent).
Google's day holds 490,025 more input tokens (1.27 percent) and 5,206 more output tokens (7.45 percent) than my logs for those two runs. The bill does not say whether those are calls my logs lack or a difference in counting.
What a verified step costs at those rates
| A (state held by the host) | KC (chat kept, cache cold) | KW (chat kept, cache warm) | |
|---|---|---|---|
| prompt tokens in the job | 470,669 | 37,967,655 | 39,923,458 |
| verified steps | 400 | 328 | 260 |
| dollars per verified step | $0.0014 | $0.0870 | $0.0148 |
| times A | 1 | 61.2 | 10.4 |
| dollars per step, every step counted, right or wrong | $0.0014 | $0.0731 | $0.0096 |
| times A, wrongness ignored | 1 | 51.4 | 6.8 |
The last two rows leave out whether a step was right: the same tokens divided by every step the cell ran, so the gap there is the tokens alone. At a million verified steps that is about $1,422 held by the host, $14,811 with the chat kept cold and $86,957 with it kept warm (each from the table's cost rounded less).
The kept chat's prompt grows every turn. The prompt rebuilt from the held state stays near 1,200 tokens, about 1,177 on average here, because it follows the size of the state and not the number of steps.
What the bill does not show
- A and KC ran on the same day, so the bill gives their total, not each arm.
- KW's figure is worked out from its tokens at Google's cached price. It is not a line of its own on the bill, because that run was one of several on other days.
- This is one model, one paid account, one month. The lines are Google's, copied by hand from the report table, with account and project identifiers left out.
Check it
The report lines, the arithmetic and a test that recomputes every figure above are in the repository: BILLING_CHECK.md. To read Google's side yourself, open Billing, Reports in the Cloud console, group by SKU, set the dates, and compare the table with the saved lines. The repository: github.com/gaurshalendra2412/axi-runtime.
來源:DEV Community · dev.to