Skip to content

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

style(tinyagents): reflow imports and assertions to rustfmt

Steven Enamakeld0226a78857f
diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_assembly_tests.rs b/crates/openhuman-core/src/agent/tinyagents/harness_assembly_tests.rs
index 3a484cc895..52628bc7d0 100644
--- a/crates/openhuman-core/src/agent/tinyagents/harness_assembly_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/harness_assembly_tests.rs
@@ -2,8 +2,10 @@
//! shared tools end up registered on the assembled harness.
use super::*;
+use crate::agent::tinyagents::turn_policy::{
+ DEFAULT_MODEL_CALL_TIMEOUT_SECS, LOCAL_MODEL_CALL_TIMEOUT_SECS,
+};
use crate::agent::tinyagents::TurnModelSource;
-use crate::agent::tinyagents::turn_policy::{DEFAULT_MODEL_CALL_TIMEOUT_SECS, LOCAL_MODEL_CALL_TIMEOUT_SECS};
use async_trait::async_trait;
use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
use tinytools::{Tool, ToolResult};
@@ -233,13 +235,13 @@ async fn local_provider_survives_a_slow_first_byte_that_a_hosted_one_does_not()
let hosted = run_slow_first_byte_turn("openai", delay_secs).await;
let err = hosted.expect_err("hosted provider must hit the per-call ceiling");
- assert!(
- err.contains("timed out"),
- "unexpected error: {err}"
- );
+ assert!(err.contains("timed out"), "unexpected error: {err}");
let local = run_slow_first_byte_turn("ollama", delay_secs).await;
- assert_eq!(local.expect("local provider must wait out the prefill"), "done");
+ assert_eq!(
+ local.expect("local provider must wait out the prefill"),
+ "done"
+ );
}
/// The local ceiling is still a ceiling: a call that outlasts it times out.
@@ -248,8 +250,5 @@ async fn local_provider_is_still_bounded_by_the_local_ceiling() {
let err = run_slow_first_byte_turn("ollama", LOCAL_MODEL_CALL_TIMEOUT_SECS + 100)
.await
.expect_err("a call past the local ceiling must time out");
- assert!(
- err.contains("timed out"),
- "unexpected error: {err}"
- );
+ assert!(err.contains("timed out"), "unexpected error: {err}");
}
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
index c3ea3faf36..f9c6ea4d1b 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
@@ -498,8 +498,7 @@ impl TurnModelSource {
.unwrap_or_else(|| "injected".to_string());
let native_tools = profile.tool_calling;
let supports_vision = profile.modalities.image_in;
- let is_local =
- tinyinference_local::profile::is_local_provider_string(&provider_id);
+ let is_local = tinyinference_local::profile::is_local_provider_string(&provider_id);
let context_window = context_window.or(profile.max_input_tokens);
let primary: TurnChatModel = Arc::new(
ProfileOverrideModel::new(direct.clone(), profile)
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs b/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs
index 27bfed0cc2..3d0b264234 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs
@@ -114,8 +114,7 @@ fn parse_turn_ms_with_default(env_value: Option<&str>, default_secs: u64) -> Opt
/// ceiling is disabled. The backstop must sit above the harness ceiling or it
/// pre-empts it (#6042: it was 900s, under even the hosted 3600s ceiling).
pub(crate) fn local_web_turn_backstop_secs() -> Option<u64> {
- agent_turn_wall_clock_ms_for(true)
- .map(|ms| ms / 1_000 + LOCAL_WEB_TURN_BACKSTOP_GRACE_SECS)
+ agent_turn_wall_clock_ms_for(true).map(|ms| ms / 1_000 + LOCAL_WEB_TURN_BACKSTOP_GRACE_SECS)
}
/// Pure core of [`agent_turn_wall_clock_ms`]: map an optional