[GH-ISSUE #1349] Slurp2: fixed output-token limits ignore the connection's max tokens, so reasoning models (glm5) fail #690

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

Originally created by @Gunterlie on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1349

Originally assigned to: @Gunterlie on GitHub.

Report (Discord, Slurp 0.3.31)

ylliselmanii: still getting a cut-off {"level":40,... log line. LocalYokel: on glm5 it failed until switching back to deepseek; "something about max tokens but mine were set to 128k". Bloo quoted what is probably the same line: [slurp] Image prompt rewrite unusable (<reason>); sending the capped draft. The full line is not available.

Root cause

slp-image-prompt-rewrite.ts sends a fixed maxTokens: 4_096 and never reads the connection's stored max-tokens setting (defaultParameters.maxTokens). A reasoning model spends the 4096 on thinking and returns an empty or cut-off answer. The failure reasons then say "raise the connection's max output tokens", but raising it changes nothing. Other Slurp calls already use resolveStoredMaxTokens + clampGenerationMaxOutputTokens.

Fixed-limit calls without the helper (this fix covers all)

  • base/media/slp-image-prompt-rewrite.ts (4096) — the reported path
  • features/creators/slp-creator-page-service.ts (4000)
  • features/creators/slp-page-style-service.ts (4000)
  • features/media/slp-appearance-service.ts (500)
  • features/audience/slp-fan-voice-draft-service.ts (400)
  • features/assist/slp-stir-service.ts (3072)
  • features/assist/slp-assist-service.ts (2048)
    (slp-conversation-schedule-generation.ts already reads the provider override; left as is.)

Warnings that mention max tokens: only the rewrite failure reasons (empty response, "looks cut off"). The exact log line from the user is still unconfirmed.

Originally created by @Gunterlie on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1349 Originally assigned to: @Gunterlie on GitHub. ## Report (Discord, Slurp 0.3.31) ylliselmanii: still getting a cut-off `{"level":40,...` log line. LocalYokel: on glm5 it failed until switching back to deepseek; "something about max tokens but mine were set to 128k". Bloo quoted what is probably the same line: `[slurp] Image prompt rewrite unusable (<reason>); sending the capped draft`. The full line is not available. ## Root cause `slp-image-prompt-rewrite.ts` sends a fixed `maxTokens: 4_096` and never reads the connection's stored max-tokens setting (`defaultParameters.maxTokens`). A reasoning model spends the 4096 on thinking and returns an empty or cut-off answer. The failure reasons then say "raise the connection's max output tokens", but raising it changes nothing. Other Slurp calls already use `resolveStoredMaxTokens` + `clampGenerationMaxOutputTokens`. ## Fixed-limit calls without the helper (this fix covers all) - base/media/slp-image-prompt-rewrite.ts (4096) — the reported path - features/creators/slp-creator-page-service.ts (4000) - features/creators/slp-page-style-service.ts (4000) - features/media/slp-appearance-service.ts (500) - features/audience/slp-fan-voice-draft-service.ts (400) - features/assist/slp-stir-service.ts (3072) - features/assist/slp-assist-service.ts (2048) (slp-conversation-schedule-generation.ts already reads the provider override; left as is.) Warnings that mention max tokens: only the rewrite failure reasons (empty response, "looks cut off"). The exact log line from the user is still unconfirmed.
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-Agents#690
No description provided.