The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(inference): track model usage for openhuman backend
Steven Enamakeld934c838c854
diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage.rsindex 703cf058b1..a974f01891 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage.rs@@ -44,10 +44,9 @@ pub(super) fn project_managed_usage(mut response: ModelResponse) -> ModelRespons.and_then(|oh| serde_json::from_value(oh.clone()).ok()).unwrap_or_default();- let charged_amount_usd = envelope- .billing- .map(|b| b.charged_amount_usd)- .unwrap_or(0.0);+ // A `billing` block is the backend's statement of what it debited, so it+ // is a known charge even at zero; no block means no charge was reported.+ let charged_amount_usd = envelope.billing.map(|b| b.charged_amount_usd);let context_window = envelope.usage.as_ref()