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(agent): correct reasoning agent to use the new turn runner
Steven Enamakeld6390bfb3306
diff --git a/crates/openhuman-core/src/agent/tinyagents/mod.rs b/crates/openhuman-core/src/agent/tinyagents/mod.rsindex 1ef1108b4d..f5a24d147b 100644--- a/crates/openhuman-core/src/agent/tinyagents/mod.rs+++ b/crates/openhuman-core/src/agent/tinyagents/mod.rs@@ -74,7 +74,7 @@ pub(crate) use middleware::{};pub(crate) use observability::SubagentScope;#[cfg(test)]-pub(crate) use reasoning::{apply_requested_effort, parse_reasoning_effort, turn_reasoning};+pub(crate) use reasoning::{apply_requested_effort, parse_reasoning_effort};pub(crate) use topology::all_graph_topologies;pub use turn_models::TurnModelSource;pub(crate) use turn_models::TurnModels;diff --git a/crates/openhuman-core/src/agent/tinyagents/reasoning.rs b/crates/openhuman-core/src/agent/tinyagents/reasoning.rsindex c0cb20cc4e..bc0cd9d690 100644--- a/crates/openhuman-core/src/agent/tinyagents/reasoning.rs+++ b/crates/openhuman-core/src/agent/tinyagents/reasoning.rs@@ -75,18 +75,15 @@ pub(crate) fn apply_requested_effort(thread_id: &str, raw: Option<&str>) -> Resu////// Only a root turn (spawn depth 0) follows the user's thinking level; a/// sub-agent runs at its provider default, since the user picked a level for-/// the conversation, not for every delegated helper. The config comes from-/// the session snapshot the root turn carries (`ParentExecutionContext`).+/// the conversation, not for every delegated helper. `config` is the session+/// config a hosted root turn carries (`OpenHumanHostBase::config`).pub(crate) fn turn_reasoning_for(ctx: &crate::agent::tinyagents::host::OpenHumanRunContext,+ config: Option<&Config>,) -> Option<ReasoningConfig> {if ctx.spawn_depth > 0 {return None;}- let config = ctx- .parent- .as_ref()- .and_then(|parent| parent.runtime_config.as_deref());let reasoning = turn_reasoning(ctx.thread_id.as_deref(), config);if let Some(reasoning) = reasoning.as_ref() {log::debug!(diff --git a/crates/openhuman-core/src/agent/tinyagents/reasoning_tests.rs b/crates/openhuman-core/src/agent/tinyagents/reasoning_tests.rsindex 00d041946a..1a6cd0e38e 100644--- a/crates/openhuman-core/src/agent/tinyagents/reasoning_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/reasoning_tests.rs@@ -101,7 +101,7 @@ fn root_turn_follows_the_thread_choice() {let mut ctx = crate::agent::tinyagents::host::OpenHumanRunContext::new();ctx.thread_id = Some(thread.to_string());assert_eq!(- turn_reasoning_for(&ctx),+ turn_reasoning_for(&ctx, None),Some(ReasoningConfig::effort(ReasoningEffort::High)));set_thread_effort(thread, None);@@ -114,6 +114,17 @@ fn subagent_turn_keeps_the_provider_default() {let mut ctx = crate::agent::tinyagents::host::OpenHumanRunContext::new();ctx.thread_id = Some(thread.to_string());ctx.spawn_depth = 1;- assert_eq!(turn_reasoning_for(&ctx), None);+ assert_eq!(turn_reasoning_for(&ctx, None), None);set_thread_effort(thread, None);}++#[test]+fn root_turn_without_a_thread_choice_uses_the_session_config() {+ let mut config = Config::default();+ config.runtime.reasoning_effort = Some("medium".into());+ let ctx = crate::agent::tinyagents::host::OpenHumanRunContext::new();+ assert_eq!(+ turn_reasoning_for(&ctx, Some(&config)),+ Some(ReasoningConfig::effort(ReasoningEffort::Medium))+ );+}diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rsindex 5a188879e1..4c02a69a76 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs@@ -280,7 +280,10 @@ async fn run_turn_via_tinyagents_inner(.thread_id.as_deref().map(crate::agent::tinyagents::run_mode::handle_for_thread),- crate::agent::tinyagents::reasoning::turn_reasoning_for(&run_context),+ crate::agent::tinyagents::reasoning::turn_reasoning_for(+ &run_context,+ hosted_root.as_ref().map(|(base, _)| base.config.as_ref()),+ ),);// Fail-closed registry validation gate (issue #4249, Workstream 10 — registry).