[GH-ISSUE #3317] [Issue]: Memory recall failure #1797

Closed
opened 2026-10-21 05:42:48 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Dinokin on GitHub (Jul 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3317

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Memory Recall fails silently when a chunk surpass a certain size.

Expected behavior

Create the memories.

Actual behavior

No memory is created.

Steps to reproduce

  1. Setup a 3rd party embedding connection
  2. Get a chunk greater than 8k tokens
  3. Try to generate the memories and watch it fail silently.

Environment

  • Marinara Engine version: 2.1.0
  • Install type: Docker
  • OS + version: Docker
  • Browser or app shell: Firefox

Logs, screenshots, or video

{ "level": 40, "time": 1783376092721, "pid": 13, "hostname": "PI-5", "err": { "type": "Error", "message": "Embedding request failed (400): Input 34 is too large for model text-embedding-3-small: estimated 8677 tokens, maximum is 8191.", "stack": "Error: Embedding request failed (400): Input 34 is too large for model text-embedding-3-small: estimated 8677 tokens, maximum is 8191.\n at OpenAIProvider.embed (file:///app/packages/server/dist/services/llm/base-provider.js:489:19)\n at async Object.embed (file:///app/packages/server/dist/services/memory-recall-embedding.js:110:24)\n at async embedMemoryRecallTexts (file:///app/packages/server/dist/services/memory-recall.js:48:38)\n at async chunkAndEmbedMessages (file:///app/packages/server/dist/services/memory-recall.js:181:24)\n at async rebuildMemoryChunks (file:///app/packages/server/dist/services/memory-recall.js:222:5)\n at async Object.<anonymous> (file:///app/packages/server/dist/routes/chats.routes.js:1312:25)" }, "msg": "[memory-recall] Configured embedding source NanoGPT - Embed (text-embedding-3-small) failed" }

Additional context

The error message makes the cause of the issue quite obvious, I think a valid fix would be something like this.

  • Have a setting to allow the customization of how many tokens are allowed on a specific embedding connection.
  • Have the Memory Recall check that size limit and drop the chunk size until it fits. (from the default 5 messages per chunk)
  • If it has only one message and it still doesn't fit, then truncate.

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 @Dinokin on GitHub (Jul 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3317 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Memory Recall fails silently when a chunk surpass a certain size. ## Expected behavior Create the memories. ## Actual behavior No memory is created. ## Steps to reproduce 1. Setup a 3rd party embedding connection 2. Get a chunk greater than 8k tokens 3. Try to generate the memories and watch it fail silently. ## Environment - Marinara Engine version: 2.1.0 - Install type: Docker - OS + version: Docker - Browser or app shell: Firefox ## Logs, screenshots, or video `{ "level": 40, "time": 1783376092721, "pid": 13, "hostname": "PI-5", "err": { "type": "Error", "message": "Embedding request failed (400): Input 34 is too large for model text-embedding-3-small: estimated 8677 tokens, maximum is 8191.", "stack": "Error: Embedding request failed (400): Input 34 is too large for model text-embedding-3-small: estimated 8677 tokens, maximum is 8191.\n at OpenAIProvider.embed (file:///app/packages/server/dist/services/llm/base-provider.js:489:19)\n at async Object.embed (file:///app/packages/server/dist/services/memory-recall-embedding.js:110:24)\n at async embedMemoryRecallTexts (file:///app/packages/server/dist/services/memory-recall.js:48:38)\n at async chunkAndEmbedMessages (file:///app/packages/server/dist/services/memory-recall.js:181:24)\n at async rebuildMemoryChunks (file:///app/packages/server/dist/services/memory-recall.js:222:5)\n at async Object.<anonymous> (file:///app/packages/server/dist/routes/chats.routes.js:1312:25)" }, "msg": "[memory-recall] Configured embedding source NanoGPT - Embed (text-embedding-3-small) failed" }` ## Additional context The error message makes the cause of the issue quite obvious, I think a valid fix would be something like this. - Have a setting to allow the customization of how many tokens are allowed on a specific embedding connection. - Have the Memory Recall check that size limit and drop the chunk size until it fits. (from the default 5 messages per chunk) - If it has only one message and it still doesn't fit, then truncate. ## 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-21 05:42:48 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Jul 7, 2026):

Codex is picking this up for the v2.1.1 issue sweep in draft PR #3331.

<!-- gh-comment-id:4902333262 --> @SpicyMarinara commented on GitHub (Jul 7, 2026): Codex is picking this up for the v2.1.1 issue sweep in draft PR #3331.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 7, 2026):

Fixed in PR #3331 and merged to staging for v2.1.1. Thank you for the report.

<!-- gh-comment-id:4902882826 --> @SpicyMarinara commented on GitHub (Jul 7, 2026): Fixed in PR #3331 and merged to staging for v2.1.1. Thank you for the report.
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#1797
No description provided.