Skip to content

The in-memory proposition store embeds with the host's embedding service too - #119

Merged
jimador merged 1 commit into
mainfrom
fix/proposition-store-uses-host-embedder
Sep 26, 2026
Merged

jimador merged 1 commit into
mainfrom
fix/proposition-store-uses-host-embedder

Conversation

@jasperblues

Copy link
Copy Markdown
Contributor

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

  • Graph store: the host's unique or @Primary EmbeddingService, else the platform default.
  • In-memory store: always ai.withDefaultEmbeddingService(), whatever the host provides.
  • Nothing at startup said which embedder either store holds.

Now

  • Both stores resolve through storeEmbeddingService: the host's unique or @Primary bean, else the platform default.
  • Startup logs graph proposition store embeds with '<name>' (<provider>): the application's EmbeddingService bean (or the 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 what default-embedding-model is for. Failing there would break every host that doesn't register its own. The KDoc on embeddingService now says so.

Key change

fun inMemoryPropositionRepository(ai: Ai, embeddingServices: ObjectProvider<EmbeddingService>): PropositionRepository =
    InMemoryPropositionRepository(storeEmbeddingService("in-memory", ai, embeddingServices))

PropositionStoreEmbeddingServiceTest fails on main (the host's @Primary service is never called) and passes here.

…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
jimador merged commit 7df2106 into main Sep 26, 2026
11 checks passed
@jimador
jimador deleted the fix/proposition-store-uses-host-embedder branch September 26, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The proposition store should embed with the host's embedding service, never a quietly chosen default

2 participants