Expand description
Cached LiteLLM pricing on the redb pricing_cache table.
One row holds the most-recent fetch: the raw json plus its
fetched_at. The usage scan prices from this cache (empty until the
first background fetch lands); the fetch refreshes it about once a
day.
Re-exportsยง
use std::time::SystemTime;๐use anyhow::Context;๐use redb::TableDefinition;๐use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use super::Db;๐
Structsยง
- Cached
Pricing - A fetched LiteLLM pricing file plus the instant it landed.
Constantsยง
- KEY ๐
- The single row key; there is only ever one cached pricing snapshot.
- PRICING_
CACHE ๐