[GH-ISSUE #7016] [Feature]: Route reasoning effort into chat_template_kwargs #3930

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

Originally created by @KeinNiemand on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7016

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

I use ik_llama.cpp. Marinara sends reasoning_effort at the top level, but this backend needs it inside chat_template_kwargs for models that support different effort levels.

Proposed solution

Either:

  • Add a connection setting that sends the selected effort as chat_template_kwargs.reasoning_effort.
  • Add nonnumeric custom provider parameters, like the existing numeric ones, with string/enum values and nested request keys.

Alternatives considered

I can paste this into Custom Parameters:

{"chat_template_kwargs":{"reasoning_effort":"high"}}

But I have to edit the JSON every time I change effort. I'd like to use a normal setting instead.

Additional context

Related to #4107, which added reusable numeric parameters.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @KeinNiemand on GitHub (Oct 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7016 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? I use `ik_llama.cpp`. Marinara sends `reasoning_effort` at the top level, but this backend needs it inside `chat_template_kwargs` for models that support different effort levels. ## Proposed solution Either: - Add a connection setting that sends the selected effort as `chat_template_kwargs.reasoning_effort`. - Add nonnumeric custom provider parameters, like the existing numeric ones, with string/enum values and nested request keys. ## Alternatives considered I can paste this into Custom Parameters: ```json {"chat_template_kwargs":{"reasoning_effort":"high"}} ``` But I have to edit the JSON every time I change effort. I'd like to use a normal setting instead. ## Additional context Related to #4107, which added reusable numeric parameters. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 3, 2026):

Very niche use, already covered by Advanced Parameters like you said.

<!-- gh-comment-id:5968933945 --> @SpicyMarinara commented on GitHub (Oct 3, 2026): Very niche use, already covered by Advanced Parameters like you said.
Author
Owner

@KeinNiemand commented on GitHub (Oct 3, 2026):

It's not really coverd by advanced paramters reasoning effort is something I change every 5 minutes, and i can't remover a 100+ characters of text i have to retype manually to set it as a manual paramter and having notepad open at all time to paste it in is also not practical. this isn't any more niche then changing reasoning effort on API, just that nobody these days want to have full proper support for local only features anymore.

<!-- gh-comment-id:5972110690 --> @KeinNiemand commented on GitHub (Oct 3, 2026): It's not really coverd by advanced paramters reasoning effort is something I change every 5 minutes, and i can't remover a 100+ characters of text i have to retype manually to set it as a manual paramter and having notepad open at all time to paste it in is also not practical. this isn't any more niche then changing reasoning effort on API, just that nobody these days want to have full proper support for local only features anymore.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 3, 2026):

Fair enough, retyping that every few minutes isn't convenient, and I should have explained better. Here's why we won't add it:

Passing reasoning effort through chat_template_kwargs is the old, non-standard way. llama.cpp itself replaced it with the standard OpenAI reasoning_effort field (ggml-org/llama.cpp#26045 and ggml-org/llama.cpp#26941). The server now reads reasoning_effort from the request and hands it to the chat template on its own. That's exactly what Marinara already sends, so on mainline llama.cpp the Reasoning Effort setting just works, no template kwargs needed.

ik_llama.cpp hasn't ported those two changes yet, which is why it only listens to chat_template_kwargs. The proper fix is on their side, and it's a small port. An issue on ik_llama.cpp linking those PRs would help everyone who uses it with any frontend. We'd rather not add a second, non-standard path to Marinara for one fork's gap, because it would stick around long after ik_llama.cpp catches up.

Until then, a quicker workaround than retyping: make one connection per effort level, all pointing at the same server, each with its own Custom Parameters ({"chat_template_kwargs":{"reasoning_effort":"low"}}, "medium", "high"). Then switch between them in Chat Settings.

<!-- gh-comment-id:5972384757 --> @SpicyMarinara commented on GitHub (Oct 3, 2026): Fair enough, retyping that every few minutes isn't convenient, and I should have explained better. Here's why we won't add it: Passing reasoning effort through `chat_template_kwargs` is the old, non-standard way. llama.cpp itself replaced it with the standard OpenAI `reasoning_effort` field (ggml-org/llama.cpp#26045 and ggml-org/llama.cpp#26941). The server now reads `reasoning_effort` from the request and hands it to the chat template on its own. That's exactly what Marinara already sends, so on mainline llama.cpp the **Reasoning Effort** setting just works, no template kwargs needed. ik_llama.cpp hasn't ported those two changes yet, which is why it only listens to `chat_template_kwargs`. The proper fix is on their side, and it's a small port. An issue on ik_llama.cpp linking those PRs would help everyone who uses it with any frontend. We'd rather not add a second, non-standard path to Marinara for one fork's gap, because it would stick around long after ik_llama.cpp catches up. Until then, a quicker workaround than retyping: make one connection per effort level, all pointing at the same server, each with its own Custom Parameters (`{"chat_template_kwargs":{"reasoning_effort":"low"}}`, `"medium"`, `"high"`). Then switch between them in Chat Settings.
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#3930
No description provided.