Skip to content

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

refactor(inference): widen registry visibility and re-export host types

Steven Enamakel571010d9f50d
diff --git a/crates/openhuman-core/src/inference/registry.rs b/crates/openhuman-core/src/inference/registry.rs
index d37e716cb7..c4708881fa 100644
--- a/crates/openhuman-core/src/inference/registry.rs
+++ b/crates/openhuman-core/src/inference/registry.rs
@@ -81,7 +81,7 @@ pub(crate) fn provider_overrides(extensions: Option<Extensions>) -> ProviderOver
)
}
-fn ambient_provider_overrides() -> ProviderOverrides<ProviderContext> {
+pub(crate) fn ambient_provider_overrides() -> ProviderOverrides<ProviderContext> {
ProviderOverrides::new(
|provider_id| CHAT_MODELS.get(provider_id),
|provider_id| EMBEDDINGS.get(provider_id),
@@ -168,7 +168,7 @@ pub fn register_chat_model(provider_id: impl Into<String>, entry: ChatModelEntry
pub fn register_chat_model_in(
extensions: &Extensions,
provider_id: impl Into<String>,
- entry: ChatModelEntry,
+ entry: ChatModelEntry<ProviderContext>,
) {
CHAT_MODELS.register_in(extensions, provider_id, entry);
}
@@ -425,7 +425,7 @@ pub fn register_catalog(provider_id: impl Into<String>, entry: CatalogEntry<Prov
pub fn register_catalog_in(
extensions: &Extensions,
provider_id: impl Into<String>,
- entry: CatalogEntry,
+ entry: CatalogEntry<ProviderContext>,
) {
CATALOGS.register_in(extensions, provider_id, entry);
}
diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rs
index f543bf09a5..564e8c3e5c 100644
--- a/crates/openhuman-embed/src/host_internals.rs
+++ b/crates/openhuman-embed/src/host_internals.rs
@@ -377,9 +377,10 @@ pub mod inference_registry {
register_embedding_in, resolve_provider_model, unregister_backend_error_classifier,
unregister_catalog, unregister_chat_model, unregister_embedding,
BackendErrorClassification, BackendErrorClassifier, BackendErrorKind, BoxFuture,
- CatalogEntry, CatalogLimits, CatalogListing, CatalogRequest, ChatModelEntry,
- ChatModelFactory, ChatModelRequest, ConfigNormalizer, EmbeddingFactory, EmbeddingRequest,
- ProviderContext, ProviderModelHooks, ReadinessProbe,
+ CatalogCallContext, CatalogEntry, CatalogHostRequest, CatalogLimits, CatalogRequest,
+ ChatModelEntry, ChatModelFactory, ChatModelRequest, ConfigNormalizer, EmbeddingCallContext,
+ EmbeddingFactory, EmbeddingRequest, ProviderContext, ProviderModelMetadata,
+ ProviderOverrides, ReadinessProbe,
};
}