Skip to content

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

test(agent): add coverage for attachment provider routing

Steven Enamakeleb4545da9885
diff --git a/crates/openhuman-core/src/agent/attachments/provider_routing_tests.rs b/crates/openhuman-core/src/agent/attachments/provider_routing_tests.rs
index 8f785a2039..3cbc38d4fa 100644
--- a/crates/openhuman-core/src/agent/attachments/provider_routing_tests.rs
+++ b/crates/openhuman-core/src/agent/attachments/provider_routing_tests.rs
@@ -74,6 +74,7 @@ fn controlled_wrapper(
config,
profile,
fallback_cache: Mutex::new(Default::default()),
+ core: None,
}
}
fn user_request(blocks: Vec<ContentBlock>) -> ModelRequest {
diff --git a/crates/openhuman-core/src/agent/attachments/provider_tests.rs b/crates/openhuman-core/src/agent/attachments/provider_tests.rs
index c9f5d49553..45230378fe 100644
--- a/crates/openhuman-core/src/agent/attachments/provider_tests.rs
+++ b/crates/openhuman-core/src/agent/attachments/provider_tests.rs
@@ -220,6 +220,7 @@ async fn derivative_cache_survives_model_recreation_and_invalidates_changed_cont
config: config.clone(),
profile: ModelProfile::default(),
fallback_cache: Mutex::new(Default::default()),
+ core: None,
};
let first = make();
let scope = super::super::AttachmentAccessScope::default();
@@ -268,6 +269,7 @@ async fn cache_is_not_written_beside_unmanaged_local_files() {
config: Arc::new(config),
profile: ModelProfile::default(),
fallback_cache: Mutex::new(Default::default()),
+ core: None,
};
model
.save_fallback(
@@ -665,6 +667,7 @@ async fn pdf_attachment_degrades_to_a_note_when_documents_component_is_off() {
config: Arc::new(config),
profile: ModelProfile::default(),
fallback_cache: Mutex::new(Default::default()),
+ core: None,
};
let (text, cacheable) = model
.fallback(
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs
index 207a29ee55..bcf8513b14 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs
@@ -73,7 +73,7 @@ use tinyagents_harness::Result as TaResult;
use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream};
use crate::config::Config;
-use crate::inference::provider::{create_chat_model_with_model_id, role_for_model_tier};
+use crate::inference::provider::{create_chat_model_with_model_id_in, role_for_model_tier};
/// The workload roles `provider_for_role` understands **and** that name a
/// chat-shaped model.
@@ -278,6 +278,7 @@ impl OpenHumanModelResolver {
config,
temperature,
cache: Mutex::new(HashMap::new()),
+ dispatch: None,
}
}