In plumbing through the Security Assistant Knowledge Base API integration tests (https://github.com/elastic/kibana/pull/192665), I ended up having to add support for a modelId override to our API's when interacting with the Knowledge Base as we currently use the ml.trainedModelsProvider.getELSER() helper (which does not return pt_tiny_elser in test environments) to get the modelId for setting up ELSER, ingest pipelines, retrievers, etc. The O11y Assistant folks also have an open issue (https://github.com/elastic/kibana/issues/192757) to do the same.
It would be nice if the getELSER() helper function below could either be overridden to return pt_tiny_elser in our test environments, or if our test environments could be updated such that the function returns pt_tiny_elser.
[!NOTE]
Perhaps the need for this will go away or change somewhat when we switch from managing ELSER via the trainedModels API to using a default inference endpoint (https://github.com/elastic/kibana/issues/192461).
In plumbing through the Security Assistant Knowledge Base API integration tests (https://github.com/elastic/kibana/pull/192665), I ended up having to add support for a
modelId
override to our API's when interacting with the Knowledge Base as we currently use theml.trainedModelsProvider.getELSER()
helper (which does not returnpt_tiny_elser
in test environments) to get themodelId
for setting up ELSER, ingest pipelines, retrievers, etc. The O11y Assistant folks also have an open issue (https://github.com/elastic/kibana/issues/192757) to do the same.It would be nice if the
getELSER()
helper function below could either be overridden to returnpt_tiny_elser
in our test environments, or if our test environments could be updated such that the function returnspt_tiny_elser
.https://github.com/elastic/kibana/blob/68a924411b9d88eb39b8f0b47b4ee22acab3f729/x-pack/plugins/ml/server/models/model_management/models_provider.ts#L542-L552