The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(config): add model configuration ops and search module
Steven Enamakela3ab4cf5630b
diff --git a/crates/openhuman-core/src/config/ops/model.rs b/crates/openhuman-core/src/config/ops/model.rsindex 4f9c0ffbf1..515157cd90 100644--- a/crates/openhuman-core/src/config/ops/model.rs+++ b/crates/openhuman-core/src/config/ops/model.rs@@ -690,7 +690,7 @@ pub async fn get_composio_trigger_settings(/// receive OpenHuman session credentials. `None` when no transport is/// installed (no hosted backend).pub(crate) fn resolve_backend_api_url(config: &Config) -> Option<String> {- crate::backend::base_url(&config.api_url).ok()+ config.resolved_endpoints.control_plane_url.clone()}/// Resolves the effective backend API URL from configuration or defaults;diff --git a/crates/openhuman-core/src/modules/computer_config.rs b/crates/openhuman-core/src/modules/computer_config.rsindex 3b6eb40095..85f156553f 100644--- a/crates/openhuman-core/src/modules/computer_config.rs+++ b/crates/openhuman-core/src/modules/computer_config.rs@@ -46,7 +46,7 @@ fn jev(config: &Config, hosted: Option<&str>) -> Option<Value> {Some(api_key) => Some(json!({"api_key": api_key,"provider": "tiny_humans_open_router",- "sdk_name": crate::backend::product_identity()+ "sdk_name": config.resolved_endpoints.product_identity.clone()})),// A headless or BYOK host may have no TinyHumans session. Direct// OpenRouter Jev remains usable with its own scoped credential.@@ -78,7 +78,7 @@ fn planner(config: &Config, hosted: Option<&str>) -> Option<Value> {Some(api_key) => json!({"api_key": api_key,"provider": "tiny_humans",- "sdk_name": crate::backend::product_identity()+ "sdk_name": config.resolved_endpoints.product_identity.clone()}),None => {let api_key = provider_key(config, "openrouter", "OPENROUTER_API_KEY")?;diff --git a/crates/openhuman-core/src/modules/search/mod.rs b/crates/openhuman-core/src/modules/search/mod.rsindex 945747af83..1aa436fc68 100644--- a/crates/openhuman-core/src/modules/search/mod.rs+++ b/crates/openhuman-core/src/modules/search/mod.rs@@ -112,14 +112,14 @@ pub fn module_config(config: &Config) -> ModuleSearchConfig {BackendConfig::default()} else {BackendConfig {- base_url: crate::backend::base_url(&config.api_url).ok(),+ base_url: config.resolved_endpoints.control_plane_url.clone(),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: crate::backend::product_identity(),+ sdk_name: config.resolved_endpoints.product_identity.clone(),}};diff --git a/crates/openhuman-core/src/platform/doctor/core/config_checks.rs b/crates/openhuman-core/src/platform/doctor/core/config_checks.rsindex 237be4d7d7..fb8dc73e1b 100644--- a/crates/openhuman-core/src/platform/doctor/core/config_checks.rs+++ b/crates/openhuman-core/src/platform/doctor/core/config_checks.rs@@ -30,8 +30,10 @@ pub(super) fn check_config_semantics(config: &Config, items: &mut Vec<Diagnostic{items.push(DiagnosticItem::ok(cat, format!("api_url: {url}")));} else {- let resolved = crate::backend::inference_base_url(&config.api_url)- .unwrap_or_else(|_| "no hosted backend".to_string());+ let resolved = config+ .resolved_endpoints+ .inference_or_configured(&config.api_url)+ .unwrap_or_else(|| "no hosted backend".to_string());items.push(DiagnosticItem::ok(cat,format!("api_url: (unset) resolved to {resolved}"),diff --git a/crates/openhuman-core/src/tinymemes/jev.rs b/crates/openhuman-core/src/tinymemes/jev.rsindex fcfcc52c3e..27e20db9a5 100644--- a/crates/openhuman-core/src/tinymemes/jev.rs+++ b/crates/openhuman-core/src/tinymemes/jev.rs@@ -24,10 +24,10 @@ pub(crate) fn managed(config: &Config) -> Option<Arc<Client>> {BackendCredential::Session(token) if is_local_session_token(&token) => return None,BackendCredential::Session(token) | BackendCredential::ApiKey(token) => token,};- let base = crate::backend::base_url(&config.api_url).ok()?;+ let base = config.resolved_endpoints.control_plane_url.clone()?;let mut client = ClientConfig::tinyhumans_openrouter(secret);client.base_url = base;- if let Some(identity) = crate::backend::product_identity() {+ if let Some(identity) = config.resolved_endpoints.product_identity.clone() {client = client.with_sdk_name(&identity);}match Client::new(client) {