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 schema types for context and local AI configuration
Steven Enamakelb9a04bc0c8a5
diff --git a/crates/openhuman-core/src/config/schema/context.rs b/crates/openhuman-core/src/config/schema/context.rsindex d7d9a9b597..c19be161aa 100644--- a/crates/openhuman-core/src/config/schema/context.rs+++ b/crates/openhuman-core/src/config/schema/context.rs@@ -55,8 +55,7 @@ pub struct ContextConfig {/// the raw payload before it enters agent history. Default: 4000 tokens./// Set to 0 to disable.///- /// Token count is estimated as `chars / 4` (the same heuristic used- /// by `tree_summarizer::estimate_tokens`). Pairs with+ /// Token count is estimated as `chars / 4` (a rough heuristic). Pairs with/// [`Self::summarizer_max_payload_tokens`] which caps the upper end/// (paying for an LLM call on a multi-million-token blob makes no/// economic sense, so above the cap the existingdiff --git a/crates/openhuman-core/src/config/schema/local_ai.rs b/crates/openhuman-core/src/config/schema/local_ai.rsindex 68cbe23314..3a365136e1 100644--- a/crates/openhuman-core/src/config/schema/local_ai.rs+++ b/crates/openhuman-core/src/config/schema/local_ai.rs@@ -169,10 +169,8 @@ fn default_vision_model_id() -> String {}fn default_embedding_model_id() -> String {- // bge-m3 (1024 dims, 8192-token context). Required by the memory tree's- // fixed on-disk embedding format (EMBEDDING_DIM=1024) — `all-minilm`- // (384 dims) and `nomic-embed-text` (768 dims) would fail the- // post-call dim validator at `memory::tree::score::embed::mod::embed`.+ // bge-m3 (1024 dims, 8192-token context): the default local embedding+ // model for tool discovery and the `embeddings` RPC."bge-m3".to_string()}diff --git a/crates/openhuman-core/src/config/schema/types/config.rs b/crates/openhuman-core/src/config/schema/types/config.rsindex c9a31afb51..6705b02ef2 100644--- a/crates/openhuman-core/src/config/schema/types/config.rs+++ b/crates/openhuman-core/src/config/schema/types/config.rs@@ -125,8 +125,8 @@ pub struct Config {#[serde(default = "default_temperature_value")]pub default_temperature: f64,- /// Optional language for background LLM artifacts such as memory-tree- /// summaries, extraction reasons, and learning reflections. Accepts either+ /// Optional language for background LLM artifacts such as+ /// summaries and generated briefs. Accepts either/// a known UI locale tag (for example `zh-CN`) or a human-readable language/// name. `None` preserves the existing default-language behaviour.#[serde(default)]diff --git a/crates/openhuman-core/src/config/schema/types/resolvers.rs b/crates/openhuman-core/src/config/schema/types/resolvers.rsindex c7c162d08c..b3eff33ca9 100644--- a/crates/openhuman-core/src/config/schema/types/resolvers.rs+++ b/crates/openhuman-core/src/config/schema/types/resolvers.rs@@ -1,4 +1,4 @@-//! Read-only resolvers on [`Config`]: memory-tree content root, per-workload+//! Read-only resolvers on [`Config`]: files dir, per-workload//! local-model routing, and exact agent model pins.use std::path::PathBuf;@@ -24,9 +24,8 @@ impl Config {/// Returns `None` when the provider isn't `"ollama:<model>"` (including/// when the field is unset, blank, `"cloud"`, or any other prefix)./// This is the single source of truth for "is this workload local?" —- /// callers MUST NOT consult the legacy `local_ai.usage.*` booleans or- /// `memory_tree.llm_backend`. Those fields are deprecated zombies kept- /// for migration only.+ /// callers MUST NOT consult the legacy `local_ai.usage.*` booleans, which are+ /// deprecated zombies kept for migration only.pub fn workload_local_model(&self, workload: &str) -> Option<String> {let raw = match workload {"chat" => self.chat_provider.as_deref(),