[GH-ISSUE #6374] Bug: Translation output is still truncated at 4096 tokens #3561

Closed
opened 2026-10-21 06:04:18 +07:00 by bsakaguchi · 3 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

The previous issue with the translator's Max Output Tokens limit appears to be fixed on the API/backend side, but there is still a limitation somewhere in the translation output handling.

My connection is configured for 8192 output tokens, and KoboldCpp now correctly processes the request according to the connection settings.

However, the translated text displayed/saved in Marinara is still being truncated, as if there is an internal 4096-token limit on the translation output.

For example, KoboldCpp now handles the request according to the configured connection limit, but the translation received/displayed in Marinara is cut off before the full response is shown.

Expected behavior

The translator should preserve the entire output returned by the API, up to the Max Output Tokens limit configured for the selected connection.

If the connection supports 8192 tokens, Marinara should be able to receive, display, and save the full translation up to that limit.

Please check whether there is still a separate hardcoded 4096 limit in:

translation response handling;
response parsing;
text storage;
display/output processing;
or any other post-processing step after the API response.

The API/backend itself now appears to be working correctly; the truncation seems to happen inside Marinara after the response is received.

Originally created by @scavru on GitHub (Sep 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6374 Originally assigned to: @SpicyMarinara on GitHub. The previous issue with the translator's Max Output Tokens limit appears to be fixed on the API/backend side, but there is still a limitation somewhere in the translation output handling. My connection is configured for 8192 output tokens, and KoboldCpp now correctly processes the request according to the connection settings. However, the translated text displayed/saved in Marinara is still being truncated, as if there is an internal 4096-token limit on the translation output. For example, KoboldCpp now handles the request according to the configured connection limit, but the translation received/displayed in Marinara is cut off before the full response is shown. Expected behavior The translator should preserve the entire output returned by the API, up to the Max Output Tokens limit configured for the selected connection. If the connection supports 8192 tokens, Marinara should be able to receive, display, and save the full translation up to that limit. Please check whether there is still a separate hardcoded 4096 limit in: translation response handling; response parsing; text storage; display/output processing; or any other post-processing step after the API response. The API/backend itself now appears to be working correctly; the truncation seems to happen inside Marinara after the response is received.
bsakaguchi 2026-10-21 06:04:18 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

@SpicyMarinara / Codex is taking this issue in the next sweep. I have read the maintainer comments and checked for existing linked implementation work. The fix will target staging with focused regression evidence.

<!-- gh-comment-id:5744852313 --> @SpicyMarinara commented on GitHub (Sep 19, 2026): @SpicyMarinara / Codex is taking this issue in the next sweep. I have read the maintainer comments and checked for existing linked implementation work. The fix will target staging with focused regression evidence.
Author
Owner

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

Investigated in #6383. I could not reproduce a 4,096-token cutoff after Marinara receives a response.

The regression uses an actual local OpenAI-compatible HTTP provider, verifies max_tokens: 8192 on the request, then returns 54,000+ characters with an end marker. The entire string survives the translation route, message/swipe storage, browser rendering and reload in Roleplay and Conversation. All six browser checks pass across desktop Chromium, mobile Chromium and mobile WebKit.

This does not establish what KoboldCpp returned in the reported session. Please attach a sanitized raw completion response (especially its final text, finish_reason and output-token count), KoboldCpp version, model and affected view if available. Do not include API keys or private chat content.

I am keeping this issue open and removing the closing keyword from the sweep PR rather than claiming the fixture resolves the report.

<!-- gh-comment-id:5745225364 --> @SpicyMarinara commented on GitHub (Sep 19, 2026): Investigated in #6383. I could not reproduce a 4,096-token cutoff after Marinara receives a response. The regression uses an actual local OpenAI-compatible HTTP provider, verifies `max_tokens: 8192` on the request, then returns 54,000+ characters with an end marker. The entire string survives the translation route, message/swipe storage, browser rendering and reload in Roleplay and Conversation. All six browser checks pass across desktop Chromium, mobile Chromium and mobile WebKit. This does not establish what KoboldCpp returned in the reported session. Please attach a sanitized raw completion response (especially its final text, `finish_reason` and output-token count), KoboldCpp version, model and affected view if available. Do not include API keys or private chat content. I am keeping this issue open and removing the closing keyword from the sweep PR rather than claiming the fixture resolves the report.
Author
Owner

@scavru commented on GitHub (Sep 19, 2026):

Processing Prompt [BATCH] (6867 / 6867 tokens)
Generating (5456 / 10192 tokens)
I checked it—everything's fine. Maybe it was a timeout that's been fixed.

<!-- gh-comment-id:5745756750 --> @scavru commented on GitHub (Sep 19, 2026): Processing Prompt [BATCH] (6867 / 6867 tokens) Generating (5456 / 10192 tokens) I checked it—everything's fine. Maybe it was a timeout that's been fixed.
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#3561
No description provided.