The in-memory proposition store embeds with the host's embedding service too - #119
Merged
Merged
Conversation
…ice too It called ai.withDefaultEmbeddingService() directly, so a host's @primary service reached the graph store but not this one. Both stores now resolve through one helper, which logs at startup which service each store uses and whether it is the host's bean or the platform default.
jimador
approved these changes
Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The in-memory proposition store ignored the host's embedding service and always used the platform default. Found by reading the autoconfiguration while checking which embedder
me's memory uses; not an observed failure. Closes #118.Before
@PrimaryEmbeddingService, else the platform default.ai.withDefaultEmbeddingService(), whatever the host provides.Now
storeEmbeddingService: the host's unique or@Primarybean, else the platform default.graph proposition store embeds with '<name>' (<provider>): the application's EmbeddingService bean(orthe platform default embedding service).Not changed, and why: #118 proposed failing at startup when there are several embedding beans and no
@Primary. That is the ordinary case: the platform registers one bean per model it can reach (an OpenAI key alone registers three), and picking among them is whatdefault-embedding-modelis for. Failing there would break every host that doesn't register its own. The KDoc onembeddingServicenow says so.Key change
PropositionStoreEmbeddingServiceTestfails onmain(the host's@Primaryservice is never called) and passes here.