[GH-ISSUE #3696] [Issue]: Routine summary generation returns empty with reasoning models because output is capped at 512 tokens #2000

Closed
opened 2026-10-21 05:44:29 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Generating a routine summary in the Conversation schedule editor consistently fails with “Routine summary was empty” when using a reasoning-enabled model through a Custom OpenAI-compatible endpoint.

The routine-summary request is hard-capped at 512 output tokens even when the connection has a higher Max Output Tokens Override. A reasoning model can consume that entire allowance in hidden reasoning before producing visible content, leaving result.content empty.

Expected behavior

Routine summary generation should return the requested concise sentence when using a reasoning model.

The helper should provide enough output-token headroom for reasoning and should not reduce a higher connection-level max-token override back to 512.

Actual behavior

Marinara displays:

Routine Summary was Empty

The llama.cpp log shows that the routine-summary request generated exactly 512 tokens before stopping:

prompt eval time = 1836.39 ms / 1397 tokens
eval time = 10908.45 ms / 512 tokens
total time = 12744.84 ms / 1909 tokens
stop processing: n_tokens = 1908, truncated = 0

No visible summary was returned.

A direct llama.cpp control test showed the same failure mechanism:

  • Reasoning enabled with a very small output allowance: content was empty while reasoning_content consumed the complete allowance.
  • Reasoning disabled for the identical prompt and allowance: visible content was returned normally.

Steps to reproduce

  1. Start a local OpenAI-compatible llama.cpp server with a reasoning-capable Qwen model and reasoning enabled.
  2. Create a Custom OpenAI-compatible Marinara connection for that endpoint.
  3. Set the connection’s Max Output Tokens Override above 512 (8192 in this reproduction).
  4. Open a Conversation chat and its character schedule editor.
  5. Generate or populate a weekly schedule.
  6. Click the button to generate or refresh the routine summary.
  7. Observe the “Routine Summary was Empty” error and a generation of exactly 512 output tokens in the llama.cpp terminal.

Environment

  • Marinara Engine version: 2.3.1
  • Install type: [FILL IN: source / installer / docker / other]
  • OS + version: [FILL IN]
  • Browser or app shell: [FILL IN]
  • Provider: Custom OpenAI-compatible
  • Backend: llama.cpp b10042
  • Model: Qwen3.6-35B-A3B-MTP GGUF
  • Connection Max Output Tokens Override: 8192
  • Reasoning: enabled

Logs, screenshots, or video

Relevant llama.cpp timing output:

prompt eval time = 1836.39 ms / 1397 tokens
eval time = 10908.45 ms / 512 tokens
total time = 12744.84 ms / 1909 tokens
draft acceptance = 0.77694 (310 accepted / 399 generated)
stop processing: n_tokens = 1908, truncated = 0

Additional context

The current routine-summary helper contains:

maxTokens: Math.min(provider.maxTokensOverrideValue ?? 512, 512)

This always caps the request at 512, including when maxTokensOverrideValue is higher:

https://github.com/Pasta-Devs/Marinara-Engine/blob/staging/packages/server/src/services/conversation/schedule.service.ts#L289-L319

There is an existing fix for the same failure class in character “About Me” generation. Its source explains that the previous 512-token cap could be consumed entirely by thinking, and it now uses a 4096-token ceiling plus low reasoning effort:

https://github.com/Pasta-Devs/Marinara-Engine/blob/staging/packages/server/src/routes/characters.routes.ts#L723-L734

PR #739 also addressed empty scene summaries from reasoning-heavy models by honoring the connection max-token override:

https://github.com/Pasta-Devs/Marinara-Engine/pull/739

A possible narrow fix would be to follow those precedents:

  • Raise the default routine-summary allowance to 4096.
  • Honor a configured connection max-token override instead of clamping it back to 512.
  • Request low reasoning effort for this short helper task.
  • Add a focused regression assertion for the default and connection-override token budgets.

The temporary workaround is restarting llama.cpp with --reasoning off while generating the summary.

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 @Nekuromu on GitHub (Jul 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3696 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Generating a routine summary in the Conversation schedule editor consistently fails with “Routine summary was empty” when using a reasoning-enabled model through a Custom OpenAI-compatible endpoint. The routine-summary request is hard-capped at 512 output tokens even when the connection has a higher Max Output Tokens Override. A reasoning model can consume that entire allowance in hidden reasoning before producing visible content, leaving `result.content` empty. ## Expected behavior Routine summary generation should return the requested concise sentence when using a reasoning model. The helper should provide enough output-token headroom for reasoning and should not reduce a higher connection-level max-token override back to 512. ## Actual behavior Marinara displays: > Routine Summary was Empty The llama.cpp log shows that the routine-summary request generated exactly 512 tokens before stopping: ```text prompt eval time = 1836.39 ms / 1397 tokens eval time = 10908.45 ms / 512 tokens total time = 12744.84 ms / 1909 tokens stop processing: n_tokens = 1908, truncated = 0 ``` No visible summary was returned. A direct llama.cpp control test showed the same failure mechanism: - Reasoning enabled with a very small output allowance: `content` was empty while `reasoning_content` consumed the complete allowance. - Reasoning disabled for the identical prompt and allowance: visible content was returned normally. ## Steps to reproduce 1. Start a local OpenAI-compatible llama.cpp server with a reasoning-capable Qwen model and reasoning enabled. 2. Create a Custom OpenAI-compatible Marinara connection for that endpoint. 3. Set the connection’s Max Output Tokens Override above 512 (8192 in this reproduction). 4. Open a Conversation chat and its character schedule editor. 5. Generate or populate a weekly schedule. 6. Click the button to generate or refresh the routine summary. 7. Observe the “Routine Summary was Empty” error and a generation of exactly 512 output tokens in the llama.cpp terminal. ## Environment - Marinara Engine version: 2.3.1 - Install type: [FILL IN: source / installer / docker / other] - OS + version: [FILL IN] - Browser or app shell: [FILL IN] - Provider: Custom OpenAI-compatible - Backend: llama.cpp b10042 - Model: Qwen3.6-35B-A3B-MTP GGUF - Connection Max Output Tokens Override: 8192 - Reasoning: enabled ## Logs, screenshots, or video Relevant llama.cpp timing output: ```text prompt eval time = 1836.39 ms / 1397 tokens eval time = 10908.45 ms / 512 tokens total time = 12744.84 ms / 1909 tokens draft acceptance = 0.77694 (310 accepted / 399 generated) stop processing: n_tokens = 1908, truncated = 0 ``` ## Additional context The current routine-summary helper contains: ```ts maxTokens: Math.min(provider.maxTokensOverrideValue ?? 512, 512) ``` This always caps the request at 512, including when `maxTokensOverrideValue` is higher: https://github.com/Pasta-Devs/Marinara-Engine/blob/staging/packages/server/src/services/conversation/schedule.service.ts#L289-L319 There is an existing fix for the same failure class in character “About Me” generation. Its source explains that the previous 512-token cap could be consumed entirely by thinking, and it now uses a 4096-token ceiling plus low reasoning effort: https://github.com/Pasta-Devs/Marinara-Engine/blob/staging/packages/server/src/routes/characters.routes.ts#L723-L734 PR #739 also addressed empty scene summaries from reasoning-heavy models by honoring the connection max-token override: https://github.com/Pasta-Devs/Marinara-Engine/pull/739 A possible narrow fix would be to follow those precedents: - Raise the default routine-summary allowance to 4096. - Honor a configured connection max-token override instead of clamping it back to 512. - Request low reasoning effort for this short helper task. - Add a focused regression assertion for the default and connection-override token budgets. The temporary workaround is restarting llama.cpp with `--reasoning off` while generating the summary. ## 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:44:29 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
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#2000
No description provided.