[GH-ISSUE #534] [Issue]: Vectorize returns Internal Server Error with llama-cpp embeddings #244

Closed
opened 2026-10-20 17:26:43 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @cha1latte on GitHub (May 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/534

Originally assigned to: @cha1latte on GitHub.

Summary

Vectorizing a Lorebook entry fails with Internal Server Error when using a locally hosted llama-cpp embedding model.

Expected behavior

Pressing Vectorize on a Lorebook entry should generate embeddings for the entry successfully when the configured embedding model is reachable and compatible.

Actual behavior

Pressing Vectorize returns Internal Server Error.

The Marinara Engine server logs show OpenAIProvider.embed trying to call .map on an undefined value:

{"level":50,"time":1778183995931,"pid":9,"hostname":"c0b99c11ec18","reqId":"req-s5","err":{"type":"TypeError","message":"Cannot read properties of undefined (reading 'map')","stack":"TypeError: Cannot read properties of undefined (reading 'map')\n    at OpenAIProvider.embed (file:///app/packages/server/dist/services/llm/base-provider.js:404:26)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async Object.<anonymous> (file:///app/packages/server/dist/routes/lorebooks.routes.js:522:32)"},"msg":"Cannot read properties of undefined (reading 'map')"}

Steps to reproduce

  1. Run Marinara Engine 1.5.8 via Podman on Ubuntu 24.04.
  2. Configure a locally hosted embedding model served via llama-cpp.
  3. Use snowflake-arctic-embed-l-v2.0-q8_0.gguf as the embedding model.
  4. Open a Lorebook entry.
  5. Press Vectorize.
  6. Observe that the request fails with Internal Server Error.

Environment

  • Marinara Engine version: 1.5.8
  • Install type: Podman
  • OS + version: Ubuntu 24.04
  • Browser or app shell: Not specified.

Logs, screenshots, or video

Discord report: https://discord.com/channels/1417099416812392641/1502038029379047595

Server log:

{"level":50,"time":1778183995931,"pid":9,"hostname":"c0b99c11ec18","reqId":"req-s5","err":{"type":"TypeError","message":"Cannot read properties of undefined (reading 'map')","stack":"TypeError: Cannot read properties of undefined (reading 'map')\n    at OpenAIProvider.embed (file:///app/packages/server/dist/services/llm/base-provider.js:404:26)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async Object.<anonymous> (file:///app/packages/server/dist/routes/lorebooks.routes.js:522:32)"},"msg":"Cannot read properties of undefined (reading 'map')"}

Additional context

Reporter is using a locally hosted model served via llama-cpp:

snowflake-arctic-embed-l-v2.0-q8_0.gguf

Chatting Mode: none

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @cha1latte on GitHub (May 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/534 Originally assigned to: @cha1latte on GitHub. ## Summary Vectorizing a Lorebook entry fails with `Internal Server Error` when using a locally hosted llama-cpp embedding model. ## Expected behavior Pressing Vectorize on a Lorebook entry should generate embeddings for the entry successfully when the configured embedding model is reachable and compatible. ## Actual behavior Pressing Vectorize returns `Internal Server Error`. The Marinara Engine server logs show `OpenAIProvider.embed` trying to call `.map` on an undefined value: ```json {"level":50,"time":1778183995931,"pid":9,"hostname":"c0b99c11ec18","reqId":"req-s5","err":{"type":"TypeError","message":"Cannot read properties of undefined (reading 'map')","stack":"TypeError: Cannot read properties of undefined (reading 'map')\n at OpenAIProvider.embed (file:///app/packages/server/dist/services/llm/base-provider.js:404:26)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async Object.<anonymous> (file:///app/packages/server/dist/routes/lorebooks.routes.js:522:32)"},"msg":"Cannot read properties of undefined (reading 'map')"} ``` ## Steps to reproduce 1. Run Marinara Engine 1.5.8 via Podman on Ubuntu 24.04. 2. Configure a locally hosted embedding model served via llama-cpp. 3. Use `snowflake-arctic-embed-l-v2.0-q8_0.gguf` as the embedding model. 4. Open a Lorebook entry. 5. Press Vectorize. 6. Observe that the request fails with `Internal Server Error`. ## Environment - Marinara Engine version: 1.5.8 - Install type: Podman - OS + version: Ubuntu 24.04 - Browser or app shell: Not specified. ## Logs, screenshots, or video Discord report: https://discord.com/channels/1417099416812392641/1502038029379047595 Server log: ```json {"level":50,"time":1778183995931,"pid":9,"hostname":"c0b99c11ec18","reqId":"req-s5","err":{"type":"TypeError","message":"Cannot read properties of undefined (reading 'map')","stack":"TypeError: Cannot read properties of undefined (reading 'map')\n at OpenAIProvider.embed (file:///app/packages/server/dist/services/llm/base-provider.js:404:26)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async Object.<anonymous> (file:///app/packages/server/dist/routes/lorebooks.routes.js:522:32)"},"msg":"Cannot read properties of undefined (reading 'map')"} ``` ## Additional context Reporter is using a locally hosted model served via llama-cpp: ```text snowflake-arctic-embed-l-v2.0-q8_0.gguf ``` Chatting Mode: none ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:26:43 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#244
No description provided.