Skip to content

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

fix(provider): add egress fallback tests and diagnostics module

Steven Enamakel5b0faac1a01d
diff --git a/crates/openhuman-core/src/inference/provider/factory_egress_fallback_tests.rs b/crates/openhuman-core/src/inference/provider/factory_egress_fallback_tests.rs
index 4df098ed60..4c3db6ab1f 100644
--- a/crates/openhuman-core/src/inference/provider/factory_egress_fallback_tests.rs
+++ b/crates/openhuman-core/src/inference/provider/factory_egress_fallback_tests.rs
@@ -16,12 +16,12 @@ async fn create_chat_model_managed_emits_exactly_one_egress_realpath() {
let mut rx = crate::core::bus::BUS.get().unwrap().receiver();
// Unique model marker so the process-wide bus can't confuse a concurrent
- // test's managed event with ours. `learning` has no managed tier and
+ // test's managed event with ours. `scratch` has no managed tier and
// resolves to the managed backend, so `default_model` flows through verbatim.
let marker = "egress-managed-realpath-marker-v1";
let mut config = Config::default();
config.default_model = Some(marker.to_string());
- let _ = create_chat_model_with_model_id("learning", &config, 0.7);
+ let _ = create_chat_model_with_model_id("scratch", &config, 0.7);
// Bound the drain with a unique sentinel published AFTER our construction.
let sentinel = "egress-managed-sentinel-end";
@@ -121,7 +121,6 @@ fn local_chat_still_routes_background_roles_to_the_managed_backend() {
"embeddings",
"memory",
"summarization",
- "learning",
"agentic",
"burst",
] {
@@ -239,7 +238,6 @@ fn cloud_fallback_roles_match_the_roles_provider_for_role_actually_falls_back()
"embeddings",
"memory",
"summarization",
- "learning",
"agentic",
"burst",
] {
diff --git a/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs b/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs
index 7343ff0403..255d5d75fe 100644
--- a/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs
+++ b/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs
@@ -10,7 +10,7 @@
//! ## Why it happens, and why the routing itself is correct
//!
//! [`super::factory::provider_for_role`] deliberately routes the background
-//! roles (`vision`, `embeddings`, `memory`, `learning`, `agentic`, `burst`)
+//! roles (`vision`, `embeddings`, `memory`, `agentic`, `burst`)
//! to the primary cloud provider when their
//! own route is unset: they run tier-specific models (`hint:vision`,
//! `hint:summarization`, …) that local runtimes and BYOK slugs do not serve. A
@@ -58,7 +58,7 @@ pub(crate) fn role_falls_back_to_cloud(role: &str) -> bool {
/// sentence ("… does not support **vision**").
///
/// `None` for roles whose name is not a capability the user would recognise as
-/// a model feature (`learning`, `burst`, …); callers fall back to the role
+/// a model feature (`burst`, …); callers fall back to the role
/// name itself.
pub(crate) fn role_capability_label(role: &str) -> Option<&'static str> {
match role.trim() {
diff --git a/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rs b/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rs
index ad9c4a6dfd..82b04a8eef 100644
--- a/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rs
+++ b/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rs
@@ -20,7 +20,6 @@ fn background_roles_fall_back_to_cloud() {
"embeddings",
"memory",
"summarization",
- "learning",
"agentic",
"burst",
] {
@@ -62,9 +61,9 @@ fn fallback_notice_names_capability_local_model_and_override() {
#[test]
fn fallback_notice_for_role_without_capability_label_uses_role_name() {
- let msg = cloud_fallback_notice("learning", "ollama:gemma3:1b", "openhuman");
- assert!(msg.contains("Learning"), "got: {msg}");
- assert!(msg.contains("learning_provider"), "got: {msg}");
+ let msg = cloud_fallback_notice("scratch", "ollama:gemma3:1b", "openhuman");
+ assert!(msg.contains("Scratch"), "got: {msg}");
+ assert!(msg.contains("scratch_provider"), "got: {msg}");
}
#[test]