Skip to content

IBX-11397: Added resolving embedding provider by model identifier for taxonomy embeddings#714

Merged
alongosz merged 1 commit into4.6from
embedding-provider-by-model
Feb 25, 2026
Merged

IBX-11397: Added resolving embedding provider by model identifier for taxonomy embeddings#714
alongosz merged 1 commit into4.6from
embedding-provider-by-model

Conversation

@mikadamczyk
Copy link
Contributor

@mikadamczyk mikadamczyk commented Feb 25, 2026

🎫 Issue IBX-11397

Description:

This PR extends EmbeddingProviderResolverInterface with a new method resolveByModelIdentifier(string $modelIdentifier): EmbeddingProviderInterface and adds its implementation in Ibexa\Core\Search\Embedding\EmbeddingProviderResolver. Now EmbeddingProviderResolver::resolve() always resolves the provider from the global default embedding model default_embedding_model.
This becomes problematic when a feature uses a different embedding model than the global default, for example taxonomy embeddings configured via: taxonomy.search.default_embedding_model

In such a case, the caller may pass a model name for Gemini, but the resolver still returns the provider from the global default model (for example, OpenAI), which leads to mismatched provider and model combinations and runtime failures.

This change enables callers to resolve an embedding provider using the provider configured for a specific embedding model identifier, from embedding_models, instead of relying on the global default provider. This is especially needed for taxonomy embeddings, where model selection can be overridden independently from the global default embedding model.

This API is introduced to be used by consumers that operate on a specific embedding model configuration (taxonomy embedding generation), so they can resolve the correct provider in a deterministic way:
model identifier -> embedding_models[<id>].embedding_provider -> provider instance

Existing callers using resolve() are unaffected. The new method is additive and intended for cases where the embedding model differs from the global default

This method will be used in taxonomy embedding generation to resolve the provider based on taxonomy.search.default_embedding_model, avoiding provider and model mismatch when taxonomy embeddings use a non-default provider (e.g., Gemini).

For QA:

Documentation:

@mikadamczyk mikadamczyk changed the title Resolve embedding provider by model identifier for taxonomy embeddings IBX-11397: Added resolving embedding provider by model identifier for taxonomy embeddings Feb 25, 2026
@mikadamczyk mikadamczyk force-pushed the embedding-provider-by-model branch from f6ed659 to f1b3c13 Compare February 25, 2026 08:50
@sonarqubecloud
Copy link

@mikadamczyk mikadamczyk requested a review from a team February 25, 2026 09:29
@ibexa-workflow-automation-1 ibexa-workflow-automation-1 bot requested review from Steveb-p, ViniTou, alongosz, barw4, ciastektk, konradoboza, tbialcz and wiewiurdp and removed request for a team February 25, 2026 09:29
@alongosz
Copy link
Member

Merging to unblock ibexa/taxonomy#396.

@alongosz alongosz merged commit 003421f into 4.6 Feb 25, 2026
34 checks passed
@alongosz alongosz deleted the embedding-provider-by-model branch February 25, 2026 11:33
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.

5 participants