Repository navigation
v0.5.3 - configurable embedding model (dimension, auth, protocol)
Defaults are unchanged: 768 dimensions, no Authorization header, auto protocol. No schema changes and no new migrations; a deployment that sets none of the new keys behaves as before, apart from the two fixes at the end of this list.
- The embedding dimension is configuration, not code.
embed_dim(default768) replaces the literal 768 in the response check, in the backfill dimension guard (backfill_null_embeddings(expected_dim=...)), and in thestatsdry-run. The check was moved, not relaxed: a mismatch still fails fast withexpected N dims (embed_dim), got M. Changing the value on a database that already holds vectors needs a column migration; see Changing the embedding dimension. - Bearer auth for hosted endpoints.
embed_api_key_envholds the name of an environment variable (for exampleOPENROUTER_API_KEY). When that variable is set and non-empty, the plugin sendsAuthorization: Bearer <value>. The value is read at call time and is never logged, stored in config, or included in exception messages. Unset or empty means no header, as before. - Explicit protocol selection.
embed_protocol: openaiuses only/v1/embeddings, so a 401 or an unknown-model error from a hosted endpoint is reported as-is instead of being replaced by a 404 from the Ollama-native fallback.ollamauses only/api/embed.autokeeps the old try-OpenAI-then-Ollama behaviour. Unknown values fall back toautowith a warning. - One embed path. Prefetch, both recall tools, the init-time bulk import, the writer drain and
hermes-pgvector backfillall resolve the endpoint through one helper, so the settings apply the same way everywhere (statsreads the sameembed_dim). Timeouts and retries are unchanged: one attempt on the agent thread, bounded retries on the writer.backfillgains--embed-dim,--embed-api-key-envand--embed-protocol(CLI flag >--configfile > default). - Fixed: embeds broke under hermes-agent's plugin loader. After it runs the package,
plugins/plugin_loader.py:load_plugin_modulebinds every sibling module back onto it, includingsetattr(pkg, "embed", <the embed submodule>). That replaced theembedfunction the provider called, so every embed raisedTypeError: 'module' object is not callable. That is not anEmbeddingError, so nothing degraded gracefully: prefetch and the recall tools raised out of the hook, and the writer dropped each mirrored write and captured turn outright instead of storing it text-only. Call sites now use a private alias the loader never touches. An external patch that re-bindsembedinsideregister()is no longer needed, and does no harm if it is still present.from hermes_pgvector import embedstill works. - Fixed: a read timeout escaped as a bare
TimeoutError. urllib wraps errors raised while sending a request, but a server that accepts the connection and answers slower than the timeout raisesTimeoutErrorfrom the response read. That slipped past everyexcept EmbeddingError: on the agent thread it raised out of prefetch and the recall tools,autonever tried its fallback, and on the writer the retries never ran and the write was dropped instead of being stored text-only. It is now anEmbeddingError, like every other endpoint failure.
Install: pip install -U hermes-memory-pgvector (PyPI: https://pypi.org/project/hermes-memory-pgvector/0.5.3/)