Skip to content

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

fix(search): handle empty query in search function

Steven Enamakel652d16511312
diff --git a/crates/openhuman-core/src/search/mod.rs b/crates/openhuman-core/src/search/mod.rs
index 3012e3ea3d..bcc90f5aad 100644
--- a/crates/openhuman-core/src/search/mod.rs
+++ b/crates/openhuman-core/src/search/mod.rs
@@ -1,13 +1,25 @@
-//! Unified search domain.
+//! Web search: host policy over the TinySearch module.
//!
-//! This is the canonical home for web search selection and agent-facing search
-//! tool registration. Search provider implementations live under this module,
-//! even when they call shared backend-proxied integration infrastructure.
+//! Provider implementations, tool schemas and role dispatch live in
+//! `vendor/tinysearch`. This domain owns what OpenHuman decides: which
+//! providers are usable for this process (`providers`), how a response is shown
+//! to the model and the chat UI (`render`), the agent tool bridge (`tools`),
+//! and refreshing the module when the credential changes (`bus`).
-pub mod registry;
+pub mod providers;
+pub mod render;
+
+#[cfg(feature = "modules")]
+pub mod bus;
+#[cfg(feature = "modules")]
pub mod tools;
-pub(crate) mod engines;
+#[cfg(feature = "modules")]
+pub use tools::{build_search_tools, TinySearchTool};
-pub use registry::build_search_tools;
-pub use tools::WebSearchTool;
+/// Without the module loader there is no search provider to call.
+#[cfg(not(feature = "modules"))]
+pub fn build_search_tools(_config: &crate::config::Config) -> Vec<Box<dyn tinytools::Tool>> {
+ tracing::debug!("[search][tool] modules feature disabled; no search tools");
+ Vec::new()
+}