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
fix(config): remove unused model resolver and related types
Steven Enamakelc0bfd53d4b7c
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rsindex 4c35b3b508..427c91341e 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs@@ -91,9 +91,7 @@ const CHAT_WORKLOAD_ROLES: &[&str] = &["vision","memory","summarization",- "heartbeat","learning",- "subconscious",];/// The role a team lead takes when the caller supplied none.diff --git a/crates/openhuman-core/src/config/schema/types/model_ids.rs b/crates/openhuman-core/src/config/schema/types/model_ids.rsindex 926b155191..1af7aee034 100644--- a/crates/openhuman-core/src/config/schema/types/model_ids.rs+++ b/crates/openhuman-core/src/config/schema/types/model_ids.rs@@ -53,7 +53,7 @@ pub fn legacy_tier_role(model: &str) -> Option<&'static str> {/// Every workload role the managed backend routes, each with its `hint:*`/// alias accepted wherever a model id is taken.-pub const WORKLOAD_ROLES: [&str; 8] = [+pub const WORKLOAD_ROLES: [&str; 7] = ["chat","reasoning","agentic",@@ -61,7 +61,6 @@ pub const WORKLOAD_ROLES: [&str; 8] = ["burst","summarization","vision",- "subconscious",];/// `hint:vision` is deprecated: `vision-v1` silently falls back to the chatdiff --git a/crates/openhuman-core/src/config/schema/types/resolvers.rs b/crates/openhuman-core/src/config/schema/types/resolvers.rsindex 0ad3246473..d2c4299207 100644--- a/crates/openhuman-core/src/config/schema/types/resolvers.rs+++ b/crates/openhuman-core/src/config/schema/types/resolvers.rs@@ -26,8 +26,8 @@ impl Config {/// when the workload is routed to Ollama.////// Recognised workload names:- /// `"chat"`, `"reasoning"`, `"agentic"`, `"coding"`, `"memory"`, `"embeddings"`,- /// `"heartbeat"`, `"learning"`, `"subconscious"`.+ /// `"chat"`, `"reasoning"`, `"agentic"`, `"coding"`, `"vision"`, `"memory"`,+ /// `"embeddings"`, `"learning"`.////// Returns `None` when the provider isn't `"ollama:<model>"` (including/// when the field is unset, blank, `"cloud"`, or any other prefix).@@ -44,9 +44,7 @@ impl Config {"vision" => self.vision_provider.as_deref(),"memory" => self.memory_provider.as_deref(),"embeddings" => self.embeddings_provider.as_deref(),- "heartbeat" => self.heartbeat_provider.as_deref(),"learning" => self.learning_provider.as_deref(),- "subconscious" => self.subconscious_provider.as_deref(),_ => None,}?;let trimmed = raw.trim();diff --git a/crates/openhuman-core/src/inference/model_context.rs b/crates/openhuman-core/src/inference/model_context.rsindex c7f782976e..4f93f3c662 100644--- a/crates/openhuman-core/src/inference/model_context.rs+++ b/crates/openhuman-core/src/inference/model_context.rs@@ -70,7 +70,7 @@ fn tier_context_window(model: &str) -> Option<u64> {"reasoning" => Some(TIER_REASONING_CONTEXT),"agentic" | "coding" => Some(TIER_LARGE_CONTEXT),"burst" => Some(TIER_STANDARD_CONTEXT),- "chat" | "summarization" | "subconscious" => Some(TIER_FLASH_CONTEXT),+ "chat" | "summarization" => Some(TIER_FLASH_CONTEXT),_ if model == "chat" => Some(TIER_FLASH_CONTEXT),_ if model.starts_with("gemma") || model.contains(":1b") || model.contains("270m") => {Some(TIER_LOCAL_CONTEXT)diff --git a/crates/openhuman-core/src/inference/provider/factory/routing.rs b/crates/openhuman-core/src/inference/provider/factory/routing.rsindex 12818c9c7d..f65bab057a 100644--- a/crates/openhuman-core/src/inference/provider/factory/routing.rs+++ b/crates/openhuman-core/src/inference/provider/factory/routing.rs@@ -30,9 +30,7 @@ pub(super) fn configured_route_for_role<'a>(role: &str, config: &'a Config) -> O// for a separate config knob."memory" | "summarization" => config.memory_provider.as_deref(),"embeddings" => config.embeddings_provider.as_deref(),- "heartbeat" => config.heartbeat_provider.as_deref(),"learning" => config.learning_provider.as_deref(),- "subconscious" => config.subconscious_provider.as_deref(),_ => None,}}diff --git a/crates/openhuman-core/src/inference/provider/factory/tiers.rs b/crates/openhuman-core/src/inference/provider/factory/tiers.rsindex 9941c4221e..0e77dd34dc 100644--- a/crates/openhuman-core/src/inference/provider/factory/tiers.rs+++ b/crates/openhuman-core/src/inference/provider/factory/tiers.rs@@ -28,7 +28,6 @@ fn hint_role(hint: &str) -> Option<&'static str> {"coding" => Some("coding"),"vision" => Some("vision"),"summarization" => Some("summarization"),- "subconscious" => Some("subconscious"),_ => None,}}@@ -84,14 +83,9 @@ pub fn resolve_model_for_hint(hint_or_tier: &str, config: &Config) -> String {/// `create_chat_model` with it so the completion follows the role's route.pub fn role_for_model_tier(hint_or_tier: &str) -> &'static str {let trimmed = hint_or_tier.trim();- match hint_role(trimmed).or_else(|| legacy_tier_role(trimmed)) {- // The background subconscious *role* keeps its own `subconscious_provider`- // (see `resolve_model_for_hint`), but as a model-tier spelling it has- // always ridden the chat route.- Some("subconscious") => "chat",- Some(role) => role,- None => "chat",- }+ hint_role(trimmed)+ .or_else(|| legacy_tier_role(trimmed))+ .unwrap_or("chat")}/// The user's pinned managed **default model** — `config.default_model` whendiff --git a/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs b/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rsindex d560df9026..3db0c9d8ff 100644--- a/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs+++ b/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs@@ -10,8 +10,8 @@//! ## Why it happens, and why the routing itself is correct//!//! [`super::factory::provider_for_role`] deliberately routes the background-//! roles (`vision`, `embeddings`, `memory`, `heartbeat`, `learning`,-//! `subconscious`, `agentic`, `burst`) to the primary cloud provider when their+//! roles (`vision`, `embeddings`, `memory`, `learning`, `agentic`, `burst`)+//! to the primary cloud provider when their//! own route is unset: they run tier-specific models (`hint:vision`,//! `hint:summarization`, …) that local runtimes and BYOK slugs do not serve. A//! user on a local chat model with a managed subscription genuinely wants those@@ -44,9 +44,7 @@ const CLOUD_FALLBACK_ROLES: &[&str] = &["embeddings","memory","summarization",- "heartbeat","learning",- "subconscious","agentic","burst",];@@ -61,7 +59,7 @@ pub(crate) fn role_falls_back_to_cloud(role: &str) -> bool {/// sentence ("… does not support **vision**").////// `None` for roles whose name is not a capability the user would recognise as-/// a model feature (`heartbeat`, `burst`, …); callers fall back to the role+/// a model feature (`learning`, `burst`, …); callers fall back to the role/// name itself.pub(crate) fn role_capability_label(role: &str) -> Option<&'static str> {match role.trim() {