Skip to content

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

fix(modules): remove unused host memory import

Steven Enamakeld2b62d2bae17
diff --git a/crates/openhuman-core/src/memory/host.rs b/crates/openhuman-core/src/memory/host.rs
index 0b3d7a5fc9..b5e8e3865e 100644
--- a/crates/openhuman-core/src/memory/host.rs
+++ b/crates/openhuman-core/src/memory/host.rs
@@ -98,10 +98,10 @@ impl MemoryHostConfig for Config {
}
fn effective_backend_api_url(&self) -> String {
- // Resolution (env override, staging/prod default, trailing-slash
- // normalisation) lives in `api::config` and must not be re-derived on
- // the other side of the seam.
- crate::api::config::effective_backend_api_url(&self.api_url)
+ // Resolution (defaults, env overrides, normalisation) belongs to the
+ // installed backend transport and must not be re-derived on the other
+ // side of the seam. Empty when no transport is installed.
+ crate::backend::base_url(&self.api_url).unwrap_or_default()
}
fn session_token(&self) -> Result<Option<String>, String> {
diff --git a/crates/openhuman-core/src/modules/browser_task.rs b/crates/openhuman-core/src/modules/browser_task.rs
index d7c67fa9bf..2bc5ace635 100644
--- a/crates/openhuman-core/src/modules/browser_task.rs
+++ b/crates/openhuman-core/src/modules/browser_task.rs
@@ -10,7 +10,6 @@ use tinybrowser_bus::SessionId;
use tinybrowser_control::{BrowserControl, ControlLimits, JevController, TaskRequest, TaskResult};
use tinyjevclient::{Client, ClientConfig};
-use crate::api::config::effective_backend_api_url;
use crate::config::Config;
use crate::inference::provider::factory::{lookup_key_for_slug, provider_for_role};
use crate::security::credentials::session_support::direct_backend_credential;
@@ -56,7 +55,8 @@ fn jev_client(config: &Config) -> Result<Client, String> {
let credential = direct_backend_credential(config, "browser task (hosted jev)")
.ok_or_else(|| "TinyHumans credential is unavailable".to_owned())?;
let mut client_config = ClientConfig::tinyhumans_openrouter(credential.into_secret());
- client_config.base_url = effective_backend_api_url(&config.api_url);
+ client_config.base_url = crate::backend::base_url(&config.api_url)
+ .map_err(|_| "TinyHumans backend is unavailable".to_owned())?;
client_config
}
};
diff --git a/crates/openhuman-core/src/modules/desktop.rs b/crates/openhuman-core/src/modules/desktop.rs
index 890fe48785..969facdc56 100644
--- a/crates/openhuman-core/src/modules/desktop.rs
+++ b/crates/openhuman-core/src/modules/desktop.rs
@@ -30,7 +30,7 @@ pub fn module_config(config: &Config) -> serde_json::Value {
"jev": {
"api_key": api_key,
"provider": "tiny_humans_open_router",
- "sdk_name": crate::api::product_identity().as_str()
+ "sdk_name": crate::backend::product_identity()
}
}),
None => {
diff --git a/crates/openhuman-core/src/modules/ops.rs b/crates/openhuman-core/src/modules/ops.rs
index 157311b006..a82ef63fee 100644
--- a/crates/openhuman-core/src/modules/ops.rs
+++ b/crates/openhuman-core/src/modules/ops.rs
@@ -592,7 +592,8 @@ fn module_config(config: &Config, id: &str) -> serde_json::Value {
"composio_entity_id": config.composio.entity_id,
// Proxied Composio addresses the backend with this; without it the module
// builds its request against an empty base and fails in the HTTP client.
- "backend_api_url": crate::api::config::effective_backend_api_url(&config.api_url),
+ // `null` when no backend transport is installed.
+ "backend_api_url": crate::backend::base_url(&config.api_url).ok(),
"driver_id": "tinymemory",
})
}
diff --git a/crates/openhuman-core/src/modules/search.rs b/crates/openhuman-core/src/modules/search.rs
index e693e01a43..98a6d67ba3 100644
--- a/crates/openhuman-core/src/modules/search.rs
+++ b/crates/openhuman-core/src/modules/search.rs
@@ -51,14 +51,14 @@ pub fn module_config(config: &Config) -> ModuleSearchConfig {
config.searxng.enabled,
);
let backend = BackendConfig {
- base_url: Some(crate::api::effective_backend_api_url(&config.api_url)),
+ base_url: crate::backend::base_url(&config.api_url).ok(),
auth_mode: if credential.as_ref().is_some_and(|c| c.is_api_key()) {
BackendAuthMode::ApiKey
} else {
BackendAuthMode::Session
},
credential: credential.map(|c| c.into_secret()),
- sdk_name: Some(crate::api::product_identity().as_str().to_owned()),
+ sdk_name: crate::backend::product_identity(),
};
let mut providers = BTreeMap::new();
let limits = (