Skip to main content

Crate llm_cost_dashboard

Crate llm_cost_dashboard 

Source
Expand description

§llm-cost-dashboard

Real-time terminal dashboard for LLM token spend.

This crate provides the library components consumed by the llm-dash binary. It can also be used as a library to embed cost tracking in other Rust applications.

§Modules

  • budget - hard budget enforcement and soft alert thresholds
  • cost - per-request cost records and the append-only ledger
  • cost::pricing - static pricing table and cost computation helpers
  • error - unified error type
  • log - newline-delimited JSON log ingestion
  • trace - lightweight distributed tracing
  • ui - ratatui TUI application state and event loop

Re-exports§

pub use budget::BudgetEnvelope;
pub use cost::CostLedger;
pub use cost::CostRecord;
pub use cost::ModelStats;
pub use error::DashboardError;
pub use log::LogEntry;
pub use log::RequestLog;
pub use trace::SpanStore;
pub use trace::TraceSpan;
pub use ui::App;

Modules§

budget
Budget Envelope
cost
Cost Ledger
error
Unified error type for the LLM cost dashboard.
log
Request Log
trace
Trace Spans
ui
UI Layer