Updated deprecations message in two constructors (DirectoryWithMetadataDiscovery
and DirectoryWithMetadataPluginDiscovery
to be for removal in 12.x.
I think I'm ok to put back to RTBC in this case.
Testing this locally, I am getting
illegal_argument_exception: Can't update non dynamic settings [[index.analysis.filter.synonyms.type, index.analysis.analyzer.default.filter, index.analysis.filter.synonyms.lenient, index.analysis.analyzer.default.type, index.analysis.analyzer.default.tokenizer, index.analysis.filter.synonyms.synonyms]] for indices [content]
when saving mappings.
Trying a different approach with a aoss mode
setting.
Looks like we will need to sort out ✨ Compatibility with AWS Open Search Serverless (AOSS) Active before we can properly test this. Postponing on that.
Re #10 this was done in 📌 Convert models to plugins, remove hardcoded model string checks Needs review and merged to 1.x.
I have rebased this MR on 1.x
📌 Convert models to plugins, remove hardcoded model string checks Needs review is in so this is unblocked.
There's a long list of models. I guess people can create their own plugins if they want a model we don't include here? https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html
Great improvement. As discussed in slack we can deprecate titan v1 and add titan v2 in the follow-up 📌 Deprecate titan text embedding v1 and add v2 Closed: duplicate
Getting this error locally and it's failing the test:
Exception: Warning: Undefined array key "connector"
Drupal\ai_vdb_provider_opensearch\Form\OpenSearchConfigForm->validateConnectorConfigForm()() (Line: 125)
That looks like the trait in search_api_opensearch
Closing this as duplicate.
As well as committing #3545869: Add a ConnectorFormTrait for re-use → I have commited the provider code here to the 1.x branch of https://www.drupal.org/project/ai_vdb_provider_opensearch → in 📌 Use the official opensearch-php library Active
Please continue with remaining work (such as adding tests!) in https://www.drupal.org/project/ai_vdb_provider_opensearch →
All contribution credits have been added to both issues.
Commited to 1.x. Copied commit credits from 📌 Add support for AI module VDB Provider Active
Committed to 3.x and cherry-picked to 2.x.
Added credits from related issue 📌 Add support for AI module VDB Provider Active
No this is passing, I'm going to split of an issue to just add the trait to the core module for re-use.
Responded to suggestions. I don't think we should be adding new interfaces in this issue just for the sake of autowiring.
Committed to 2.x
There is currently a bug and I can't save contribution records, but I will come back and add them when it's fixed.
kim.pepper → made their first commit to this issue’s fork.
kim.pepper → created an issue.
I added DeprecatedServicePropertyTrait
for the removed $fileSystem property.
Some example code:
Create a plain old value object with some constraint attributes:
use Symfony\Component\Validator\Constraints as Assert;
class Embedding {
public function __construct(
#[Assert\Regex(
pattern: '/^[A-Za-z0-9_-]+:[A-Za-z0-9_-]+$/',
message: 'Id should be in the format "prefix:suffix"',
)]
readonly public string $id,
#[Assert\NotBlank(message: 'Values should not be empty')]
public array $values,
#[Assert\NotBlank(message: 'Metadata should not be empty')]
protected array $metadata,
) {}
Create a Symfony validator that looks for the attributes:
$validator = \Symfony\Component\Validator\Validation::createValidatorBuilder()
->enableAttributeMapping()
->getValidator();
Validate the object:
$embedding = new Embedding(
'model1:embedding1',
[0.1, 0.2, 0.3],
['source' => 'test']
);
/** @var \Symfony\Component\Validator\ConstraintViolationListInterface $violations */
$violations = $validator->validate($embedding);
nit: looks like some of the docblock indentations are incorrect. I assume this would be fixed automatically with phpcbf?
@kingdutch wrote a great blog post on how using Symfony Runtime could help solve some of these issues https://www.alexandervarwijk.com/blog/2025-09-08-proposal-restructuring-...
In this issue, I showed how you can create a value object and validate it using Symfony Validator. It's a pretty clean solution IMO. 📌 Create an 'embedding' object that can be validated Active
Rebase on 11.x
I like @danielveza 's idea of
I wonder if we can turn these into plugins or do something a little nicer than elseifs checking strings.
Thanks @marcus_johansson. Can't speak for @danielveza but I will put my hand up for maintainership.
We should decide on whether to fix the getConnector()
fails or just duplicate some of the code and remove the trait.
I think this is critical as the Titan V1 embedding model doesn't work at all.
Ok great. Thanks for the feedback.
Random fail
I've been granted maintainership of ai_vdb_provider_opensearch so we should just decide when the best time would be to push this MR over there.
Rebased on 11.x
Thanks for your investigation in #12.
Given that, I think we should close this won't fix. Please re-open if there is an alternative approach.
Yep I think your changes are good.
I'm thinking we should get things working here, then push it back to the ai_vdb_provider_opensearch module. Having it as a sub-module while the API is experimental is going to be problematic. We want to keep releases for the search_api_opensearch module fairly stable, while this might need multiple frequent releases until it's stable.
I've reached out to @fago and @Maximillian Mikus in Slack to see if we can be added as maintainers (if you agree) of ai_vdb_provider_opensearch →
kim.pepper → made their first commit to this issue’s fork.
Should we postpone this on 🐛 SearchApiAiSearchBackend should ask configured VDB provider to supply dependencies Active or can we work around it for now?
Added the special chars to config with a default fallback.
I think this is ready to go.
smustgrave → credited kim.pepper → .
I used xdebug to work through this code locally and the test skips \Normalizer::normalize()
because class_exists('Normalizer')
returns false.
However, it successfully converts ö
to oe
in \Drupal\Component\Transliteration\PhpTransliteration::replace()
and so the test passes.
I can't really take this any further until we get some input from the transliteration maintainer (@amateescu). I'm changing the component to transliteration system for that.
Test-only pipeline did not fail as expected.
I made a naive attempt at a test. I'm not proficient any any other language besides English, so would like someone to weigh in and ensure we have the right test coverage here.
Ran the test-only pipeline to see if it fails as expected.
Thanks for the explanation and the MR. This needs a test so we can show it failing before and fixed after.
Looks like a straight forward fix.
Marking this as a feature request.
Added an Embedding object, a validator and unit test. Needs to be integrated into \Drupal\ai\Base\AiVdbProviderClientBase::validateRetrievedEmbedding() still.
kim.pepper → created an issue.
We are duplicating the methods in PluginBase
e.g. getPluginId()
and getPluginDefinition()
and the $configuration property. Why not just extend PluginBase
?
Also, reverted the key module in info.yml change.
IMO it would make sense to stick with the Search API language already well established with the Drupal community.
Committed to 1.x
Committed to 3.x and 2.x. Thanks!
Created 📌 Add a BeforeIndexCreateEvent Active for the new event.
kim.pepper → created an issue.
NW for the failing test:
Drupal\Tests\workspaces\Kernel\WorkspacesFileItemTest::testGenerateSampleValue
RuntimeException: The "field_config" entity type can only be saved in the default workspace.
kim.pepper → created an issue.
We have moved this to it's own project https://www.drupal.org/project/search_api_opensearch_semantic → with the latest from MR !107.
Please continue any work over there.
Marking this issue as Fixed to provide contribution credits.
As per @jonathan1055 comment in #75, 🐛 FileItem::generateSampleValue() should generate files with the actual allowed extensions Needs work I think we should go back to @dww's patch in comment #36 🐛 FileItem::generateSampleValue() should generate files with the actual allowed extensions Needs work .
Created an MR for that.
kim.pepper → made their first commit to this issue’s fork.
Re-ran the tests and they are back to green.
Tests are failing and comments in #9 need to be addressed. See https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-... → for details on what makes an issue RTBC.
Would be good to have an alternative to \Drupal::service() that takes a class name so we can do this:
/**
* @template T of object
* @param class-string<T> $className
* @return T
*/
function createInstance(string $className): object {}
...and have phpstan do the validation.
This was just a reroll so leaving at RTBC
Rebased on 11.x
We will need to update the change record once 🐛 Deprecated file_system_settings_submit() calls settingsSubmit() on wrong class Active is in.
kim.pepper → created an issue.
📌 Move file form hooks to FileFormHooks class Active landed.
Updating the title to better reflect the direction.
I added a vector document and an interface for a vector store.
Updating to include the following params which are also unused:
protected EventDispatcherInterface $eventDispatcher
protected MessengerInterface $messenger
kim.pepper → created an issue.
kim.pepper → created an issue.