Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs: CLAUDE.md pricing invariant reflects takes-quality reading the canonical table

garrytan2453a6cd5397
diff --git a/CLAUDE.md b/CLAUDE.md
index b68c5d2efd..ab6a17f2de 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -104,11 +104,12 @@ Per-file detail is in `docs/architecture/KEY_FILES.md`.
reverse-writes on the composite key; `validateSourceId` before any `source_id` path join.
- **One canonical chat-pricing table.** All paid-cloud chat/completion prices live ONCE in
`src/core/model-pricing.ts` (`CANONICAL_PRICING` + `canonicalLookup`). Every other table
- (`anthropic-pricing.ts`'s `ANTHROPIC_PRICING`, `takes-quality-eval/pricing.ts`'s
- `MODEL_PRICING`, the contradictions/cross-modal/skillopt cost views) is a DERIVED view, never
- a hand-copied duplicate — so cross-table price drift is structurally impossible. Update a
- price in `model-pricing.ts` only; each consumer keeps its own key allowlist + miss policy
- (fail-closed vs warn-only vs null), not its own numbers. Pinned by `test/model-pricing.test.ts`
+ (`anthropic-pricing.ts`'s `ANTHROPIC_PRICING`, the contradictions/cross-modal/skillopt cost
+ views) is a DERIVED view, never a hand-copied duplicate — so cross-table price drift is
+ structurally impossible; takes-quality reads `pricing.overrides`, then `canonicalLookup`. Update a
+ price in `model-pricing.ts` only; each consumer keeps its own miss policy (an unpriced model
+ warns and runs, and refuses with a register-the-rate fix only under a user-set cap), not its
+ own numbers. Pinned by `test/model-pricing.test.ts`
(drift guard asserts each view equals canonical). Embeddings price separately in
`embedding-pricing.ts` (different unit).
- **Module-size ratchet.** `scripts/module-size-limits.tsv` pins per-file line ceilings
diff --git a/llms-full.txt b/llms-full.txt
index b2f1f77f00..0be8e3245e 100644
--- a/llms-full.txt
+++ b/llms-full.txt
@@ -1989,11 +1989,12 @@ Per-file detail is in `docs/architecture/KEY_FILES.md`.
reverse-writes on the composite key; `validateSourceId` before any `source_id` path join.
- **One canonical chat-pricing table.** All paid-cloud chat/completion prices live ONCE in
`src/core/model-pricing.ts` (`CANONICAL_PRICING` + `canonicalLookup`). Every other table
- (`anthropic-pricing.ts`'s `ANTHROPIC_PRICING`, `takes-quality-eval/pricing.ts`'s
- `MODEL_PRICING`, the contradictions/cross-modal/skillopt cost views) is a DERIVED view, never
- a hand-copied duplicate — so cross-table price drift is structurally impossible. Update a
- price in `model-pricing.ts` only; each consumer keeps its own key allowlist + miss policy
- (fail-closed vs warn-only vs null), not its own numbers. Pinned by `test/model-pricing.test.ts`
+ (`anthropic-pricing.ts`'s `ANTHROPIC_PRICING`, the contradictions/cross-modal/skillopt cost
+ views) is a DERIVED view, never a hand-copied duplicate — so cross-table price drift is
+ structurally impossible; takes-quality reads `pricing.overrides`, then `canonicalLookup`. Update a
+ price in `model-pricing.ts` only; each consumer keeps its own miss policy (an unpriced model
+ warns and runs, and refuses with a register-the-rate fix only under a user-set cap), not its
+ own numbers. Pinned by `test/model-pricing.test.ts`
(drift guard asserts each view equals canonical). Embeddings price separately in
`embedding-pricing.ts` (different unit).
- **Module-size ratchet.** `scripts/module-size-limits.tsv` pins per-file line ceilings