Skip to content

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

fix(dispatcher): correct test module name in factory provider role tests

Steven Enamakel7e2c51152835
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 6ca6566ef9..26d2f0e2ee 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/dispatcher.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/dispatcher.rs
@@ -18,25 +18,18 @@ pub(super) enum DispatcherKind {
}
/// Pick the tool-call dialect from the configured `agent.tool_dispatcher`
-/// choice, the provider's native-tool support, and the agent id.
+/// choice and the provider's native-tool support.
///
/// `"auto"` (and any unrecognized value) resolves to native when the provider
/// 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.
///
-/// `integrations_agent` is special-cased off native: provider-side grammar
-/// decoders (e.g. Fireworks) compile every JSON tool schema into a grammar
-/// indexed by a `uint16_t` (max 65 535 rules), and large Composio toolkits
-/// (Notion, Salesforce, Gmail) blow past that ceiling, so a native request is
-/// rejected with a 400 before any generation. Falling back to JSON-in-tag puts
-/// the catalogue in the prompt as prose, so no grammar is compiled.
pub(super) fn resolve_dispatcher_kind(
dispatcher_choice: &str,
supports_native: bool,
- agent_id: &str,
) -> DispatcherKind {
- let base = match dispatcher_choice {
+ match dispatcher_choice {
"native" => DispatcherKind::Native,
"xml" => DispatcherKind::Xml,
"pformat" => DispatcherKind::PFormat,
@@ -44,10 +37,5 @@ pub(super) fn resolve_dispatcher_kind(
"typescript" => DispatcherKind::Code(CodeStyle::TypeScript),
_ if supports_native => DispatcherKind::Native,
_ => DispatcherKind::Xml,
- };
- if agent_id == "integrations_agent" && base == DispatcherKind::Native {
- DispatcherKind::Xml
- } else {
- base
}
}
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
index a5cf40b15e..99e1abc96b 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
@@ -48,17 +48,17 @@ fn subconscious_agent_id_routes_to_subconscious_without_hint() {
#[test]
fn auto_prefers_native_when_supported_never_pformat() {
assert_eq!(
- resolve_dispatcher_kind("auto", true, "chat"),
+ resolve_dispatcher_kind("auto", true),
DispatcherKind::Native
);
// Text-only provider defaults to JSON-in-tag, NOT P-Format.
assert_eq!(
- resolve_dispatcher_kind("auto", false, "chat"),
+ resolve_dispatcher_kind("auto", false),
DispatcherKind::Xml
);
// An unrecognized value behaves like "auto".
assert_eq!(
- resolve_dispatcher_kind("bogus", false, "chat"),
+ resolve_dispatcher_kind("bogus", false),
DispatcherKind::Xml
);
}
@@ -66,44 +66,25 @@ fn auto_prefers_native_when_supported_never_pformat() {
#[test]
fn explicit_choices_are_honoured_including_opt_in_pformat() {
assert_eq!(
- resolve_dispatcher_kind("native", false, "chat"),
+ resolve_dispatcher_kind("native", false),
DispatcherKind::Native
);
assert_eq!(
- resolve_dispatcher_kind("xml", true, "chat"),
+ resolve_dispatcher_kind("xml", true),
DispatcherKind::Xml
);
// P-Format is only ever selected when explicitly requested.
assert_eq!(
- resolve_dispatcher_kind("pformat", true, "chat"),
+ resolve_dispatcher_kind("pformat", true),
DispatcherKind::PFormat
);
// So are the code dialects.
assert_eq!(
- resolve_dispatcher_kind("python", true, "chat"),
+ resolve_dispatcher_kind("python", true),
DispatcherKind::Code(tinytools_agent::dialect::CodeStyle::Python)
);
assert_eq!(
- resolve_dispatcher_kind("typescript", false, "chat"),
+ resolve_dispatcher_kind("typescript", false),
DispatcherKind::Code(tinytools_agent::dialect::CodeStyle::TypeScript)
);
}
-
-#[test]
-fn integrations_agent_falls_off_native_to_json_in_tag() {
- // Native would ship JSON tool specs and blow the provider grammar-rule
- // ceiling on large Composio toolkits → force JSON-in-tag.
- assert_eq!(
- resolve_dispatcher_kind("auto", true, "integrations_agent"),
- DispatcherKind::Xml
- );
- assert_eq!(
- resolve_dispatcher_kind("native", true, "integrations_agent"),
- DispatcherKind::Xml
- );
- // An explicit non-native choice is left untouched for that agent.
- assert_eq!(
- resolve_dispatcher_kind("pformat", true, "integrations_agent"),
- DispatcherKind::PFormat
- );
-}