Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(openhuman-embed): use controlled chat reply in turn dispatch

Steven Enamakel4904aafff909
diff --git a/crates/openhuman-embed/src/turn.rs b/crates/openhuman-embed/src/turn.rs
index a7e44df83d..15bff04c06 100644
--- a/crates/openhuman-embed/src/turn.rs
+++ b/crates/openhuman-embed/src/turn.rs
@@ -663,7 +663,7 @@ async fn dispatch(
let turn: futures_box::BoxFuture<'_, Result<AgentReply, CoreError>> =
Box::pin(async move {
use openhuman_core::inference::host_runtime::ops::{
- AgentChatTarget, agent_chat_for,
+ AgentChatTarget, agent_chat_reply_for_controlled,
};
let mut config = inner.config.clone();
let route = openhuman_core::config::schema::EphemeralRoute::from_params(
@@ -683,7 +683,7 @@ async fn dispatch(
observer: options.observer.as_ref(),
attachments: &options.attachments,
};
- let outcome = agent_chat_for(
+ let outcome = agent_chat_reply_for_controlled(
&mut config,
target,
&request.message,
@@ -694,7 +694,8 @@ async fn dispatch(
route,
options.chat_env,
)
- .await;
+ .await
+ .map(|reply| reply.into_outcome());
// The shape preserves provider charges and root-call totals
// absent from normalized session usage. Overlay before both
// meter and outcome reads, retaining child/session metadata.