The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker.rs,crates
Steven Enamakelff91e429e642
diff --git a/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker.rs b/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker.rsindex fa4dfe8a50..25647a0b3b 100644--- a/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker.rs+++ b/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker.rs@@ -9,7 +9,6 @@ use std::sync::Arc;use tinyagents_harness::tool::discover::{DriverEmbeddingCache, EmbeddingToolRanker};use tinyinference_embeddings::EmbeddingModel;-/// A ranker over `provider` with an in-memory cache; chain/// `.with_cache(cache)` to persist it (see [`embedding_tool_ranker_in`]). The/// cache is keyed by the provider's embedding-space signature, so a modeldiff --git a/crates/openhuman-core/src/inference/embedding_host/README.md b/crates/openhuman-core/src/inference/embedding_host/README.mdindex 79fd05abdf..ae94de35bb 100644--- a/crates/openhuman-core/src/inference/embedding_host/README.md+++ b/crates/openhuman-core/src/inference/embedding_host/README.md@@ -32,17 +32,12 @@ Declared in [`mod.rs`](./mod.rs) and resolved by [`factory.rs`](./factory.rs):| [`rpc.rs`](./rpc.rs) + `rpc/` (`api_keys.rs`, `embed.rs`, `settings.rs`) | The `embeddings` RPC handlers: get/update settings, set/clear API key, embed text, test a connection. || [`schemas.rs`](./schemas.rs) | Controller schemas and thin handlers for the `embeddings` RPC namespace, registered as `all_embeddings_controller_schemas` / `all_embeddings_registered_controllers`. |-## Why the trait lives here, not in the engine+## The model contract lives in TinyInference-`EmbeddingProvider` is defined in `tinymemory_api::host` and only re-exported-by `provider_trait.rs`, because the extracted memory subsystem takes an-`Arc<dyn EmbeddingProvider>` from this host and both sides need to name the-same type. `TinyInferenceEmbeddingProvider` is the adapter that wraps a-TinyInference `EmbeddingModel` (what `factory.rs` and `cloud_adapter.rs`-build) to satisfy that trait. The signature format itself is not-re-derived here: `format_embedding_signature` stays the contract's, so a-vector written before this module existed and one written after land in the-same embedding space.+Callers hold `tinyinference_embeddings::EmbeddingModel` directly (batches are+`&[String]`). The trait, `format_embedding_signature` and `NoopEmbeddingModel`+are owned by `tinyinference-embeddings`; this host only binds credentials,+rate limits and the managed cloud transport onto it.## How it fitsdiff --git a/crates/openhuman-core/src/inference/embedding_host/factory.rs b/crates/openhuman-core/src/inference/embedding_host/factory.rsindex 5cfee2e374..37ada726e9 100644--- a/crates/openhuman-core/src/inference/embedding_host/factory.rs+++ b/crates/openhuman-core/src/inference/embedding_host/factory.rs@@ -3,11 +3,11 @@use std::sync::Arc;use crate::config::Config;-use tinyinference_embeddings::EmbeddingModel;use tinyinference_embeddings::factory::{create_configured_embedding_model, create_default_embedding_model, CredentialResolver,EmbeddingFactorySettings, ManagedModelFactory,};+use tinyinference_embeddings::EmbeddingModel;use super::cloud::OpenHumanCloudEmbeddingModel;diff --git a/crates/openhuman-core/src/inference/embedding_host/rpc.rs b/crates/openhuman-core/src/inference/embedding_host/rpc.rsindex 1507964e3e..5ceee0d365 100644--- a/crates/openhuman-core/src/inference/embedding_host/rpc.rs+++ b/crates/openhuman-core/src/inference/embedding_host/rpc.rs@@ -35,7 +35,9 @@ const LOG_PREFIX: &str = "[embeddings::rpc]";/// Build an embedding provider from the live config — the same construction/// [`embed`] uses, exposed so other domains (e.g. `codegraph`) can obtain a/// provider for `signature()` + direct embedding without a JSON-RPC round-trip.-pub fn provider_from_config(config: &Config) -> anyhow::Result<Box<dyn tinyinference_embeddings::EmbeddingModel>> {+pub fn provider_from_config(+ config: &Config,+) -> anyhow::Result<Box<dyn tinyinference_embeddings::EmbeddingModel>> {build_embedder(config,&config.memory.embedding_provider,