Skip to content

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

fix(channels): fall back to configured channel capabilities when routing

Steven Enamakelc89f5189cf31
diff --git a/crates/openhuman-core/src/channels/routes.rs b/crates/openhuman-core/src/channels/routes.rs
index 742fa3c42b..12389fb363 100644
--- a/crates/openhuman-core/src/channels/routes.rs
+++ b/crates/openhuman-core/src/channels/routes.rs
@@ -236,7 +236,13 @@ where
(ChannelControlRequest::Route {
workspace_dir: ctx.workspace_dir.to_string_lossy().into_owned(),
message: Box::new(msg.clone()),
- capabilities: target_channel.map(|channel| Box::new(channel.capabilities())),
+ capabilities: target_channel
+ .map(|channel| Box::new(channel.capabilities()))
+ .or_else(|| {
+ configured_channel
+ .as_ref()
+ .map(|configured| Box::new(configured.capabilities.clone()))
+ }),
route: tinychannels_bus::module_remote::RemoteRoute {
provider: current.provider,
model: current.model,
diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rs
index 8b2dbf3cec..f4ea499ce1 100644
--- a/crates/openhuman-core/src/channels/routes_tests.rs
+++ b/crates/openhuman-core/src/channels/routes_tests.rs
@@ -207,7 +207,11 @@ async fn module_route_help_response(
let request = ChannelControlRequest::Route {
workspace_dir: workspace_dir.to_string_lossy().into_owned(),
- capabilities: None,
+ capabilities: Some(Box::new({
+ let mut capabilities = tinychannels_bus::ChannelCapabilities::unknown();
+ capabilities.remote_control = true;
+ capabilities
+ })),
message: Box::new(ChannelMessage {
reply_to_id: None,
topic_id: None,