Skip to content

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

chore: apply rustfmt formatting across multiple modules

Steven Enamakel2949c4517e84
diff --git a/src/core/jsonrpc_tests.rs b/src/core/jsonrpc_tests.rs
index 55d11756fc..6f6263c39c 100644
--- a/src/core/jsonrpc_tests.rs
+++ b/src/core/jsonrpc_tests.rs
@@ -7,10 +7,9 @@ use std::time::Duration;
use tokio_util::sync::CancellationToken;
use super::{
- default_state, group_first_time_when_bus_ready, invoke_method,
- is_session_expired_error, is_unconfirmed_unauthorized_error,
- learning_first_time_when_bus_ready, params_to_object, parse_json_params, type_name,
- DomainSubscriberPlan,
+ default_state, group_first_time_when_bus_ready, invoke_method, is_session_expired_error,
+ is_unconfirmed_unauthorized_error, learning_first_time_when_bus_ready, params_to_object,
+ parse_json_params, type_name, DomainSubscriberPlan,
};
// These are the `http-server`-gated RPC-surface symbols (#5048); the tests that
// name them below carry the same `#[cfg]` so the disabled-build test compile
diff --git a/src/openhuman/agent/tinyagents/model.rs b/src/openhuman/agent/tinyagents/model.rs
index a402b4147d..6d5fa78bb1 100644
--- a/src/openhuman/agent/tinyagents/model.rs
+++ b/src/openhuman/agent/tinyagents/model.rs
@@ -501,10 +501,12 @@ impl ChatModel<()> for ProfileOverrideModel {
}
fn cache_identity(&self) -> Option<String> {
- self.inner.cache_identity().map(|identity| match &self.request_model {
- Some(model) => format!("{identity}:request-model={model}"),
- None => identity,
- })
+ self.inner
+ .cache_identity()
+ .map(|identity| match &self.request_model {
+ Some(model) => format!("{identity}:request-model={model}"),
+ None => identity,
+ })
}
async fn invoke(
diff --git a/src/openhuman/agent/tinyagents/model_route_recording_tests_tests.rs b/src/openhuman/agent/tinyagents/model_route_recording_tests_tests.rs
index cb17a331e4..312534a5d0 100644
--- a/src/openhuman/agent/tinyagents/model_route_recording_tests_tests.rs
+++ b/src/openhuman/agent/tinyagents/model_route_recording_tests_tests.rs
@@ -120,8 +120,8 @@ fn profile_override_cache_identity_includes_request_model() {
let inner: Arc<dyn ChatModel<()>> = Arc::new(IdentifiedModel);
let first = ProfileOverrideModel::new(inner.clone(), ModelProfile::default())
.with_request_model("model-a");
- let second = ProfileOverrideModel::new(inner, ModelProfile::default())
- .with_request_model("model-b");
+ let second =
+ ProfileOverrideModel::new(inner, ModelProfile::default()).with_request_model("model-b");
assert_ne!(first.cache_identity(), second.cache_identity());
}
diff --git a/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs b/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs
index a4777fd793..06ad036813 100644
--- a/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs
+++ b/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs
@@ -260,7 +260,10 @@ impl ChatModel<()> for ClaudeAgentSdkProvider {
Some(format!(
"claude_agent_sdk:{}:{}",
self.config.binary,
- self.profile.model.as_deref().unwrap_or(&self.config.default_model)
+ self.profile
+ .model
+ .as_deref()
+ .unwrap_or(&self.config.default_model)
))
}
diff --git a/src/openhuman/inference/provider/crate_openai.rs b/src/openhuman/inference/provider/crate_openai.rs
index 4de4798c37..a6c7323c99 100644
--- a/src/openhuman/inference/provider/crate_openai.rs
+++ b/src/openhuman/inference/provider/crate_openai.rs
@@ -103,7 +103,10 @@ pub(crate) struct CrateOpenAiConfig<'a> {
pub(crate) fn endpoint_is_openrouter(endpoint: &str) -> bool {
url::Url::parse(endpoint.trim())
.ok()
- .and_then(|url| url.host_str().map(|host| host.eq_ignore_ascii_case("openrouter.ai")))
+ .and_then(|url| {
+ url.host_str()
+ .map(|host| host.eq_ignore_ascii_case("openrouter.ai"))
+ })
.unwrap_or(false)
}