[GH-ISSUE #6366] Bug: Translator API has a hardcoded Max Output Tokens limit of 4096 #3560

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

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

Originally assigned to: @SpicyMarinara on GitHub.

It looks like the API translator has a hardcoded Max Output Tokens limit of 4096.

My API connections are configured to support 8192 tokens, but the translator still limits the request to 4096 tokens instead of using the limit configured/supported by the selected connection.

For example, with KoboldCpp, the processing log shows:

Processing Prompt [BATCH] (155 / 155 tokens)
Generating (100 / 4096 tokens)

Even though the connected model/backend supports up to 8192 output tokens.

Expected behavior

The translator should take the Max Output Tokens value from the selected API connection/model configuration rather than using a hardcoded 4096 limit.

For example:

Connection limit: 8192 → translator should use 8192
Connection limit: 4096 → translator should use 4096

If the API/model does not provide a specific limit, a configurable fallback value could be used.

This would prevent unnecessarily truncating longer translations and make the translator correctly respect the capabilities of the selected backend.

Originally created by @scavru on GitHub (Sep 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6366 Originally assigned to: @SpicyMarinara on GitHub. It looks like the API translator has a hardcoded Max Output Tokens limit of 4096. My API connections are configured to support 8192 tokens, but the translator still limits the request to 4096 tokens instead of using the limit configured/supported by the selected connection. For example, with KoboldCpp, the processing log shows: Processing Prompt [BATCH] (155 / 155 tokens) Generating (100 / 4096 tokens) Even though the connected model/backend supports up to 8192 output tokens. Expected behavior The translator should take the Max Output Tokens value from the selected API connection/model configuration rather than using a hardcoded 4096 limit. For example: Connection limit: 8192 → translator should use 8192 Connection limit: 4096 → translator should use 4096 If the API/model does not provide a specific limit, a configurable fallback value could be used. This would prevent unnecessarily truncating longer translations and make the translator correctly respect the capabilities of the selected backend.
bsakaguchi 2026-10-21 06:04:16 +07:00
Author
Owner

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

@SpicyMarinara / Codex is taking this fix in the current issue sweep. I will reuse the existing connection token-budget handling and verify the actual translation request sent to an OpenAI-compatible backend, including 8192 and 4096 limits.

<!-- gh-comment-id:5742500023 --> @SpicyMarinara commented on GitHub (Sep 19, 2026): @SpicyMarinara / Codex is taking this fix in the current issue sweep. I will reuse the existing connection token-budget handling and verify the actual translation request sent to an OpenAI-compatible backend, including 8192 and 4096 limits.
Author
Owner

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

Merged to staging in #6367. AI translations now use the selected connection’s output-token budget and cap. HTTP regressions and production-container requests verify 8192, 4096, smaller explicit defaults, and disabled token limits. All 40 GitHub checks passed; local and hosted CodeRabbit reviews reported no findings. The reporter’s physical KoboldCpp setup remains a manual retest.

<!-- gh-comment-id:5742701380 --> @SpicyMarinara commented on GitHub (Sep 19, 2026): Merged to staging in #6367. AI translations now use the selected connection’s output-token budget and cap. HTTP regressions and production-container requests verify 8192, 4096, smaller explicit defaults, and disabled token limits. All 40 GitHub checks passed; local and hosted CodeRabbit reviews reported no findings. The reporter’s physical KoboldCpp setup remains a manual retest.
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#3560
No description provided.