The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(cost, agent_builder): update model names in tests
Steven Enamakel64b6cc78b1cc
diff --git a/crates/openhuman-core/src/platform/cost/route_tests.rs b/crates/openhuman-core/src/platform/cost/route_tests.rsindex a3d281c2fe..f5a4dabc05 100644--- a/crates/openhuman-core/src/platform/cost/route_tests.rs+++ b/crates/openhuman-core/src/platform/cost/route_tests.rs@@ -7,12 +7,12 @@ use super::*;#[test]fn decoration_prefixes_are_order_independent() {for id in [- "chat-v1",- "hint:chat-v1",- "openhuman/chat-v1",- "hint:openhuman/chat-v1",- "openhuman/hint:chat-v1",- " HINT:OpenHuman/Chat-V1 ",+ "openrouter/test/chat-v1",+ "hint:openrouter/test/chat-v1",+ "openhuman/openrouter/test/chat-v1",+ "hint:openhuman/openrouter/test/chat-v1",+ "openhuman/hint:openrouter/test/chat-v1",+ " HINT:OpenHuman/OpenRouter/Test/Chat-V1 ",] {assert_eq!(route_for_model(id),diff --git a/crates/openhuman-core/src/platform/cost/tracker_tests.rs b/crates/openhuman-core/src/platform/cost/tracker_tests.rsindex 295c550e52..8eae23f03b 100644--- a/crates/openhuman-core/src/platform/cost/tracker_tests.rs+++ b/crates/openhuman-core/src/platform/cost/tracker_tests.rs@@ -13,7 +13,7 @@ fn enabled_config() -> CostConfig {/// A managed-backend tier slug — spend on this route is billed to OpenHuman/// credits and so is the only kind the local budget may gate (#5016).-const MANAGED_MODEL: &str = "chat-v1";+const MANAGED_MODEL: &str = "openrouter/test/managed-model";/// A bring-your-own-key model id, as reported in #5016 (OpenRouter). Spend/// here is billed by the user's own provider and must never gate a request.diff --git a/tests/in_process/agent_builder_public.rs b/tests/in_process/agent_builder_public.rsindex 165b9d3711..6f3e12fef2 100644--- a/tests/in_process/agent_builder_public.rs+++ b/tests/in_process/agent_builder_public.rs@@ -49,6 +49,10 @@ impl Tool for StubTool {}fn base_builder() -> openhuman_core::agent::SessionHostBuilder {+ base_builder_without_model().model_name("stub-model".into())+}++fn base_builder_without_model() -> openhuman_core::agent::SessionHostBuilder {OpenHumanSessionHost::builder().chat_model(Arc::new(StubModel)).tools(vec![@@ -82,6 +86,15 @@ fn builder_validates_required_fields() {assert!(err.to_string().contains("tool_dispatcher is required"));}+#[test]+fn builder_requires_a_model_when_no_host_policy_is_installed() {+ let err = base_builder_without_model()+ .build()+ .err()+ .expect("a bare core builder needs an explicit model");+ assert!(err.to_string().contains("model_name or configured provider default is required"));+}+#[test]fn builder_applies_defaults_and_exposes_public_accessors() {let agent = base_builder()@@ -90,7 +103,7 @@ fn builder_applies_defaults_and_exposes_public_accessors() {assert_eq!(agent.tools().len(), 2);assert_eq!(agent.tool_specs().len(), 2);- assert_eq!(agent.model_name(), "openrouter/deepseek/deepseek-v4-flash");+ assert_eq!(agent.model_name(), "stub-model");assert_eq!(agent.temperature(), 0.7);assert_eq!(agent.workspace_dir(), std::path::Path::new("."));assert!(agent.workflows().is_empty());