Skip to content

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

test(agent_chat): adapt origin helpers to string request ids

Steven Enamakeldc99621feb64
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs
index 4d41c201e7..c834b49e2c 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs
@@ -87,15 +87,13 @@ fn chat_origin(thread: &str) -> crate::security::turn_origin::AgentTurnOrigin {
crate::security::turn_origin::AgentTurnOrigin::WebChat {
thread_id: thread.into(),
client_id: "client".into(),
- request_id: format!("req-{thread}"),
+ request_id: format!("req-{thread}").into(),
}
}
fn chat_thread(origin: crate::security::turn_origin::AgentTurnOrigin) -> String {
match origin {
- crate::security::turn_origin::AgentTurnOrigin::WebChat { thread_id, .. } => {
- thread_id.into()
- }
+ crate::security::turn_origin::AgentTurnOrigin::WebChat { thread_id, .. } => thread_id,
crate::security::turn_origin::AgentTurnOrigin::DirectChat => "direct".into(),
other => panic!("unexpected origin {other:?}"),
}