Lexery - Cost Ledger

Tracks estimated and actual spend for wiki maintenance and automation — separate from product Brain inference costs (Portal user traffic, batch jobs, etc.). Pair with Lexery - Maintenance Runbook for when each tier runs.

Provider context: Lexery - Provider Topology. Design for automation: Lexery - Automation Architecture.

Budget envelope

  • Target: ~$2/month ongoing for second-brain maintenance (Tier 1–2 dominant, Tier 3 occasional).
  • Spike allowance: one-time build or large restructure months may exceed the envelope; mark rows clearly as non-recurring.

Note: Early “initial wiki” rows below may exceed the monthly target by design. Normalize future months toward the envelope via delta-first Tier 2.


Cost model (maintenance only)

TierUse caseTypical toolingEst. cost / run
Tier 1Git diff, file hashing, metadata, branch listsNone (local CLI)$0
Tier 2Commit digests, PR/issue rollups, short delta summariesCheap model via OpenRouter~$0.001–0.01
Tier 3Wiki restructuring, merging contradictory pages, net-new canonical docsClaude Opus-class or equivalent~$0.10–0.50 / substantial session

Token discipline

  • Pass diffs and summaries, not whole repos, into Tier 2–3.
  • Cache file hashes in _system/state/ to skip unchanged large files (see Lexery - Maintenance Runbook).

OpenRouter Model Costs (Product Pipeline)

Хоча ця сторінка фокусується на wiki maintenance, розуміння product pipeline costs важливе для загальної cost awareness. Всі model calls проходять через OpenRouter:

Per-Model Cost Profile

ModelPipeline RoleRelative CostТиповий Use Case
gpt-5.2Premium / legal reasoning$$$ORCH decisions, U8, U10 — кожен run з повним reasoning cycle коштує найбільше
gpt-4o-miniClassification$U2 classification, intent detection, metadata extraction — швидкі cheap calls
gpt-5-nanoRoutine¢Delta summaries, memory operations, formatting — мінімальна вартість per call

Daily Cost Drivers

Основні джерела витрат у product pipeline (від найбільших до найменших):

  1. U10 Write ($$$) — найдорожчий stage: довгий structured output з legal reasoning, citations, formatting. Кожен write call використовує gpt-5.2 з extended context window
  2. U8 Legal Reasoning ($$) — analysis pass перед writing, також на premium model
  3. ORCH decisions ($$) — mid-run orchestration calls; зменшені через deterministic canary
  4. U2 Classification ($) — cheap model, але виконується на кожному запиті
  5. Delta summaries (¢) — memory і context updates на gpt-5-nano, мінімальна вартість

ORCH Cost Cutting: Deterministic Canary

Deterministic canary — ключовий механізм зменшення витрат. Для straightforward cases (single act, clear article reference) ORCH приймає рішення без дорогого gpt-5.2 call. Ефект: ~50% зменшення mid-run ORCH costs для типових запитів. Детальніше: Lexery - Retry and Recovery.


Brain Maintenance Target

Для wiki і brain-admin automation:

  • Target: ~$2/month через OpenRouter
  • Включає: scheduled brain-admin scans (.github/workflows/lldbi-brain-admin.yml), import proposal generation, catalog health checks
  • Використовує переважно cheap models (gpt-4o-mini, gpt-5-nano) для routine tasks
  • Expensive model calls тільки для substantive wiki restructuring sessions

Running total

DateOperationTierTokens (est.)Est. cost (USD)Notes
2026-04-09Initial wiki build3~200k~2.00One-time scaffold
2026-04-09Second brain expansion3~300k~3.00Large page batch

Reconciliation: When invoice data exists (OpenRouter, Anthropic, Cursor), add a “verified” row or footnote — until then, treat numbers as order-of-magnitude estimates.


Monthly projection

With delta-first processing (weekly Tier 2 + one monthly Tier 3 audit):

  • Expected steady state: ~$0.50–1.50/month if Tier 2 stays short and Tier 3 is bounded.
  • Risk drivers: full-repo re-ingest, attaching large PDFs to prompts, repeated multi-hour Opus sessions without checkpointing.

Mitigations


Brain runtime spend (U2/U8/U10/ORCH, embeddings, rerankers) belongs in infra / finance dashboards — link from Lexery - Deployment and Infra when documented. This ledger is wiki ops only.

Governance

  • Who can add rows? Anyone maintaining the vault; sign with initials in Notes if multi-user later.
  • Rounding: estimates may be rounded to nearest $0.05 for readability; keep raw notes in monthly Lexery - Log if precision matters.
  • Cap enforcement: if two consecutive weeks exceed target, switch to Tier 1 only until the next planned Tier 3.

Open questions (cost side)

See Lexery - Unknowns Queue item monthly AI spend (aggregate) — until that is answered, this ledger cannot be reconciled against company-wide burn; it only tracks documented wiki maintenance sessions.