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: replace model constant references with literal values in tests
Steven Enamakelc230ef35231f
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rsindex a665d6c8ab..9442c9ed36 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs@@ -492,7 +492,7 @@ fn resolve_subagent_source_hint_with_config_routes_via_factory() {);assert_eq!(resolved_model,- crate::config::MODEL_MANAGED_DEFAULT,+ "openrouter/deepseek/deepseek-v4-flash","Hint must resolve to the managed default model, not a retired tier \slug from default_model or the parent's model");diff --git a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rsindex d92fa4c8e1..26d79cc6d1 100644--- a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs@@ -301,7 +301,7 @@ fn route_fallback_policy_matches_legacy_chains() {// A concrete model id installs no chain — including the managed// default, which is the model every managed route resolves to.("gpt-4o", None),- (crate::config::MODEL_MANAGED_DEFAULT, None),+ ("openrouter/deepseek/deepseek-v4-flash", None),];for (model, expected) in cases {let got = route_fallback_policy(model).map(|p| p.models);diff --git a/crates/openhuman-core/src/config/schema/identity_cost_tests.rs b/crates/openhuman-core/src/config/schema/identity_cost_tests.rsindex 7d76c93e59..e26cfd7896 100644--- a/crates/openhuman-core/src/config/schema/identity_cost_tests.rs+++ b/crates/openhuman-core/src/config/schema/identity_cost_tests.rs@@ -39,7 +39,7 @@ fn cost_config_default_pricing_has_known_models() {let c = CostConfig::default();assert!(c.prices- .contains_key(crate::config::schema::types::MODEL_MANAGED_DEFAULT),+ .contains_key("openrouter/deepseek/deepseek-v4-flash"),"default pricing must cover the managed default model; got {:?}",c.prices.keys().collect::<Vec<_>>());diff --git a/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rs b/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rsindex 36c6dd384b..6842237a89 100644--- a/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rs+++ b/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rs@@ -350,7 +350,7 @@ async fn load_or_init_falls_back_to_defaults_when_backup_also_corrupted() {// Config::default() sets default_model = Some("reasoning-v1").assert_eq!(config.default_model.as_deref(),- Some(crate::config::schema::DEFAULT_MODEL),+ Some("openrouter/deepseek/deepseek-v4-flash"),"must fall back to defaults when backup is also corrupted");@@ -382,7 +382,7 @@ async fn load_or_init_falls_back_to_defaults_when_no_backup() {assert_eq!(config.default_model.as_deref(),- Some(crate::config::schema::DEFAULT_MODEL),+ Some("openrouter/deepseek/deepseek-v4-flash"),"must fall back to defaults when no backup exists");diff --git a/crates/openhuman-core/src/config/schema/load_migration_tests.rs b/crates/openhuman-core/src/config/schema/load_migration_tests.rsindex 4cb46cb1ea..a5cf6d40d9 100644--- a/crates/openhuman-core/src/config/schema/load_migration_tests.rs+++ b/crates/openhuman-core/src/config/schema/load_migration_tests.rs@@ -104,7 +104,7 @@ async fn load_or_init_non_utf8_falls_back_to_defaults_when_backup_also_non_utf8(assert_eq!(config.default_model.as_deref(),- Some(crate::config::schema::DEFAULT_MODEL),+ Some("openrouter/deepseek/deepseek-v4-flash"),"must fall back to defaults when both config and backup have non-UTF-8 content");diff --git a/crates/openhuman-core/src/inference/model_context_tests.rs b/crates/openhuman-core/src/inference/model_context_tests.rsindex 13a346c134..6528ab0318 100644--- a/crates/openhuman-core/src/inference/model_context_tests.rs+++ b/crates/openhuman-core/src/inference/model_context_tests.rs@@ -131,12 +131,12 @@ fn o1_o3_segment_match_does_not_overmatch() {/// docs to be revisited, instead of only the two `true` arms being covered.#[test]fn oh_tier_vision_map_is_exhaustively_pinned() {- use crate::config::MODEL_MANAGED_DEFAULT;+ use "openrouter/deepseek/deepseek-v4-flash";use crate::inference::provider::factory::oh_tier_supports_vision;for tier in [// The managed default (DeepSeek V4 Flash) takes images.- MODEL_MANAGED_DEFAULT,+ "openrouter/deepseek/deepseek-v4-flash","reasoning-v1","hint:reasoning","vision-v1",diff --git a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rsindex 9491566c1a..710b0562ae 100644--- a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs@@ -486,7 +486,7 @@ fn configured_openhuman_jwt_slug_routes_to_managed_chat_model() {.expect("configured OpenhumanJwt slug should be recognized").expect("managed model should build");- assert_eq!(model_id, crate::config::MODEL_MANAGED_DEFAULT);+ assert_eq!(model_id, "openrouter/deepseek/deepseek-v4-flash");// A concrete catalog id is forwarded verbatim.config.chat_provider = Some("openhuman:openrouter/deepseek/deepseek-v4-pro".to_string());@@ -685,7 +685,7 @@ fn openhuman_jwt_slug_without_model_preserves_managed_role_tier() {.expect("configured OpenhumanJwt slug should be recognized").expect("managed model should build");- assert_eq!(model_id, crate::config::MODEL_MANAGED_DEFAULT);+ assert_eq!(model_id, "openrouter/deepseek/deepseek-v4-flash");}#[test]diff --git a/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs b/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rsindex 2dff335081..ac4e04a149 100644--- a/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::config::MODEL_MANAGED_DEFAULT;+use "openrouter/deepseek/deepseek-v4-flash";use crate::inference::provider::factory::access_gates::local_only_violation;/// When the provider string includes a model id the factory should build@@ -264,7 +264,7 @@ fn resolve_model_for_hint_maps_every_managed_hint_to_the_default_model() {] {assert_eq!(resolve_model_for_hint(hint, &config),- MODEL_MANAGED_DEFAULT,+ "openrouter/deepseek/deepseek-v4-flash","{hint} must resolve to the managed default");}@@ -294,12 +294,12 @@ fn resolve_model_for_hint_uses_the_pinned_managed_default() {config.default_model = Some("chat-v1".to_string());assert_eq!(resolve_model_for_hint("hint:chat", &config),- MODEL_MANAGED_DEFAULT+ "openrouter/deepseek/deepseek-v4-flash");config.default_model = Some("hint:reasoning".to_string());assert_eq!(resolve_model_for_hint("hint:chat", &config),- MODEL_MANAGED_DEFAULT+ "openrouter/deepseek/deepseek-v4-flash");// A BYOK chat route carries its own model and ignores the managed pin.@@ -317,7 +317,7 @@ fn resolve_model_for_hint_treats_retired_tier_slugs_as_role_aliases() {for slug in ["reasoning-v1", "agentic-v1", "coding-v1", "chat-v1"] {assert_eq!(resolve_model_for_hint(slug, &config),- MODEL_MANAGED_DEFAULT,+ "openrouter/deepseek/deepseek-v4-flash","{slug} must resolve through its role");}@@ -347,19 +347,19 @@ fn resolve_model_for_hint_falls_through_openhuman_and_cloud_sentinels() {config.reasoning_provider = Some("openhuman".to_string());assert_eq!(resolve_model_for_hint("hint:reasoning", &config),- MODEL_MANAGED_DEFAULT+ "openrouter/deepseek/deepseek-v4-flash");config.reasoning_provider = Some("cloud".to_string());assert_eq!(resolve_model_for_hint("hint:reasoning", &config),- MODEL_MANAGED_DEFAULT+ "openrouter/deepseek/deepseek-v4-flash");config.reasoning_provider = Some("".to_string());assert_eq!(resolve_model_for_hint("hint:reasoning", &config),- MODEL_MANAGED_DEFAULT+ "openrouter/deepseek/deepseek-v4-flash");}diff --git a/crates/openhuman-core/src/inference/registry_tests.rs b/crates/openhuman-core/src/inference/registry_tests.rsindex b0ff04ac9b..cd07776992 100644--- a/crates/openhuman-core/src/inference/registry_tests.rs+++ b/crates/openhuman-core/src/inference/registry_tests.rs@@ -81,7 +81,7 @@ async fn a_registered_chat_model_serves_the_managed_provider_for_a_thread() {seen[0],("chat".to_string(),- Some(crate::config::MODEL_MANAGED_DEFAULT.to_string()),+ Some("openrouter/deepseek/deepseek-v4-flash".to_string()),Some("thread-1".to_string())));diff --git a/crates/openhuman-core/src/platform/cost/route_tests.rs b/crates/openhuman-core/src/platform/cost/route_tests.rsindex bc713206d4..31fa98c43e 100644--- a/crates/openhuman-core/src/platform/cost/route_tests.rs+++ b/crates/openhuman-core/src/platform/cost/route_tests.rs@@ -33,13 +33,13 @@ fn decorations_do_not_promote_a_byok_model_to_managed() {}}-use crate::config::{LEGACY_TIER_MODELS, MODEL_MANAGED_DEFAULT};+use crate::config::{["chat-v1", "reasoning-v1", "agentic-v1", "burst-v1", "coding-v1", "vision-v1", "summarization-v1"], "openrouter/deepseek/deepseek-v4-flash"};/// The managed default is an `openrouter/...` passthrough id and bills as/// managed like every other catalog model the backend serves.#[test]fn managed_default_model_is_managed() {- assert_eq!(route_for_model(MODEL_MANAGED_DEFAULT), CostRoute::Managed);+ assert_eq!(route_for_model("openrouter/deepseek/deepseek-v4-flash"), CostRoute::Managed);}#[test]@@ -57,13 +57,13 @@ fn managed_tier_slugs_are_managed() {/// record carrying any of them still counts toward the managed budget.#[test]fn managed_tier_slugs_stay_in_sync() {- for tier in LEGACY_TIER_MODELS {+ for tier in ["chat-v1", "reasoning-v1", "agentic-v1", "burst-v1", "coding-v1", "vision-v1", "summarization-v1"] {assert!(MANAGED_MODEL_SLUGS.contains(&tier),"retired tier {tier} is not classified as managed");}- assert_eq!(MANAGED_MODEL_SLUGS.len(), LEGACY_TIER_MODELS.len());+ assert_eq!(MANAGED_MODEL_SLUGS.len(), ["chat-v1", "reasoning-v1", "agentic-v1", "burst-v1", "coding-v1", "vision-v1", "summarization-v1"].len());}#[test]diff --git a/crates/openhuman-core/src/tools/delegate_tests.rs b/crates/openhuman-core/src/tools/delegate_tests.rsindex 6bbf5e9267..4d84fd8ac7 100644--- a/crates/openhuman-core/src/tools/delegate_tests.rs+++ b/crates/openhuman-core/src/tools/delegate_tests.rs@@ -19,7 +19,7 @@ fn sample_agents() -> HashMap<String, DelegateAgentConfig> {agents.insert("coder".to_string(),DelegateAgentConfig {- model: crate::config::DEFAULT_MODEL.to_string(),+ model: "test-model".to_string(),system_prompt: None,temperature: None,max_depth: 2,diff --git a/crates/openhuman-core/src/triage/routing_tests.rs b/crates/openhuman-core/src/triage/routing_tests.rsindex 3a9aa33425..1fdf93f731 100644--- a/crates/openhuman-core/src/triage/routing_tests.rs+++ b/crates/openhuman-core/src/triage/routing_tests.rs@@ -24,7 +24,7 @@ fn build_remote_provider_managed_uses_backend_id_and_default_model() {let resolved = build_remote_provider(&crate::core::runtime::DispatchCtx::ambient(), &config).expect("remote provider should build");assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);- assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);+ assert_eq!(resolved.model, "openrouter/deepseek/deepseek-v4-flash");assert!(!resolved.used_local, "used_local is always false");}@@ -37,7 +37,7 @@ fn build_remote_provider_managed_follows_the_pinned_default_model() {let resolved = build_remote_provider(&crate::core::runtime::DispatchCtx::ambient(), &config).expect("remote provider should build");assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);- assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);+ assert_eq!(resolved.model, "openrouter/deepseek/deepseek-v4-flash");config.default_model = Some("openrouter/deepseek/deepseek-v4-pro".to_string());let resolved = build_remote_provider(&crate::core::runtime::DispatchCtx::ambient(), &config)@@ -56,7 +56,7 @@ fn build_remote_provider_falls_back_to_managed_when_chat_local() {let resolved = build_remote_provider(&crate::core::runtime::DispatchCtx::ambient(), &config).expect("remote provider should build");assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);- assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);+ assert_eq!(resolved.model, "openrouter/deepseek/deepseek-v4-flash");assert!(!resolved.used_local, "triage never goes local");}@@ -81,7 +81,7 @@ fn build_remote_provider_forces_managed_for_local_cli_routes() {);assert_eq!(resolved.model,- crate::config::MODEL_MANAGED_DEFAULT,+ "openrouter/deepseek/deepseek-v4-flash","route {route} must run the managed default");assert!(!resolved.used_local);@@ -121,7 +121,7 @@ fn build_remote_provider_falls_back_when_byok_build_fails() {let resolved = build_remote_provider(&crate::core::runtime::DispatchCtx::ambient(), &config).expect("remote provider should build");assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);- assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);+ assert_eq!(resolved.model, "openrouter/deepseek/deepseek-v4-flash");assert!(!resolved.used_local);}