Skip to content

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

style: apply rustfmt formatting and import ordering

Steven Enamakel49caf7f14c32
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rs b/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rs
index cadfb181ef..e24aeb4553 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rs
@@ -10,7 +10,9 @@ async fn a_timeout_is_not_reported_as_a_provider_error_left_in_the_slot() {
tinyagents_harness::TinyAgentsError::Cancelled,
] {
let slot: ModelErrorSlot = std::sync::Arc::new(std::sync::Mutex::new(Some(
- tinyinference_llm::Error::Model("OpenHuman returned HTTP 503: upstream unavailable".to_string()),
+ tinyinference_llm::Error::Model(
+ "OpenHuman returned HTTP 503: upstream unavailable".to_string(),
+ ),
)));
let mapped = map_turn_run_error(error, "m", 10, &slot, None).await;
assert!(
diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rs
index 2dfd9962ce..38f658d6ee 100644
--- a/crates/openhuman-core/src/core/observability.rs
+++ b/crates/openhuman-core/src/core/observability.rs
@@ -1401,13 +1401,15 @@ fn is_channel_supervisor_restart_message(lower: &str) -> bool {
/// status integer alone could collide with unrelated log lines containing
/// `"HTTP error: 5023"` (port number, runbook ID).
fn is_transient_upstream_http_message(lower: &str) -> bool {
- tinyinference_llm::failure::TRANSIENT_PROVIDER_HTTP_STATUSES.iter().any(|code| {
- lower.contains(&format!("api error ({code}"))
- || lower.contains(&format!("api error {code} "))
- || lower.contains(&format!("http error: {code} "))
- || lower.contains(&format!("http error: {code}\n"))
- || lower.contains(&format!("http error: {code}:"))
- })
+ tinyinference_llm::failure::TRANSIENT_PROVIDER_HTTP_STATUSES
+ .iter()
+ .any(|code| {
+ lower.contains(&format!("api error ({code}"))
+ || lower.contains(&format!("api error {code} "))
+ || lower.contains(&format!("http error: {code} "))
+ || lower.contains(&format!("http error: {code}\n"))
+ || lower.contains(&format!("http error: {code}:"))
+ })
}
/// Detect a non-2xx **HTML 403/Forbidden gateway page** returned to a provider
diff --git a/crates/openhuman-core/src/core/observability_crash_filter_integrations_tests.rs b/crates/openhuman-core/src/core/observability_crash_filter_integrations_tests.rs
index 532b8d03ee..1637fef50b 100644
--- a/crates/openhuman-core/src/core/observability_crash_filter_integrations_tests.rs
+++ b/crates/openhuman-core/src/core/observability_crash_filter_integrations_tests.rs
@@ -651,10 +651,7 @@ fn ollama_cloud_internal_500_before_send_matches_raw_and_reraised_shapes() {
&event_with_exception_value(raw)
));
- let reraise = tinyinference_llm::failure::ollama_cloud_internal_500_user_message(
- None,
- 500,
- );
+ let reraise = tinyinference_llm::failure::ollama_cloud_internal_500_user_message(None, 500);
assert!(is_ollama_cloud_internal_500_event(&event_with_message(
&reraise
)));
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs
index cb7a7c1662..0f9bcdb07c 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs
@@ -98,11 +98,7 @@ fn crate_model_response_preserves_flow_completion_contract() {
},
usage: Some(usage),
finish_reason: Some("tool_calls".to_string()),
- raw: tinyinference_llm::usage::merge_usage_meta(
- None,
- Some(0.125),
- 128_000,
- ),
+ raw: tinyinference_llm::usage::merge_usage_meta(None, Some(0.125), 128_000),
resolved_model: None,
continue_turn: None,
served_from_cache: false,
diff --git a/crates/openhuman-core/src/inference/provider/factory.rs b/crates/openhuman-core/src/inference/provider/factory.rs
index 982f4317ff..4e6ab1bf6e 100644
--- a/crates/openhuman-core/src/inference/provider/factory.rs
+++ b/crates/openhuman-core/src/inference/provider/factory.rs
@@ -90,13 +90,13 @@ use local_runtime::{
pub(crate) use managed_backend::make_openhuman_backend_model_for_thread;
use managed_backend::{resolve_managed_backend, resolve_managed_backend_with_model_override};
use primary_cloud::{legacy_inference_slug, resolve_primary_cloud_provider_string};
-use tinyinference_providers::route::split_model_and_temperature;
use subprocess_providers::{
prepare_claude_agent_sdk_chat_model, try_create_claude_agent_sdk_chat_model,
try_create_claude_agent_sdk_chat_model_from_string, try_create_claude_code_chat_model,
try_create_claude_code_chat_model_from_string,
};
use tiers::{is_abstract_tier_model, managed_default_model};
+use tinyinference_providers::route::split_model_and_temperature;
/// Test-only seam: inject a mock [`ChatModel`] so e2e tests can drive the
/// autonomous run paths (for example `spawn_workflow_run_background`)
diff --git a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs
index 158d52ff08..0414b4106a 100644
--- a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs
@@ -38,7 +38,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(
config: &Config,
) -> OptionalChatModelResult {
use tinyinference_local::local_runtime::{
- LocalRuntimeAuth, LocalRuntimeInputs, resolve_local_runtime,
+ resolve_local_runtime, LocalRuntimeAuth, LocalRuntimeInputs,
};
// Use the same classifier as privacy and session policy. Canonicalize only