Conversation
f6ed659 to
f1b3c13
Compare
|
alongosz
approved these changes
Feb 25, 2026
konradoboza
approved these changes
Feb 25, 2026
barw4
approved these changes
Feb 25, 2026
alongosz
approved these changes
Feb 25, 2026
Member
|
Merging to unblock ibexa/taxonomy#396. |
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.



Description:
This PR extends EmbeddingProviderResolverInterface with a new method
resolveByModelIdentifier(string $modelIdentifier): EmbeddingProviderInterfaceand adds its implementation inIbexa\Core\Search\Embedding\EmbeddingProviderResolver. NowEmbeddingProviderResolver::resolve()always resolves the provider from the global default embedding modeldefault_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_modelIn 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 instanceExisting 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: