[GH-ISSUE #6455] [Issue]: Schedule generation hides connection details and silently fails on malformed JSON #3615

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

Originally created by @SpicyMarinara on GitHub (Sep 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6455

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The Schedule generation control does not make clear which LLM connection it uses, and it may fail silently when the generated response contains malformed JSON.

Expected behavior

The UI should identify the connection used for Schedule generation and ideally allow the user to select it. If generation fails, the Engine should display a clear in-engine error explaining the failure instead of leaving the schedule blank.

Actual behavior

The connection used by the Schedule generation control is unclear. Schedule generation stops after a malformed JSON error, but the Engine provides no visible error and the schedule remains blank after the loading spinner stops.

Steps to reproduce

  1. Open a character's Schedule generation control.
  2. Trigger Schedule generation.
  3. Observe that the connection used is not clearly identified or selectable.
  4. When the generated response cannot be parsed as valid JSON, observe that generation stops and the schedule remains blank without an in-engine error.

Environment

  • Marinara Engine version: 2.4.6 (build 2.4.6+f66abf7eddb7, commit f66abf7edd)
  • Install type: Not provided
  • OS + version: Server: Windows 10.0.26200 (x64); Client: Windows 10.0
  • Browser or app shell: Firefox 156.0 via browser (Mozilla/5.0 Windows NT 10.0; Win64; x64; rv:156.0)

Logs, screenshots, or video

Terminal log: SyntaxError: Expected ',' or ']' after array element in JSON at position 3025 (line 41 column 75). The stack trace references parseRepairedJson, parseScheduleResponse, generateCharacterSchedule, and conversation.routes.js, ending with '[schedule] Draft generation failed'. Attachment: https://cdn.discordapp.com/attachments/1551268763775664278/1551268764220137594/image.png?ex=6ab15b1e&is=6ab0099e&hm=5f02cfa233efa8a7b4feecd8a05cd753b2eb6624594f957fbcd4e9a8713e9e10&

Additional context

Support diagnostics reported the active connection as 'LinkAPI - gemini-3.1-flash-lite-image', with provider 'image_generation' and model 'gemini-3.1-flash-lite-image'. The report does not establish whether this is the connection used by Schedule generation.

Discord thread: Schedule Generation - (1) What Connection is Used / (2) Silently Failing
Discord thread link: https://discord.com/channels/1417099416812392641/1551268763775664278
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (3 messages)
[2026-09-20T16:28:14.464Z] DSBwizzard: Marinara Engine diagnostics
Version: 2.4.6
Build: 2.4.6+f66abf7eddb7
Commit: f66abf7eddb7
Server OS: Windows 10.0.26200 (x64)
Server memory: heap 92.3 / 2240 MiB; RSS 186.8 MiB
Background wake lock: not reported
Last detected freeze: none detected
Previous session: ended without shutting down - last alive 2026-09-20T13:52:21.471Z (up 2m, RSS 309.3 MiB); device rebooted before next launch: unknown
Sessions ended without shutdown: 10 recorded
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:156.0) Gecko/20100101 Firefox/156.0
Client runtime: {"build":"2.4.6+f66abf7eddb7","page":"mua0qzr3-0f9z7vya","persistence":"local","navigation":"reload","standalone":false,"view":[702,0,0,0],"events":[{"at":1789912222658,"page":"mu9viu2q-sr720skm","build":"2.4.6+f66abf7eddb7","kind":"page-start","view":[990,0,0,0]},{"at":1789921001343,"page":"mua0qzr3-0f9z7vya","build":"2.4.6+f66abf7eddb7","kind":"page-start","view":[702,0,0,0]}]}
GPU: ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0), or similar
Active connection: LinkAPI - gemini-3.1-flash-lite-image
Connection provider: image_generation
LLM model: gemini-3.1-flash-lite-image
Mari last acted on: none recorded this session

---

First, what connection does this button use? It doesn't seem clear to me, as a user. Is this the Engine's default LLM connection? Could this perhaps have a dropdown for selecting what Connection to use to generate this character's Schedule? (Or at least tell me, the user, what connection it uses to generate the Schedule?)

Second, whatever connection it is using is failing for me. It shows the failure is malformed JSON, from the info within my terminal output (below), but there is no indication to me in the Engine why it didn't create a schedule. Things just remain blank after it stops spinning. Could this failure be presented to me in-engine somehow so this can be easily diagnosed and not leave me wondering what happened?

Terminal output for reference: `{"level":50,"time":1789921247096,"pid":22832,"hostname":"LAPTOP-4MHKHHLC","err":{"type":"SyntaxError","message":"Expected ',' or ']' after array element in JSON at position 3025 (line 41 column 75)","stack":"SyntaxError: Expected ',' or ']' after array element in JSON at position 3025 (line 41 column 75)\n    at JSON.parse (<anonymous>)\n    at parseRepairedJson (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/services/conversation/schedule.service.js:305:21)\n    at parseScheduleResponse (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/services/conversation/schedule.service.js:266:18)\n    at generateCharacterSchedule (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/services/conversation/schedule.service.js:188:20)\n    at async Object.<anonymous> (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/routes/conversation.routes.js:387:34)"},"msg":"[schedule] Draft generation failed"`

[attached image 1: https://cdn.discordapp.com/attachments/1551268763775664278/1551268764220137594/image.png?ex=6ab15b1e&is=6ab0099e&hm=5f02cfa233efa8a7b4feecd8a05cd753b2eb6624594f957fbcd4e9a8713e9e10&]
[Discord message: https://discord.com/channels/1417099416812392641/1551268763775664278/1551268763775664278]

[2026-09-20T16:28:16.105Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1551268763775664278/1551268770658648217]

[2026-09-20T16:29:41.963Z] DSBwizzard: FYI - I *love* that Schedules are higher-class citizens, given to the character on their card now. This means I can more easily access them in other systems (agents 👀) and implies they may be used elsewhere in the stock engine later on. ❤️
[Discord message: https://discord.com/channels/1417099416812392641/1551268763775664278/1551269130773069967]

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 @SpicyMarinara on GitHub (Sep 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6455 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The Schedule generation control does not make clear which LLM connection it uses, and it may fail silently when the generated response contains malformed JSON. ## Expected behavior The UI should identify the connection used for Schedule generation and ideally allow the user to select it. If generation fails, the Engine should display a clear in-engine error explaining the failure instead of leaving the schedule blank. ## Actual behavior The connection used by the Schedule generation control is unclear. Schedule generation stops after a malformed JSON error, but the Engine provides no visible error and the schedule remains blank after the loading spinner stops. ## Steps to reproduce 1. Open a character's Schedule generation control. 2. Trigger Schedule generation. 3. Observe that the connection used is not clearly identified or selectable. 4. When the generated response cannot be parsed as valid JSON, observe that generation stops and the schedule remains blank without an in-engine error. ## Environment - Marinara Engine version: 2.4.6 (build 2.4.6+f66abf7eddb7, commit f66abf7eddb7) - Install type: Not provided - OS + version: Server: Windows 10.0.26200 (x64); Client: Windows 10.0 - Browser or app shell: Firefox 156.0 via browser (Mozilla/5.0 Windows NT 10.0; Win64; x64; rv:156.0) ## Logs, screenshots, or video Terminal log: SyntaxError: Expected ',' or ']' after array element in JSON at position 3025 (line 41 column 75). The stack trace references parseRepairedJson, parseScheduleResponse, generateCharacterSchedule, and conversation.routes.js, ending with '[schedule] Draft generation failed'. Attachment: https://cdn.discordapp.com/attachments/1551268763775664278/1551268764220137594/image.png?ex=6ab15b1e&is=6ab0099e&hm=5f02cfa233efa8a7b4feecd8a05cd753b2eb6624594f957fbcd4e9a8713e9e10& ## Additional context Support diagnostics reported the active connection as 'LinkAPI - gemini-3.1-flash-lite-image', with provider 'image_generation' and model 'gemini-3.1-flash-lite-image'. The report does not establish whether this is the connection used by Schedule generation. Discord thread: Schedule Generation - (1) What Connection is Used / (2) Silently Failing Discord thread link: https://discord.com/channels/1417099416812392641/1551268763775664278 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (3 messages)</summary> ```text [2026-09-20T16:28:14.464Z] DSBwizzard: Marinara Engine diagnostics Version: 2.4.6 Build: 2.4.6+f66abf7eddb7 Commit: f66abf7eddb7 Server OS: Windows 10.0.26200 (x64) Server memory: heap 92.3 / 2240 MiB; RSS 186.8 MiB Background wake lock: not reported Last detected freeze: none detected Previous session: ended without shutting down - last alive 2026-09-20T13:52:21.471Z (up 2m, RSS 309.3 MiB); device rebooted before next launch: unknown Sessions ended without shutdown: 10 recorded Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:156.0) Gecko/20100101 Firefox/156.0 Client runtime: {"build":"2.4.6+f66abf7eddb7","page":"mua0qzr3-0f9z7vya","persistence":"local","navigation":"reload","standalone":false,"view":[702,0,0,0],"events":[{"at":1789912222658,"page":"mu9viu2q-sr720skm","build":"2.4.6+f66abf7eddb7","kind":"page-start","view":[990,0,0,0]},{"at":1789921001343,"page":"mua0qzr3-0f9z7vya","build":"2.4.6+f66abf7eddb7","kind":"page-start","view":[702,0,0,0]}]} GPU: ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0), or similar Active connection: LinkAPI - gemini-3.1-flash-lite-image Connection provider: image_generation LLM model: gemini-3.1-flash-lite-image Mari last acted on: none recorded this session --- First, what connection does this button use? It doesn't seem clear to me, as a user. Is this the Engine's default LLM connection? Could this perhaps have a dropdown for selecting what Connection to use to generate this character's Schedule? (Or at least tell me, the user, what connection it uses to generate the Schedule?) Second, whatever connection it is using is failing for me. It shows the failure is malformed JSON, from the info within my terminal output (below), but there is no indication to me in the Engine why it didn't create a schedule. Things just remain blank after it stops spinning. Could this failure be presented to me in-engine somehow so this can be easily diagnosed and not leave me wondering what happened? Terminal output for reference: `{"level":50,"time":1789921247096,"pid":22832,"hostname":"LAPTOP-4MHKHHLC","err":{"type":"SyntaxError","message":"Expected ',' or ']' after array element in JSON at position 3025 (line 41 column 75)","stack":"SyntaxError: Expected ',' or ']' after array element in JSON at position 3025 (line 41 column 75)\n at JSON.parse (<anonymous>)\n at parseRepairedJson (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/services/conversation/schedule.service.js:305:21)\n at parseScheduleResponse (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/services/conversation/schedule.service.js:266:18)\n at generateCharacterSchedule (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/services/conversation/schedule.service.js:188:20)\n at async Object.<anonymous> (file:///C:/Users/dsbwi/Desktop/Marinara-ENgine-LatestStaging/packages/server/dist/routes/conversation.routes.js:387:34)"},"msg":"[schedule] Draft generation failed"` [attached image 1: https://cdn.discordapp.com/attachments/1551268763775664278/1551268764220137594/image.png?ex=6ab15b1e&is=6ab0099e&hm=5f02cfa233efa8a7b4feecd8a05cd753b2eb6624594f957fbcd4e9a8713e9e10&] [Discord message: https://discord.com/channels/1417099416812392641/1551268763775664278/1551268763775664278] [2026-09-20T16:28:16.105Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1551268763775664278/1551268770658648217] [2026-09-20T16:29:41.963Z] DSBwizzard: FYI - I *love* that Schedules are higher-class citizens, given to the character on their card now. This means I can more easily access them in other systems (agents 👀) and implies they may be used elsewhere in the stock engine later on. ❤️ [Discord message: https://discord.com/channels/1417099416812392641/1551268763775664278/1551269130773069967] ``` </details> ## 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 06:05:08 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 20, 2026):

I am taking this in draft PR #6457 (@SpicyMarinara), alongside #6449. I will expose the schedule connection/model and keep generation failures visible in the editor without replacing the current draft.

<!-- gh-comment-id:5751251085 --> @SpicyMarinara commented on GitHub (Sep 20, 2026): I am taking this in draft PR #6457 (@SpicyMarinara), alongside #6449. I will expose the schedule connection/model and keep generation failures visible in the editor without replacing the current draft.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 20, 2026):

Fixed in #6457 and merged to staging after all required checks and CodeRabbit review completed. The schedule editor now exposes connection selection and persistent generation errors, rejects malformed or incomplete days, and protects drafts and settings during generation and cancellation.

<!-- gh-comment-id:5752129186 --> @SpicyMarinara commented on GitHub (Sep 20, 2026): Fixed in #6457 and merged to staging after all required checks and CodeRabbit review completed. The schedule editor now exposes connection selection and persistent generation errors, rejects malformed or incomplete days, and protects drafts and settings during generation and cancellation.
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#3615
No description provided.