Skip to content

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

fix(tests): update managed model references to use MODEL_MANAGED_DEFAULT

Steven Enamakela26c036996a8
diff --git a/crates/openhuman-core/src/agent/triage/routing_tests.rs b/crates/openhuman-core/src/agent/triage/routing_tests.rs
index 3dee5cf94e..ece78f1042 100644
--- a/crates/openhuman-core/src/agent/triage/routing_tests.rs
+++ b/crates/openhuman-core/src/agent/triage/routing_tests.rs
@@ -24,7 +24,7 @@ fn build_remote_provider_managed_uses_backend_id_and_chat_tier() {
let config = test_config();
let resolved = build_remote_provider(&config).expect("remote provider should build");
assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);
- assert_eq!(resolved.model, crate::config::MODEL_CHAT_V1);
+ assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);
assert!(!resolved.used_local, "used_local is always false");
}
diff --git a/crates/openhuman-core/src/inference/model_context_tests.rs b/crates/openhuman-core/src/inference/model_context_tests.rs
index aa4df6bcb9..1ca097c8cb 100644
--- a/crates/openhuman-core/src/inference/model_context_tests.rs
+++ b/crates/openhuman-core/src/inference/model_context_tests.rs
@@ -131,16 +131,15 @@ 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_AGENTIC_V1, MODEL_BURST_V1, MODEL_CHAT_V1, MODEL_CODING_V1, MODEL_REASONING_QUICK_V1,
- MODEL_REASONING_V1, MODEL_SUMMARIZATION_V1, MODEL_VISION_V1,
- };
+ use crate::config::MODEL_MANAGED_DEFAULT;
use crate::inference::provider::factory::oh_tier_supports_vision;
for tier in [
- MODEL_REASONING_V1,
+ // The managed default (DeepSeek V4 Flash) takes images.
+ MODEL_MANAGED_DEFAULT,
+ "reasoning-v1",
"hint:reasoning",
- MODEL_VISION_V1,
+ "vision-v1",
"hint:vision",
] {
assert!(
@@ -150,16 +149,16 @@ fn oh_tier_vision_map_is_exhaustively_pinned() {
}
for tier in [
- MODEL_CHAT_V1,
+ "chat-v1",
"hint:chat",
- MODEL_REASONING_QUICK_V1,
- MODEL_AGENTIC_V1,
+ "reasoning-quick-v1",
+ "agentic-v1",
"hint:agentic",
- MODEL_BURST_V1,
+ "burst-v1",
"hint:burst",
- MODEL_CODING_V1,
+ "coding-v1",
"hint:coding",
- MODEL_SUMMARIZATION_V1,
+ "summarization-v1",
"hint:summarization",
// Anything the map does not name at all falls through to `false`.
"gpt-5",
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.rs
index 3bdca7f937..30dc88cc11 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
@@ -548,7 +548,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_SUMMARIZATION_V1);
+ assert_eq!(model_id, crate::config::MODEL_MANAGED_DEFAULT);
}
#[test]
diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs
index 22d90c87fc..0a6a75f8d0 100644
--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs
+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs
@@ -43,8 +43,8 @@ fn managed_model_advertises_tool_and_vision_capabilities() {
#[test]
fn resolve_model_normalizes_blank_and_trims_non_empty_values() {
- assert_eq!(resolve_model(""), crate::config::MODEL_REASONING_V1);
- assert_eq!(resolve_model(" \t\n"), crate::config::MODEL_REASONING_V1);
+ assert_eq!(resolve_model(""), crate::config::MODEL_MANAGED_DEFAULT);
+ assert_eq!(resolve_model(" \t\n"), crate::config::MODEL_MANAGED_DEFAULT);
assert_eq!(resolve_model(" reasoning-v1 "), "reasoning-v1");
assert_eq!(resolve_model("hint:reasoning"), "hint:reasoning");
}
diff --git a/crates/openhuman-core/src/platform/cost/route_tests.rs b/crates/openhuman-core/src/platform/cost/route_tests.rs
index 16ee3ac1d4..bc713206d4 100644
--- a/crates/openhuman-core/src/platform/cost/route_tests.rs
+++ b/crates/openhuman-core/src/platform/cost/route_tests.rs
@@ -33,10 +33,14 @@ fn decorations_do_not_promote_a_byok_model_to_managed() {
}
}
-use crate::config::{
- MODEL_AGENTIC_V1, MODEL_BURST_V1, MODEL_CHAT_V1, MODEL_CODING_V1, MODEL_REASONING_QUICK_V1,
- MODEL_REASONING_V1, MODEL_SUMMARIZATION_V1, MODEL_VISION_V1,
-};
+use crate::config::{LEGACY_TIER_MODELS, MODEL_MANAGED_DEFAULT};
+
+/// 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);
+}
#[test]
fn managed_tier_slugs_are_managed() {
@@ -49,33 +53,17 @@ fn managed_tier_slugs_are_managed() {
}
}
-/// The local slug list must not drift from the backend tier constants. If a
-/// new tier is introduced upstream, this fails until it is classified here
-/// — otherwise managed spend on the new tier would silently stop counting
-/// toward the budget.
+/// The retired slug list is the config's own legacy table, so an old cost
+/// record carrying any of them still counts toward the managed budget.
#[test]
fn managed_tier_slugs_stay_in_sync() {
- let upstream = [
- MODEL_CHAT_V1,
- MODEL_REASONING_V1,
- MODEL_REASONING_QUICK_V1,
- MODEL_AGENTIC_V1,
- MODEL_BURST_V1,
- MODEL_CODING_V1,
- MODEL_VISION_V1,
- MODEL_SUMMARIZATION_V1,
- ];
- for tier in upstream {
+ for tier in LEGACY_TIER_MODELS {
assert!(
MANAGED_MODEL_SLUGS.contains(&tier),
- "backend tier {tier} is not classified as managed"
+ "retired tier {tier} is not classified as managed"
);
}
- assert_eq!(
- MANAGED_MODEL_SLUGS.len(),
- upstream.len(),
- "MANAGED_MODEL_SLUGS has an entry with no matching backend tier constant"
- );
+ assert_eq!(MANAGED_MODEL_SLUGS.len(), LEGACY_TIER_MODELS.len());
}
#[test]