Skip to content

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

test(routing): update triage tests to use managed default model constant

Steven Enamakelaabfd8a57a64
diff --git a/crates/openhuman-core/src/agent/triage/routing_tests.rs b/crates/openhuman-core/src/agent/triage/routing_tests.rs
index ece78f1042..0940454136 100644
--- a/crates/openhuman-core/src/agent/triage/routing_tests.rs
+++ b/crates/openhuman-core/src/agent/triage/routing_tests.rs
@@ -18,9 +18,9 @@ fn openai_entry(id: &str, slug: &str) -> CloudProviderCreds {
}
#[test]
-fn build_remote_provider_managed_uses_backend_id_and_chat_tier() {
+fn build_remote_provider_managed_uses_backend_id_and_default_model() {
// Default config → subconscious workload resolves to the managed backend →
- // model pinned to the subconscious registry tier (chat-v1, == DEFAULT_MODEL).
+ // the managed default model.
let config = test_config();
let resolved = build_remote_provider(&config).expect("remote provider should build");
assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);
@@ -29,16 +29,18 @@ fn build_remote_provider_managed_uses_backend_id_and_chat_tier() {
}
#[test]
-fn build_remote_provider_managed_pins_chat_tier_regardless_of_default_model() {
- // Triage's managed arm now resolves its model via the subconscious registry
- // (make_openhuman_backend -> managed_tier_for_role = chat-v1), NOT
- // `default_model` — consistent with the subconscious tick. A heavy
- // `default_model` must not drag triage off the lightweight chat tier.
+fn build_remote_provider_managed_follows_the_pinned_default_model() {
+ // Triage's managed arm runs on the managed default model: a retired tier
+ // slug in `default_model` is not a pin, a catalog id is.
let mut config = test_config();
config.default_model = Some("reasoning-v1".to_string());
let resolved = build_remote_provider(&config).expect("remote provider should build");
assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);
- assert_eq!(resolved.model, "chat-v1");
+ assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);
+
+ config.default_model = Some("openrouter/deepseek/deepseek-v4-pro".to_string());
+ let resolved = build_remote_provider(&config).expect("remote provider should build");
+ assert_eq!(resolved.model, "openrouter/deepseek/deepseek-v4-pro");
assert!(!resolved.used_local);
}
@@ -49,10 +51,9 @@ fn build_remote_provider_falls_back_to_managed_when_subconscious_local() {
// never errors because Ollama is down.
let mut config = test_config();
config.subconscious_provider = Some("ollama:llama3.2:3b".to_string());
- config.default_model = Some("chat-v1".to_string());
let resolved = build_remote_provider(&config).expect("remote provider should build");
assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);
- assert_eq!(resolved.model, "chat-v1");
+ assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);
assert!(!resolved.used_local, "triage never goes local");
}
@@ -60,7 +61,7 @@ fn build_remote_provider_falls_back_to_managed_when_subconscious_local() {
fn build_remote_provider_forces_managed_for_local_cli_routes() {
// #1257 (Codex P2): local CLI delegates (claude_agent_sdk / claude-code:)
// are not caught by `is_local_provider_string`, but triage must not depend on
- // a local CLI — force the managed backend (chat-v1) for them too.
+ // a local CLI — force the managed backend for them too.
for route in [
"claude_agent_sdk",
"claude_agent_sdk:sonnet",
@@ -74,7 +75,11 @@ fn build_remote_provider_forces_managed_for_local_cli_routes() {
resolved.provider_name, INFERENCE_BACKEND_ID,
"route {route} must force managed backend"
);
- assert_eq!(resolved.model, "chat-v1", "route {route} must pin chat-v1");
+ assert_eq!(
+ resolved.model,
+ crate::config::MODEL_MANAGED_DEFAULT,
+ "route {route} must run the managed default"
+ );
assert!(!resolved.used_local);
}
}
@@ -108,10 +113,9 @@ fn build_remote_provider_falls_back_when_byok_build_fails() {
// backend rather than erroring the turn.
let mut config = test_config();
config.subconscious_provider = Some("groq:llama3".to_string());
- config.default_model = Some("chat-v1".to_string());
let resolved = build_remote_provider(&config).expect("remote provider should build");
assert_eq!(resolved.provider_name, INFERENCE_BACKEND_ID);
- assert_eq!(resolved.model, "chat-v1");
+ assert_eq!(resolved.model, crate::config::MODEL_MANAGED_DEFAULT);
assert!(!resolved.used_local);
}