Skip to content

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

refactor(core): update openhuman model request creation

Steven Enamakelc6174f998007
diff --git a/crates/openhuman-core/src/tinymemes/inference.rs b/crates/openhuman-core/src/tinymemes/inference.rs
index 0d6bc2825d..48f9f85c03 100644
--- a/crates/openhuman-core/src/tinymemes/inference.rs
+++ b/crates/openhuman-core/src/tinymemes/inference.rs
@@ -34,7 +34,8 @@ pub(crate) async fn complete(
// `without_reasoning` flag; a BYOK route to OpenRouter needs
// OpenRouter's own switch. Other endpoints are left untouched, since an
// unknown field can be rejected.
- let mut request = provider::openhuman_backend_model::without_reasoning(
+ let mut request = crate::inference::registry::provider_request_without_reasoning(
+ crate::inference::provider::factory::PROVIDER_OPENHUMAN,
ModelRequest::new(vec![Message::system(system), Message::user(user)])
.with_temperature(TEMPERATURE),
);
diff --git a/crates/openhuman-core/src/web_chat/suggestions.rs b/crates/openhuman-core/src/web_chat/suggestions.rs
index 301951d429..72d7d8eb17 100644
--- a/crates/openhuman-core/src/web_chat/suggestions.rs
+++ b/crates/openhuman-core/src/web_chat/suggestions.rs
@@ -207,7 +207,8 @@ fn build_suggestions_request(user_message: &str, assistant_message: &str) -> Mod
format!("User's last message:\n{user_message}\n\nAssistant's reply:\n{assistant_message}");
// A 2-3 item JSON list needs no thinking: with reasoning on, the managed
// default spent 700-1,200 reasoning tokens and 7-14 s on this call.
- crate::inference::provider::openhuman_backend_model::without_reasoning(
+ crate::inference::registry::provider_request_without_reasoning(
+ crate::inference::provider::factory::PROVIDER_OPENHUMAN,
ModelRequest::new(vec![
Message::system(SUGGESTIONS_SYSTEM_PROMPT),
Message::user(user_prompt),
diff --git a/crates/openhuman-core/src/web_chat/turn_close.rs b/crates/openhuman-core/src/web_chat/turn_close.rs
index 7648c5ae3e..f52e578b55 100644
--- a/crates/openhuman-core/src/web_chat/turn_close.rs
+++ b/crates/openhuman-core/src/web_chat/turn_close.rs
@@ -235,7 +235,8 @@ fn close_request(turn: &StoppedTurn<'_>, evidence: &Evidence) -> ModelRequest {
system.push_str("\n\n");
system.push_str(&directive);
}
- provider::openhuman_backend_model::without_reasoning(
+ crate::inference::registry::provider_request_without_reasoning(
+ crate::inference::provider::factory::PROVIDER_OPENHUMAN,
ModelRequest::new(vec![Message::system(system), Message::user(user_prompt)])
.with_temperature(0.2),
)