Error: No handler found for delegate type: TEXT_EMBEDDING with OpenAI
Having issues in the chat, when writing the message getting this error:
file:///Users/../.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:46822
throw new Error(`No handler found for delegate type: ${modelKey}`);
^
Error: No handler found for delegate type: TEXT_EMBEDDING
I've added the open api key to .env.
On line 45459 in chunk-GFPVHNVN.js - TEXT_EMBEDDING: "TEXT_EMBEDDING", is being used as the modelKey it seems.
is this right for modelType?
Also tried rm -rf ~/.eliza and restarted.
Hello @Kirstygoodary! Welcome to the elizaOS community. Thank you for opening your first issue; we appreciate your contribution. You are now an elizaOS contributor!
Version: 1.0.0-beta.32
{"level":30,"time":1746193227400,"pid":27521,"hostname":"K","msg":"Building project..."}
{"level":30,"time":1746193227401,"pid":27521,"hostname":"K","msg":"Using build script from package.json"}
$ tsup
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.build.json
CLI tsup v8.4.0
CLI Using tsup config: /Users/../Developer/Cerebra/eliza/tsup.config.ts
CLI Target: esnext
CLI Cleaning output folder
ESM Build start
ESM dist/index.js 19.05 KB
ESM dist/index.js.map 35.74 KB
ESM ⚡️ Build success in 17ms
[2025-05-02 13:40:27] INFO: Build completed successfully with bun
[2025-05-02 13:40:27] INFO: Created directory: /Users/../.eliza
✔ Select your database: › pglite (embedded database)
[2025-05-02 13:40:28] INFO: Selected pglite database
[2025-05-02 13:40:28] INFO: Created PGLite database directory: /Users/../.eliza/db
[2025-05-02 13:40:28] INFO: First time setup. Let's configure your Eliza agent.
[2025-05-02 13:40:28] INFO: Configuration saved to /Users/../.eliza/config.json
[2025-05-02 13:40:28] INFO: Found project by description in package.json
Startup successful!
Go to the dashboard at http://localhost:3000
[2025-05-02 13:40:30] WARN: Failed to load plugin module '@elizaos/plugin-openai' using all available strategies.
[2025-05-02 13:40:30] INFO: Plugin @elizaos/plugin-openai not available, installing into /Users/../Developer/Cerebra/eliza...
[2025-05-02 13:40:30] INFO: Installing plugin: @elizaos/plugin-openai
[2025-05-02 13:40:30] INFO: Prioritizing npm install for @elizaos/[email protected]
[2025-05-02 13:40:30] INFO: Attempting to install plugin :...
[2025-05-02 13:40:30] INFO: Attempting to install package: @elizaos/plugin-openai using bun
[0.02ms] ".env"
bun add v1.2.11 (cb6abd21)
installed @elizaos/[email protected]
[105.00ms] done
[2025-05-02 13:40:31] INFO: Successfully installed @elizaos/plugin-openai from npm registry.
[2025-05-02 13:40:31] INFO: Installation successful for @elizaos/plugin-openai, verifying import...
[2025-05-02 13:40:31] WARN: Failed to load plugin module '@elizaos/plugin-openai' using all available strategies.
[2025-05-02 13:40:31] WARN: Plugin @elizaos/plugin-openai installed : but could not be loaded/verified.
[2025-05-02 13:40:31] ERROR: All installation attempts failed for plugin @elizaos/plugin-openai
[2025-05-02 13:40:31] WARN: Failed to load plugin module '@elizaos/plugin-openai' using all available strategies.
[2025-05-02 13:40:31] ERROR: Failed to load plugin @elizaos/plugin-openai even after installation.
[2025-05-02 13:40:31] WARN: Failed to load or prepare plugin specified by name: @elizaos/plugin-openai
[2025-05-02 13:40:31] INFO: Initializing character
Warning: Example plugin variable is not provided
{"level":40,"time":1746193231118,"pid":27521,"hostname":"K","agentName":"Eliza","agentId":"b850bc30-45f8-0041-a00a-83df46d8555d","msg":"[AgentRuntime][Eliza] No TEXT_EMBEDDING model registered. Skipping embedding dimension setup."}
[2025-05-02 13:40:31] INFO: Name: Eliza
[2025-05-02 13:40:31] INFO: *** Initializing starter plugin ***
[2025-05-02 13:40:31] INFO: *** Starting starter service ***
[2025-05-02 13:43:36] INFO: MESSAGE_RECEIVED event received
{"level":50,"time":1746193416996,"pid":27521,"hostname":"K","message":"(Error) No handler found for delegate type: TEXT_EMBEDDING","stack":["Error: No handler found for delegate type: TEXT_EMBEDDING","at AgentRuntime.useModel (file:///Users/../.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:46822:13)","at AgentRuntime.addEmbeddingToMemory (file:///Users//./.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:46995:37)","at file:///Users/../Developer/Cerebra/eliza/node_modules/@elizaos/plugin-bootstrap/dist/index.js:5396:17","at messageReceivedHandler (file:///Users/../Developer/Cerebra/eliza/node_modules/@elizaos/plugin-bootstrap/dist/index.js:5532:5)","at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","at async events (file:///Users////Developer/Cerebra/eliza/node_modules/@elizaos/plugin-bootstrap/dist/index.js:5724:7)","at async Promise.all (index 1)","at async AgentRuntime.emitEvent (file:///Users/../.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:46872:9)"],"msg":"Failed to generate embedding:"}
[2025-05-02 13:43:36] INFO:
0: "runtime"
1: "message"
2: "callback"
3: "onComplete"
file:///Users/../.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:46822
throw new Error(`No handler found for delegate type: ${modelKey}`);
^
Error: No handler found for delegate type: TEXT_EMBEDDING
at AgentRuntime.useModel (file:///Users/../.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:46822:13)
at AgentRuntime.addEmbeddingToMemory (file:///Users/../.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:47000:37)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Promise.all (index 0)
at async file:///Users/../Developer/Cerebra/eliza/node_modules/@elizaos/plugin-bootstrap/dist/index.js:5395:7
at async messageReceivedHandler (file:///Users/../Developer/Cerebra/eliza/node_modules/@elizaos/plugin-bootstrap/dist/index.js:5534:5)
at async events (file:///Users/../Developer/Cerebra/eliza/node_modules/@elizaos/plugin-bootstrap/dist/index.js:5724:7)
at async Promise.all (index 1)
at async AgentRuntime.emitEvent (file:///Users/../.nvm/versions/node/v23.3.0/lib/node_modules/@elizaos/cli/dist/chunk-GFPVHNVN.js:46872:9)
Node.js v23.3.0
still happening.
Also running into this issue
I was actually able to fix this by:
Running this command align npm permissions sudo chown -R $(whoami) ~/.npm
Running this command to clear cache npm cache clean --force
Running this command to redownload OpenAI Plugin npm install @elizaos/plugin-openai
And restarting my eliza server
The above worked for me on some projects, but I still had the error on others and it turned out I had an older version of the openai plugin in package.json.
So after updating eliza I was getting this error until bumping to the latest version of the openai plugin too.
So in the project npm install @elizaos/[email protected] or whatever the latest version is at your time of reading this and it cleared it for me.
This has been resolved now that we are out of beta, thanks for the comments guys