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
chore: files changed crates/openhuman-core/src/channels/routes.rs,crates/openhuman-core/src/channels
Steven Enamakel5a7cef041c9b
diff --git a/crates/openhuman-core/src/channels/routes.rs b/crates/openhuman-core/src/channels/routes.rsindex 687cc9c08f..c1dc6a1407 100644--- a/crates/openhuman-core/src/channels/routes.rs+++ b/crates/openhuman-core/src/channels/routes.rs@@ -12,7 +12,6 @@ fn provider_descriptors(config: &crate::config::Config) -> Vec<ProviderDescriptoconfig.cloud_providers.iter()- .into_iter().map(|provider| ProviderDescriptor {name: provider.slug.clone(),aliases: if provider.slug == crate::inference::provider::factory::PROVIDER_OPENHUMANdiff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rsindex 623f9e7b03..f54eb01ea9 100644--- a/crates/openhuman-core/src/channels/routes_tests.rs+++ b/crates/openhuman-core/src/channels/routes_tests.rs@@ -337,6 +337,63 @@ async fn load_cached_model_preview_returns_empty_when_cache_json_is_invalid() {assert!(response.contains("No cached model list found for `openai`"));}+#[tokio::test]+async fn handle_runtime_command_routes_configured_provider_slug_and_alias() {+ use crate::config::schema::{AuthStyle, CloudProviderCreds};++ let mut ctx = runtime_context(PathBuf::from("/tmp"));+ let config = crate::config::Config {+ cloud_providers: vec![+ CloudProviderCreds {+ id: "p_custom_route_123".into(),+ slug: "custom-route".into(),+ label: "Human Friendly Name".into(),+ endpoint: "https://provider.example.test/v1".into(),+ auth_style: AuthStyle::Bearer,+ default_model: None,+ },+ CloudProviderCreds {+ id: "p_managed_123".into(),+ slug: "openhuman".into(),+ label: "Managed Backend".into(),+ endpoint: "https://api.openhuman.ai/v1".into(),+ auth_style: AuthStyle::OpenhumanJwt,+ default_model: None,+ },+ ],+ ..crate::config::Config::default()+ };+ ctx.config = Some(Arc::new(config));+ let channel_impl = Arc::new(RecordingChannel::default());+ let channel: Arc<dyn Channel> = channel_impl.clone();+ let key = "telegram_alice_room";++ for requested in ["custom-route", "backend"] {+ let msg = ChannelMessage {+ id: requested.into(),+ sender: "alice".into(),+ reply_target: "room".into(),+ content: format!("/models {requested}"),+ channel: "telegram".into(),+ timestamp: 0,+ thread_ts: None,+ sender_name: None,+ };+ assert!(handle_runtime_command_if_needed(+ &ctx,+ &msg,+ Some(&channel),+ &conversation_history_key(&msg),+ )+ .await);+ }++ assert_eq!(get_route_selection(&ctx, key).provider, "openhuman");+ let sent = channel_impl.sent.lock().unwrap();+ assert_eq!(sent.len(), 1, "the configured slug should be accepted");+ assert!(sent[0].content.contains("Provider switched to `custom-route`"));+}+#[tokio::test]async fn handle_runtime_command_unknown_provider_sends_helpful_error() {let ctx = runtime_context(PathBuf::from("/tmp"));diff --git a/crates/openhuman-core/src/inference/provider/ops/http_error.rs b/crates/openhuman-core/src/inference/provider/http_error.rssimilarity index 100%rename from crates/openhuman-core/src/inference/provider/ops/http_error.rsrename to crates/openhuman-core/src/inference/provider/http_error.rsdiff --git a/crates/openhuman-core/src/inference/provider/ops/http_error_tests.rs b/crates/openhuman-core/src/inference/provider/http_error_tests.rssimilarity index 100%rename from crates/openhuman-core/src/inference/provider/ops/http_error_tests.rsrename to crates/openhuman-core/src/inference/provider/http_error_tests.rsdiff --git a/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs b/crates/openhuman-core/src/inference/provider/models/catalog_listing.rssimilarity index 100%rename from crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rsrename to crates/openhuman-core/src/inference/provider/models/catalog_listing.rsdiff --git a/crates/openhuman-core/src/inference/provider/ops/models/local_runtime.rs b/crates/openhuman-core/src/inference/provider/models/local_runtime.rssimilarity index 100%rename from crates/openhuman-core/src/inference/provider/ops/models/local_runtime.rsrename to crates/openhuman-core/src/inference/provider/models/local_runtime.rsdiff --git a/crates/openhuman-core/src/inference/provider/ops/models.rs b/crates/openhuman-core/src/inference/provider/models/mod.rssimilarity index 100%rename from crates/openhuman-core/src/inference/provider/ops/models.rsrename to crates/openhuman-core/src/inference/provider/models/mod.rsdiff --git a/crates/openhuman-core/src/inference/provider/ops/models/openrouter.rs b/crates/openhuman-core/src/inference/provider/models/openrouter.rssimilarity index 100%rename from crates/openhuman-core/src/inference/provider/ops/models/openrouter.rsrename to crates/openhuman-core/src/inference/provider/models/openrouter.rsdiff --git a/crates/openhuman-core/src/inference/provider/ops/models_tests.rs b/crates/openhuman-core/src/inference/provider/models_tests.rssimilarity index 100%rename from crates/openhuman-core/src/inference/provider/ops/models_tests.rsrename to crates/openhuman-core/src/inference/provider/models_tests.rs