Module pricing_catalog
Expand description
Global pricing catalog: a last-resort fallback consulted by the cost engine
when a model has no per-provider pricing entry in config.
Structs§
- Catalog
Model Price - One model’s chargeback rates, mirroring the on-disk
pricing.jsonshape written by the pricing feed. - Global
Pricing Catalog - The full catalog as loaded from
pricing.json, plus a precomputed lowercase index for O(1) exact lookups on the hot path.
Functions§
- global_
pricing_ catalog - Current process-global catalog snapshot.
- global_
pricing_ rates - Exact per-1M-token rates for
modelfrom the global catalog, orNone. - load_
global_ pricing_ catalog - set_
global_ pricing_ catalog - Replace the process-global catalog (used by startup load and config reload to hot-swap rates without a restart). The catalog file itself is refreshed out-of-band by the CLI + launchd, not by this daemon.