Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(tokenjuice): load cache stats with config in savings stats

Steven Enamakel56aab9d1a417
diff --git a/crates/openhuman-core/src/inference/tokenjuice/schemas.rs b/crates/openhuman-core/src/inference/tokenjuice/schemas.rs
index 3d69437adc..3e4d175dc5 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/schemas.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/schemas.rs
@@ -415,8 +415,8 @@ fn handle_settings_update(ctx: DispatchCtx, params: Map<String, Value>) -> Contr
fn handle_savings_stats(ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
gate(&ctx)?;
- let cache = super::cache_stats().await?;
let config = ctx.load_config().await.map_err(|e| e.to_string())?;
+ let cache = super::cache_stats_with_config(&config).await?;
super::install_from_config(&config).await?;
let agg = super::savings::stats(&super::client(&config)).await?;
Ok(serde_json::json!({