Skip to content

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

feat(tinyhumans): add hosted configuration support

Steven Enamakel5274e24b89a7
diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rs
index 858f89effe..3a7e4c81a8 100644
--- a/crates/openhuman-embed/src/host_internals.rs
+++ b/crates/openhuman-embed/src/host_internals.rs
@@ -133,7 +133,9 @@ pub mod config {
};
pub mod cloud_providers {
pub use openhuman_core::config::schema::cloud_providers::{
- endpoint_host, host_is_builtin_cloud_provider,
+ endpoint_host, host_is_builtin_cloud_provider, register_hosted_auth_style,
+ register_hosted_cloud_preset, AuthStyle, BuiltinCloudProvider,
+ HostedAuthStyleClassifier,
};
}
}
diff --git a/crates/openhuman-tinyhumans/src/hosted_config.rs b/crates/openhuman-tinyhumans/src/hosted_config.rs
new file mode 100644
index 0000000000..b8decfba4d
--- /dev/null
+++ b/crates/openhuman-tinyhumans/src/hosted_config.rs
@@ -0,0 +1,18 @@
+use openhuman_embed::__host::config::schema::cloud_providers::{
+ register_hosted_auth_style, register_hosted_cloud_preset, AuthStyle,
+ BuiltinCloudProvider,
+};
+use std::sync::Arc;
+
+pub(crate) fn register() {
+ register_hosted_cloud_preset(
+ "openhuman",
+ BuiltinCloudProvider {
+ slug: "openhuman",
+ label: "OpenHuman",
+ endpoint: "https://api.openhuman.ai/v1",
+ auth_style: AuthStyle::OpenhumanJwt,
+ },
+ );
+ register_hosted_auth_style(Arc::new(|style| style == AuthStyle::OpenhumanJwt));
+}
diff --git a/crates/openhuman-tinyhumans/src/lib.rs b/crates/openhuman-tinyhumans/src/lib.rs
index 883b7b109b..af32fd74f4 100644
--- a/crates/openhuman-tinyhumans/src/lib.rs
+++ b/crates/openhuman-tinyhumans/src/lib.rs
@@ -80,6 +80,7 @@ pub mod client;
pub mod hosted;
pub(crate) mod inference;
mod install;
+mod hosted_config;
pub mod integrations;
#[cfg(feature = "jev")]
pub mod jev;
diff --git a/crates/openhuman-tinyhumans/src/register.rs b/crates/openhuman-tinyhumans/src/register.rs
index 74d08650f9..f98fa5f7c1 100644
--- a/crates/openhuman-tinyhumans/src/register.rs
+++ b/crates/openhuman-tinyhumans/src/register.rs
@@ -16,6 +16,7 @@ use crate::{channels, client, inference, integrations, memory};
/// Registers every area's hooks with the core.
pub(crate) fn register_all(options: &InstallOptions) {
log::debug!("[tinyhumans] register_all: registering core hooks");
+ crate::hosted_config::register();
client::register(options);
integrations::register(options);
#[cfg(feature = "voice")]