Skip to content

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

fix(config): remove unused search migration and env overlay modules

Steven Enamakel4fc1bc0053dc
diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rs
index dda5e2c824..a76fea7546 100644
--- a/crates/openhuman-core/src/config/mod.rs
+++ b/crates/openhuman-core/src/config/mod.rs
@@ -63,7 +63,7 @@ pub use schema::{
MANAGED_MULTIMODAL_MODELS, MANAGED_SEARCH_PROVIDERS, MEMORY_SYNC_INTERVAL_PRESETS_SECS,
MODEL_IMAGE_GENERATION_AGENT, MODEL_MANAGED_DEFAULT, MODEL_MEDIA_UNDERSTANDING,
MODEL_VIDEO_GENERATION_AGENT, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
- SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,
+ SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,
SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
// Kept as a separate re-export (issue #4117) so the large alphabetized group
diff --git a/crates/openhuman-core/src/config/ops/loader/snapshot.rs b/crates/openhuman-core/src/config/ops/loader/snapshot.rs
index 0be3f50b13..1d18ec468f 100644
--- a/crates/openhuman-core/src/config/ops/loader/snapshot.rs
+++ b/crates/openhuman-core/src/config/ops/loader/snapshot.rs
@@ -11,7 +11,7 @@ pub fn snapshot_config_json(config: &Config) -> Result<serde_json::Value, String
let mut value = serde_json::to_value(config).map_err(|e| e.to_string())?;
// The full snapshot is sent over RPC. Keep search settings visible while
// removing credentials, including the legacy Seltz key.
- for provider in ["brave", "querit", "exa", "tavily", "gemini"] {
+ for provider in ["brave", "querit", "exa", "tavily", "gemini", "parallel"] {
value["search"][provider]["api_key"] = serde_json::Value::Null;
}
value["seltz"]["api_key"] = serde_json::Value::Null;
diff --git a/crates/openhuman-core/src/config/ops/search.rs b/crates/openhuman-core/src/config/ops/search.rs
index 092835f0cd..577ac7f978 100644
--- a/crates/openhuman-core/src/config/ops/search.rs
+++ b/crates/openhuman-core/src/config/ops/search.rs
@@ -65,7 +65,7 @@ pub struct SearchSettingsPatch {
/// Providers shown in settings. `gemini_deep_research` rides on the Gemini
/// key and is reported under `gemini` rather than as its own row.
const LISTED_PROVIDERS: &[&str] = &[
- "exa", "gemini", "tinyfish", "brave", "tavily", "querit", "seltz", "searxng",
+ "exa", "gemini", "tinyfish", "parallel", "brave", "tavily", "querit", "seltz", "searxng",
];
fn label(provider: &str) -> String {
@@ -76,6 +76,7 @@ fn docs_url(provider: &str) -> Option<&'static str> {
match provider {
"exa" => Some("https://dashboard.exa.ai/api-keys"),
"gemini" => Some("https://aistudio.google.com/apikey"),
+ "parallel" => Some("https://platform.parallel.ai/"),
"brave" => Some("https://brave.com/search/api/"),
"tavily" => Some("https://app.tavily.com/"),
"querit" => Some("https://querit.ai/"),
diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs
index ab3b11cfc9..e5558de270 100644
--- a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs
+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs
@@ -176,11 +176,13 @@ impl Config {
}
}
}
- if env.contains("OPENHUMAN_PARALLEL_ROUTE")
- || env.contains("OPENHUMAN_PARALLEL_API_KEY")
- || env.contains("PARALLEL_API_KEY")
- {
- log::warn!("[config][search] Parallel is no longer a search provider; PARALLEL_* settings are ignored");
+ if env.contains("OPENHUMAN_PARALLEL_ROUTE") {
+ log::warn!("[config][search] managed Parallel is no longer offered; OPENHUMAN_PARALLEL_ROUTE is ignored (Parallel uses your own key)");
+ }
+ if let Some(key) = env.get_any(&["OPENHUMAN_PARALLEL_API_KEY", "PARALLEL_API_KEY"]) {
+ if !key.trim().is_empty() {
+ self.search.parallel.api_key = Some(key);
+ }
}
if let Some(key) = env.get_any(&["OPENHUMAN_GEMINI_API_KEY", "GEMINI_API_KEY"]) {
if !key.trim().is_empty() {
diff --git a/crates/openhuman-core/src/config/schema/load/secrets.rs b/crates/openhuman-core/src/config/schema/load/secrets.rs
index 64c57d8743..7b87c411d3 100644
--- a/crates/openhuman-core/src/config/schema/load/secrets.rs
+++ b/crates/openhuman-core/src/config/schema/load/secrets.rs
@@ -103,6 +103,11 @@ pub(super) fn decrypt_config_secrets(config: &mut Config, openhuman_dir: &Path)
decrypt_optional_secret(&store, &mut config.api_key, "api_key")?;
decrypt_optional_secret(&store, &mut config.seltz.api_key, "seltz.api_key")?;
+ decrypt_optional_secret(
+ &store,
+ &mut config.search.parallel.api_key,
+ "search.parallel.api_key",
+ )?;
decrypt_optional_secret(
&store,
&mut config.search.brave.api_key,
@@ -213,6 +218,11 @@ pub(super) fn encrypt_config_secrets(config: &mut Config) -> Result<()> {
encrypt_optional_secret(&store, &mut config.api_key, "api_key")?;
encrypt_optional_secret(&store, &mut config.seltz.api_key, "seltz.api_key")?;
+ encrypt_optional_secret(
+ &store,
+ &mut config.search.parallel.api_key,
+ "search.parallel.api_key",
+ )?;
encrypt_optional_secret(
&store,
&mut config.search.brave.api_key,
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 5153e86345..3567150998 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -124,7 +124,7 @@ pub use tools::{
MultimodalFileConfig, SearchConfig, SearchEngineCredentials, SearchPresentation,
SearchProviderSettings, SearchRoute, SearxngConfig, SecretsConfig, SeltzConfig,
WebSearchConfig, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT, MANAGED_SEARCH_PROVIDERS,
- SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED,
+ SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,
SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER,
SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
diff --git a/crates/openhuman-core/src/config/schema/tools/mod.rs b/crates/openhuman-core/src/config/schema/tools/mod.rs
index 2aa9eb70d8..4609ab68a7 100644
--- a/crates/openhuman-core/src/config/schema/tools/mod.rs
+++ b/crates/openhuman-core/src/config/schema/tools/mod.rs
@@ -22,6 +22,6 @@ pub use search::{
LegacySearchInputs, SearchConfig, SearchEngineCredentials, SearchPresentation,
SearchProviderSettings, SearchRoute, SearxngConfig, SeltzConfig, WebSearchConfig,
MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
- SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,
+ SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,
SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
diff --git a/crates/openhuman-core/src/config/schema/tools/search_migrate.rs b/crates/openhuman-core/src/config/schema/tools/search_migrate.rs
index cfd98ce379..b917fd4aa2 100644
--- a/crates/openhuman-core/src/config/schema/tools/search_migrate.rs
+++ b/crates/openhuman-core/src/config/schema/tools/search_migrate.rs
@@ -4,8 +4,8 @@
use std::collections::BTreeMap;
use super::{
- LegacySearchInputs, SearchConfig, SearchEngineCredentials, SearchProviderSettings, SearchRoute,
- SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED,
+ LegacySearchInputs, SearchConfig, SearchProviderSettings, SearchRoute, SEARCH_ENGINE_BRAVE,
+ SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,
SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLE_SEARCH,
SEARCH_SCHEMA_VERSION,
};
diff --git a/crates/openhuman-core/src/search/render.rs b/crates/openhuman-core/src/search/render.rs
index 5608ee9111..e74c837eb2 100644
--- a/crates/openhuman-core/src/search/render.rs
+++ b/crates/openhuman-core/src/search/render.rs
@@ -22,6 +22,7 @@ pub fn provider_label(provider: &str) -> String {
"gemini" => "Gemini".into(),
"gemini_deep_research" => "Gemini Deep Research".into(),
"tinyfish" => "TinyFish".into(),
+ "parallel" => "Parallel".into(),
"brave" => "Brave".into(),
"querit" => "Querit".into(),
"tavily" => "Tavily".into(),
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index 86ccc0cfb9..bdd56c5b22 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -1276,6 +1276,7 @@ fn tool_group(name: &str) -> crate::core::all::DomainGroup {
|| name.starts_with("tinyfish_")
|| name.starts_with("exa_")
|| name.starts_with("gemini_")
+ || name.starts_with("parallel_")
|| name.starts_with("brave_")
|| name.starts_with("querit_")
|| name.starts_with("tavily_")