Skip to content

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

test(inference): update model usage assertions in tests

Steven Enamakel10f89c572f35
diff --git a/crates/openhuman-core/src/inference/provider/factory_explicit_ctx_tests.rs b/crates/openhuman-core/src/inference/provider/factory_explicit_ctx_tests.rs
index 2e119c4c8a..21b3776433 100644
--- a/crates/openhuman-core/src/inference/provider/factory_explicit_ctx_tests.rs
+++ b/crates/openhuman-core/src/inference/provider/factory_explicit_ctx_tests.rs
@@ -67,17 +67,16 @@ async fn managed_factory_and_probe_use_the_explicit_provider_entry() {
let (_, model) = create_chat_model_with_model_id_in(&dispatch, "chat", &config, 0.0)
.expect("explicit model entry builds");
assert_eq!(model, "context-a-one-shot");
- let simple_chat =
- crate::inference::host_runtime::ops::agent_chat_simple::agent_chat_simple(
- &dispatch,
- &config,
- "fixture prompt",
- None,
- None,
- None,
- )
- .await
- .expect("simple chat uses its explicit model entry");
+ let simple_chat = crate::inference::host_runtime::ops::agent_chat_simple(
+ &dispatch,
+ &config,
+ "fixture prompt",
+ None,
+ None,
+ None,
+ )
+ .await
+ .expect("simple chat uses its explicit model entry");
assert_eq!(simple_chat.value, "context-a-one-shot");
for (chat, _, _) in [
create_turn_chat_model_with_native_tools_and_route(
diff --git a/crates/openhuman-core/src/inference/turn_models_tests.rs b/crates/openhuman-core/src/inference/turn_models_tests.rs
index d1d782d019..0d1c3c499e 100644
--- a/crates/openhuman-core/src/inference/turn_models_tests.rs
+++ b/crates/openhuman-core/src/inference/turn_models_tests.rs
@@ -83,6 +83,10 @@ async fn explicit_turn_context_uses_its_model_and_capabilities_over_ambient_cont
assert_eq!(name_of(&models.primary).await, "context-a-model");
assert_eq!(name_of(&models.summarizer).await, "context-a-model");
+ let standalone = source
+ .build_summarizer("hint:summarization", 0.0, None)
+ .expect("standalone summarizer uses explicit context A");
+ assert_eq!(name_of(&standalone).await, "context-a-model");
assert!(models
.primary
.profile()