Skip to content

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

fix(team): handle missing team member in ops

Steven Enamakelcc7ed2388151
diff --git a/crates/openhuman-tinyhumans/src/hosted/team/mod.rs b/crates/openhuman-tinyhumans/src/hosted/team/mod.rs
index 6e52728f69..3da32b83ca 100644
--- a/crates/openhuman-tinyhumans/src/hosted/team/mod.rs
+++ b/crates/openhuman-tinyhumans/src/hosted/team/mod.rs
@@ -3,6 +3,5 @@
mod ops;
mod schemas;
-pub use openhuman_core::integrations::client::budget_gate::get_usage;
pub use ops::*;
pub use schemas::{all_team_controller_schemas, all_team_registered_controllers, team_schemas};
diff --git a/crates/openhuman-tinyhumans/src/hosted/team/ops.rs b/crates/openhuman-tinyhumans/src/hosted/team/ops.rs
index 2722751fb8..78098a0578 100644
--- a/crates/openhuman-tinyhumans/src/hosted/team/ops.rs
+++ b/crates/openhuman-tinyhumans/src/hosted/team/ops.rs
@@ -11,8 +11,6 @@
//! Input validation always runs before the credential is resolved, so a bad
//! argument reports the argument, never "not signed in".
-use std::time::{Duration, Instant};
-
use reqwest::Method;
use serde_json::{json, Value};
use tinyhumans_sdk::api::types::{CodeRequest, CreateTeamInviteRequest};
@@ -50,17 +48,12 @@ fn clamp_u32(value: Option<u64>, field: &str) -> Result<Option<u32>, String> {
pub async fn get_usage(config: &Config) -> Result<RpcOutcome<Value>, String> {
let client = HostedClient::from_config(config)?;
let backend_key = effective_backend_api_url(&config.api_url);
- budget_gate::usage_with_failure_backoff(
- &backend_key,
- Duration::ZERO,
- Instant::now(),
- || async {
+ budget_gate::usage_with_failure_backoff(&backend_key, || async {
client.finish_value(
"GET /teams/me/usage",
client.sdk().teams().get_my_usage().await,
)
- },
- )
+ })
.await
}