AssertionError: Cannot load the "key" entity with NULL ID
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3582074. --> Reported by: [dany.almeida.kairouz](https://www.drupal.org/user/3589426) Related to !1371 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When trying to set up a new search api server (admin/config/search/search-api/add-server) with one of the Ollama emeddings and Milvus VDB provider the 'Vector Database Configuration' form will not load and there will be the following error: AssertionError: Cannot load the "key" entity with NULL ID. in assert() (line 266 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php).</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Install and configure Ollama provider<br> Install and configure Milvus VDB provider<br> Setup the AI settings<br> Setup the provider settings<br> Setup the VDB settings<br> Go to: admin/config/search/search-api/add-server<br> Chose one of the Ollama Embeddings Engine<br> Chose one of the Ollama Tokenizer chat counting model<br> Chose your Vector Database</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Modify loadApiKey and createClient methods to avoid a fatal error.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-introduced-terminology">Introduced terminology</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3> <h3 id="summary-release-notes">Release notes snippet</h3> > Related issue: [Issue #3582742](https://www.drupal.org/node/3582742)
issue