Skip to content

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

fix(dispatcher): handle missing session host in dispatch

Steven Enamakel128042946da3
diff --git a/crates/openhuman-core/src/agent/session_host/builder/dispatcher.rs b/crates/openhuman-core/src/agent/session_host/builder/dispatcher.rs
index 26d2f0e2ee..e759be0967 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/dispatcher.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/dispatcher.rs
@@ -24,7 +24,6 @@ pub(super) enum DispatcherKind {
/// supports it, otherwise JSON-in-tag — **never** P-Format or a code dialect,
/// which are opt-in (`"pformat"`, `"python"`, `"typescript"`) because their
/// compact syntaxes mis-parse on some models.
-///
pub(super) fn resolve_dispatcher_kind(
dispatcher_choice: &str,
supports_native: bool,
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index bb9a5957cc..40f5645ca9 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -856,8 +856,7 @@ impl OpenHumanSessionHost {
.chain(delegation_tools.iter())
.map(|tool| (tool.name(), tool.parameters_schema())),
);
- let dispatcher_kind =
- resolve_dispatcher_kind(&dispatcher_choice, supports_native, agent_id);
+ let dispatcher_kind = resolve_dispatcher_kind(&dispatcher_choice, supports_native);
let tool_dispatcher: Box<dyn ToolDialect> = match dispatcher_kind {
DispatcherKind::Native => Box::new(NativeDialect),
DispatcherKind::Xml => Box::new(XmlDialect),