Skip to content

Cost-ledger cutoff: pre-#2751 Gemini rows are underpriced

Issue #2751 found three call sites (conversion predictor, HTML remediator, segmented converter) that were fetching Google’s generativelanguage.googleapis.com endpoint directly instead of going through the Bedrock-default Gemini factory. PR #2772 rerouted them through getGeminiClient(geminiConfigFromEnv(env)), which serves those requests on Bedrock Claude (zero data retention).

What this means for cost_ledger

  • Rows created BEFORE the #2751 fix merged with backend = 'prediction' (and other Gemini-named rows β€” e.g. model values like gemini-* β€” written by the affected call sites) reflect direct Google calls priced at Google Gemini rates.
  • Rows created AFTER the fix record the served model (Bedrock Claude) and are priced at the correct Bedrock/Claude rates.
  • No backfill will be done. Pre-cutoff rows stay as written; the ledger is append-only and re-pricing historical rows would misstate what was actually billed at the time.

Analysis guidance

Any analysis aggregating estimated_cost_usd across the cutoff should treat pre-cutoff prediction/Gemini-named rows as underpriced by roughly 2–6x: they were priced at Gemini token rates while the same workloads now (correctly) record Claude-on-Bedrock rates. Cost-trend charts that span the cutoff will show a step increase that is a pricing correction, not a usage increase.

Use the merge time of PR #2772 as the cutoff timestamp when filtering (created_at).