[GH-ISSUE #6003] [Feature]: Request: Automatically fetch context size limit from local inference backends #3323

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Describe the bug / problem

Currently, users have to manually set and synchronize the context window size in the engine settings to match their backend. If the backend configuration changes, or if the user switches models locally (e.g., in KoboldAI, Oobabooga, or TabbyAPI), they must remember to manually update the token limit in the frontend, which is prone to oversight and context truncation.

Describe the solution you'd like

I would love to see a feature similar to SillyTavern, where the engine automatically fetches the maximum context size directly from the connected local inference backend API.

This mechanism should:

  • Query the backend API endpoints (like /api/v1/model or equivalent setup status endpoints depending on the API type) to retrieve the active model's maximum context length.
  • Automatically trigger this check whenever the web UI page is refreshed/reloaded, ensuring the configuration is always up to date.
  • Automatically update the frontend's context slider/limit based on the fetched value.

Describe alternatives you've considered

Manually checking the console of the local backend and adjusting the slider in Marinara Engine every single time a model or setting changes.

Additional context

Implementing this would greatly improve the user experience for local LLM users, preventing unintended context overflows or under-utilization of the available context window after a page refresh.

Originally created by @scavru on GitHub (Sep 9, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6003 Originally assigned to: @SpicyMarinara on GitHub. ### Describe the bug / problem Currently, users have to manually set and synchronize the context window size in the engine settings to match their backend. If the backend configuration changes, or if the user switches models locally (e.g., in KoboldAI, Oobabooga, or TabbyAPI), they must remember to manually update the token limit in the frontend, which is prone to oversight and context truncation. ### Describe the solution you'd like I would love to see a feature similar to SillyTavern, where the engine automatically fetches the maximum context size directly from the connected local inference backend API. This mechanism should: * Query the backend API endpoints (like `/api/v1/model` or equivalent setup status endpoints depending on the API type) to retrieve the active model's maximum context length. * Automatically trigger this check whenever the web UI page is refreshed/reloaded, ensuring the configuration is always up to date. * Automatically update the frontend's context slider/limit based on the fetched value. ### Describe alternatives you've considered Manually checking the console of the local backend and adjusting the slider in Marinara Engine every single time a model or setting changes. ### Additional context Implementing this would greatly improve the user experience for local LLM users, preventing unintended context overflows or under-utilization of the available context window after a page refresh.
Author
Owner

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

Owner: @SpicyMarinara, assisted by Codex. Taking this issue in the assigned-issue sweep, PR #6007 targeting staging. Existing outside contributor PRs are excluded from the sweep.

<!-- gh-comment-id:5606717198 --> @SpicyMarinara commented on GitHub (Sep 9, 2026): Owner: @SpicyMarinara, assisted by Codex. Taking this issue in the assigned-issue sweep, PR #6007 targeting staging. Existing outside contributor PRs are excluded from the sweep.
Author
Owner

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

Addressed in #6007, merged into staging as 46d184753d. The final CI matrix and CodeRabbit review passed; validation details and manual follow-up checks are in the PR.

<!-- gh-comment-id:5608330682 --> @SpicyMarinara commented on GitHub (Sep 9, 2026): Addressed in #6007, merged into `staging` as 46d184753dc4fc65caf00e982847688b5df59095. The final CI matrix and CodeRabbit review passed; validation details and manual follow-up checks are in the PR.
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#3323
No description provided.