Cloud Costs¶
Each week's cost per cloud and LLM provider is in the
Rose cloud and LLM costs (weekly)
Google Sheet, tab weekly, which Finance reads. The Night Shift job tech-costs
(role cost-analyst, Finance) appends last week's rows every Tuesday
(job,
procedure).
Rose Brain builds the weekly cost report from the rows the job hands over (package
tech_cost_rows). This page explains how the figures are made.
- A week runs Monday to Sunday, UTC;
week_startis its Monday. - Each row keeps the currency of its source; nothing is converted.
sourceisbillfor a provider's own bill (environmentall). Bills cannot split production from development: most LLM keys are shared across environments (IX-6398).sourceislangfuse recordedorlangfuse estimatefor the LLM cost per provider and environment, frombackend/scripts/estimate_llm_cost.py. Langfuse traces every production call. Since IX-6399 reached production, each call carries the usage its provider reported, so the row is Langfuse's recorded cost; for earlier calls, tokens are estimated from what each call logged, with the cache share and thinking tokens measured below.- The Gemini row (Langfuse's judge) is already inside the Google Cloud bill (
Gemini API): never add the two. - A provider with no
billrow could not be read: its bill needs a credential the job lacks (OpenAI admin key,azlogin, OpenRouter management key), bills monthly (Mistral), or it has no billing API (Cerebras). - The job writes as the
cloud-cost-reportservice account (infrastructure/cloud-cost-report.tf), which the Night Shift computer impersonates through its Application Default Credentials (gcloud auth application-default login, with an account listed in that file); the Sheet is shared with it as an editor. - Batch jobs and evals keep only a sample of their Langfuse traces (
production-jobs10%,*-evals5%): the estimate divides their counts and costs by it, and the row's notes say so. - Mistral bills by the month only, so it has no weekly
billrow: only its Langfuse estimate.
How each model is billed¶
Checked 2026-11-23. Prices are USD per million tokens, from the Langfuse model definitions that price each generation. Thinking (reasoning) tokens are hidden, but the provider bills them as output. Cached input is a prompt prefix the provider already holds.
| Model (route) | Input | Cached input | Output | Thinking | Calls before IX-6399 reached production |
|---|---|---|---|---|---|
| gpt-5.4 (OpenAI answers, Azure fallback) | $2.50 | $0.25, 10% of input | $15 | billed as output; answers send no reasoning_effort and measured 0 |
estimated with its cache share measured on recorded calls (13% on 7 test answers on 2026-11-24) |
| gpt-5.4-mini (OpenAI side steps and fallbacks) | $0.75 | $0.075, 10% of input | $4.50 | billed as output; routes set reasoning_effort="none", so 0 |
estimated with its measured cache share; a step with no recorded call counts input at the full price |
| gpt-oss-120b (Cerebras side steps) | $0.35 | $0.35: Cerebras caches for speed and publishes no discount | $0.75 | billed as output, always on: 46 to 181 tokens per call depending on the step, measured on recorded calls | estimated with each step's measured thinking tokens; cache needs no correction |
| gemini-3.8-flash (Langfuse's own judge) | $0.75 | $0.075 | $3.75 | billed as output | already recorded with its real usage |
| ministral-3b-latest (Mistral query rewrites) | $0.10 | $0.01 (Langfuse definition, unverified) | $0.10 | none | missing: these calls were not traced |
text-embedding-3-small (every embedding: chat lookups, LightRAG, GEO clustering, MCP alternatives; OpenAI EU or Azure deployment text-embedding-3-small-2) |
$0.02 | none | none | none | missing: embeddings were not traced |
| text-embedding-3-large (config default, overridden to small in every environment) | $0.13 | none | none | none | not used |
IX-6399 records each call's usage, as the provider reports it in its answer, on its
Langfuse generation: cached input as input_cache_read, thinking as
output_reasoning. Langfuse prices each part with the rates above, and the estimate
uses that recorded cost. For older calls, the estimate takes each step's cache share
and thinking tokens from the calls that recorded them in the last 14 days, production
first, and prints them in its calibration table. It covers chat calls, embeddings,
Mistral, jobs and evals: checked on test and eval runs on 2026-11-24, where a gpt-5.4
answer read 8,960 of 12,655 input tokens from cache and a gpt-oss-120b call billed 145
thinking tokens.
For a deeper look at one bill, see Google Cloud billing export and MongoDB Atlas cost.