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
Merge remote-tracking branch 'upstream/main' into migrate-inference-to-tinyinference
Steven Enamakelb9ac458e7fe7
diff --cc crates/openhuman-core/src/inference/provider/README.mdindex 2ae9d295fc,d8f37c1d35..db59555f2b--- a/crates/openhuman-core/src/inference/provider/README.md+++ b/crates/openhuman-core/src/inference/provider/README.md@@@ -105,5 -111,18 +105,17 @@@ consumers: the agent harness (`agent/ha- `claude_code/*_tests.rs` — per-file coverage of the CC provider (auth,auth status, driver, event mapper, input builder, stream parser, sessionstore, settings, version check) plus `mod_tests.rs`.-- `crate_openai_tests.rs`, `crate_anthropic_tests.rs`,- `openhuman_backend_model_tests.rs`, `openai_codex_tests.rs` — per-transport- model builders.+- `openhuman_backend_model_tests.rs` — managed host transport; reusable provider+ builder and Codex tests live in TinyInference and TinyAgents.++ Local runtime chat providers (Ollama, LM Studio, MLX, oMLX, local-openai)+ and caller-authenticated Claude Code/Agent SDK subprocesses do not require+ an OpenHuman session, including when used by channel agents. Claude subprocesses+ still contact their external provider and remain subject to the LocalOnly privacy+ gate. Managed inference and custom cloud routes retain their session checks.++ Flow readiness checks the initial provider role used by a known harness agent,+ including node model overrides, custom registry pins, and the session builder's+ configured default. It shares the builder's role resolver before deciding whether+ a session is required. A separate summarization provider does not determine the+ session requirement for that agent.diff --cc crates/openhuman-core/src/inference/provider/factory/local_runtime.rsindex 9db41b056d,2ad24412d6..24d170f8ed--- a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs+++ b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs@@@ -2,9 -2,8 +2,8 @@@//! local-openai) as crate-native `ChatModel`s.use super::*;- #[cfg(not(test))]- use crate::inference::provider::factory::access_gates::verify_session_active;-use crate::inference::provider::crate_openai;+ use crate::inference::provider::factory::access_gates::verify_provider_session;+use tinyinference::providers::openai::build_local_runtime_chat_model;/// Local OpenAI-compatible runtimes (Ollama / LM Studio / MLX / OMLX //// local-openai) as a crate-native [`ChatModel`] (issue #4727).@@@ -13,11 -12,11 +12,11 @@@/// [`create_chat_model_with_model_id`] to try cloud/BYOK/CLI constructors.////// Endpoint/auth/`num_ctx` resolution uses the shared-/// `ollama_base_url_from_config` / `lm_studio_base_url` / profile helpers. It+/// `ollama_base_url_from_override` / `lm_studio_base_url` / profile helpers. It/// runs the host access gates for custom/local providers —/// [`enforce_local_only_inference`] (privacy mode) +- /// [`verify_session_active`] (session requirement) — so routing a local runtime- /// here cannot bypass either. Temperature rides the per-call `ModelRequest` on+ /// [`verify_provider_session`] (provider-specific authentication). Local runtimes+ /// do not require an OpenHuman account. Temperature rides the per-call `ModelRequest` on/// the crate path (parity with the managed-backend cutover; the `@<temp>` suffix/// still bakes a fixed override).///@@@ -37,22 -36,21 +36,21 @@@ pub(super) fn try_create_local_runtime_role: &str,provider: &str,config: &Config,- require_session: bool,) -> OptionalChatModelResult {- use crate::inference::local::profile::{LOCAL_OPENAI_PROFILE, MLX_PROFILE, OMLX_PROFILE};+ use tinyinference::local::profile::{LOCAL_OPENAI_PROFILE, MLX_PROFILE, OMLX_PROFILE};- let p = provider.trim().to_string();- let is_local = p.starts_with(OLLAMA_PROVIDER_PREFIX)- || p.starts_with(LM_STUDIO_PROVIDER_PREFIX)- || p.starts_with(MLX_PROVIDER_PREFIX)- || p.starts_with(OMLX_PROVIDER_PREFIX)- || p.starts_with(LOCAL_OPENAI_PROVIDER_PREFIX);- if !is_local {- return None;- }+ // Use the same classifier as privacy and session policy. Canonicalize only+ // the provider prefix: model IDs (including tags and temperature suffixes)+ // remain case-sensitive and must reach the runtime unchanged.- let kind = crate::inference::local::profile::kind_from_provider_string(provider)?;++ let kind = tinyinference::local::profile::kind_from_provider_string(provider)?;+ let model = provider+ .trim()+ .split_once(':')+ .map_or("", |(_, model)| model);+ let p = format!("{}:{model}", kind.as_str());- // Preserve host privacy-mode refusal + the session requirement for- // custom/local providers.+ // Preserve privacy policy; local runtime authentication does not depend on+ // an OpenHuman backend session.if let Err(e) = enforce_local_only_inference(role, &p) {return Some(Err(e));}diff --cc crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rsindex 1cf0589e0a,8c2be9cc2c..1c33df49a4--- a/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs+++ b/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs@@@ -99,15 -97,10 +97,14 @@@ pub(super) fn try_create_claude_code_chif let Err(error) = enforce_local_only_inference(role, provider) {return Some(Err(error));}- #[cfg(not(test))]- if let Err(error) = verify_session_active(config) {+ if let Err(error) = verify_provider_session(config, provider) {return Some(Err(error));}- let workspace = crate::inference::provider::claude_code::workspace_dir_from_config(config);+ let workspace = config+ .config_path+ .parent()+ .map(std::path::Path::to_path_buf)+ .unwrap_or_else(|| config.workspace_dir.clone());let effective_model = model_override.unwrap_or(&configured_model).to_string();emit_inference_egress(role,diff --cc vendor/tinyagentsindex c9633877b9,89256cc54e..f5eeb77c3b--- a/vendor/tinyagents+++ b/vendor/tinyagents@@@ -1,1 -1,1 +1,1 @@@- Subproject commit c9633877b96b322f1e5c1e655b91f1a4f29e7776-Subproject commit 89256cc54ed1ce94ea53d585587687b6c6b8d1cb++Subproject commit f5eeb77c3b6fa539437184f9acb6c186945d3940