Skip to content

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

fix(config): correct SearXNG URL validation and remove unused migration

Steven Enamakel90fd694d7ef5
diff --git a/crates/openhuman-core/src/config/ops/search.rs b/crates/openhuman-core/src/config/ops/search.rs
index 9ae178aefc..092835f0cd 100644
--- a/crates/openhuman-core/src/config/ops/search.rs
+++ b/crates/openhuman-core/src/config/ops/search.rs
@@ -173,7 +173,7 @@ fn apply_provider_patch(
return Err(format!("{provider} does not take a base URL"));
}
let url = url.trim();
- if !url.is_empty() && !(url.starts_with("http://") || url.starts_with("https://")) {
+ if !(url.is_empty() || url.starts_with("http://") || url.starts_with("https://")) {
return Err("SearXNG base URL must start with http:// or https://".into());
}
config.searxng.base_url = url.to_string();
diff --git a/crates/openhuman-core/src/config/schema/load/mod.rs b/crates/openhuman-core/src/config/schema/load/mod.rs
index 94dfa0af95..2a116d3227 100644
--- a/crates/openhuman-core/src/config/schema/load/mod.rs
+++ b/crates/openhuman-core/src/config/schema/load/mod.rs
@@ -53,9 +53,7 @@ pub(crate) use dirs::ACTIVE_USER_STATE_FILE;
#[cfg(test)]
pub(crate) use impl_load::parse_config_with_recovery;
#[cfg(test)]
-pub(crate) use migrate::{
- migrate_cloud_provider_slugs, migrate_legacy_inference_url, migrate_search_settings,
-};
+pub(crate) use migrate::{migrate_cloud_provider_slugs, migrate_legacy_inference_url};
#[cfg(test)]
pub(crate) use std::path::PathBuf;
diff --git a/crates/openhuman-core/src/modules/search/proxy.rs b/crates/openhuman-core/src/modules/search/proxy.rs
index 69678da2c7..cc6c41e864 100644
--- a/crates/openhuman-core/src/modules/search/proxy.rs
+++ b/crates/openhuman-core/src/modules/search/proxy.rs
@@ -53,7 +53,7 @@ async fn proxy(config: &Config) -> Result<tinybus::Proxy, String> {
Some(last) if last == current => {}
Some(_) => {
tracing::debug!("[modules][search] configuration changed; reinitializing module");
- reinitialize(&runtime, configuration).await?;
+ reinitialize(runtime, configuration).await?;
}
}
*previous = Some(current);