Skip to content

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

refactor(tinyagents): rename budget wrap_model calls to wrap

Steven Enamakel62fcded0186c
diff --git a/crates/openhuman-core/src/agent/tinyagents/hosted_error_tests.rs b/crates/openhuman-core/src/agent/tinyagents/hosted_error_tests.rs
index 2d61cd0c5e..8e037a1b23 100644
--- a/crates/openhuman-core/src/agent/tinyagents/hosted_error_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/hosted_error_tests.rs
@@ -35,9 +35,8 @@ fn a_run_budget_timeout_names_the_run_bound() {
#[test]
fn an_unbounded_timeout_keeps_the_owner_conversion() {
- let error = hosted(HostedErrorKind::Timeout, None);
- let owner = TinyAgentsError::from(error.clone());
- let projected = run_error_from_hosted(error);
+ let owner = TinyAgentsError::from(hosted(HostedErrorKind::Timeout, None));
+ let projected = run_error_from_hosted(hosted(HostedErrorKind::Timeout, None));
assert_eq!(projected.to_string(), owner.to_string());
assert_eq!(
diff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
index 73b8f07457..e384feca9b 100644
--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
@@ -145,7 +145,7 @@ impl HarnessPayloadSummarizer<OpenHumanRunContext> for SubagentPayloadSummarizer
let provider_model: Arc<dyn tinyinference_llm::model::ChatModel<()>> =
Arc::new(provider_model);
let provider_model = match &child_context.data.model_budget {
- Some(budget) => budget.wrap_model(provider_model),
+ Some(budget) => budget.wrap(provider_model),
None => provider_model,
};
// Unary, never streaming: a streaming child would publish the
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once.rs b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once.rs
index 0271ca1ab0..0bfb084da7 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once.rs
@@ -101,7 +101,7 @@ pub async fn complete_once(
let model: std::sync::Arc<dyn ChatModel<()>> = std::sync::Arc::new(model);
let model = match budget {
- Some(budget) => budget.wrap_model(model),
+ Some(budget) => budget.wrap(model),
None => model,
};
model