[GH-ISSUE #5173] [Feature]: Add Assistant Reasoning Prefill #2862

Closed
opened 2026-10-21 05:57:09 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kaldigo on GitHub (Aug 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5173

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Marinara supports visible Assistant Prefill text, but it cannot prefill a model's separate reasoning channel.

Providers such as Kimi K3 support continuing a partial assistant message whose hidden reasoning is supplied through reasoning_content. Without a dedicated setting, users cannot start that reasoning continuation while keeping the visible answer prefill separate.

Proposed solution

Add an Assistant Reasoning Prefill generation parameter beside the existing Assistant Prefill field.

For compatible OpenAI-style endpoints, the initial provider request should append one partial assistant message that can carry both forms of prefill:

{
  "role": "assistant",
  "content": "Visible prefix:",
  "reasoning_content": "Reasoning prefix",
  "partial": true
}

A reasoning-only prefill should remain valid with an empty visible content.

Existing visible-only Assistant Prefill behavior should retain its current request shape and should not gain partial: true.

Both prefills should be omitted during follow-up generation passes and impersonation.

Alternatives considered

  • Custom Parameters: these merge top-level request options and cannot add message-level reasoning_content.
  • Overload Assistant Prefill: this would mix visible answer text with hidden reasoning and would not match providers that expose them as separate message fields.

Additional context

Kimi K3 documents assistant messages containing reasoning_content, and Kimi's partial-message API documents setting partial: true on the final assistant message when continuing it:

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @kaldigo on GitHub (Aug 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5173 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Marinara supports visible Assistant Prefill text, but it cannot prefill a model's separate reasoning channel. Providers such as Kimi K3 support continuing a partial assistant message whose hidden reasoning is supplied through `reasoning_content`. Without a dedicated setting, users cannot start that reasoning continuation while keeping the visible answer prefill separate. ## Proposed solution Add an **Assistant Reasoning Prefill** generation parameter beside the existing **Assistant Prefill** field. For compatible OpenAI-style endpoints, the initial provider request should append one partial assistant message that can carry both forms of prefill: ```json { "role": "assistant", "content": "Visible prefix:", "reasoning_content": "Reasoning prefix", "partial": true } ``` A reasoning-only prefill should remain valid with an empty visible `content`. Existing visible-only Assistant Prefill behavior should retain its current request shape and should not gain `partial: true`. Both prefills should be omitted during follow-up generation passes and impersonation. ## Alternatives considered - **Custom Parameters:** these merge top-level request options and cannot add message-level `reasoning_content`. - **Overload Assistant Prefill:** this would mix visible answer text with hidden reasoning and would not match providers that expose them as separate message fields. ## Additional context Kimi K3 documents assistant messages containing `reasoning_content`, and Kimi's partial-message API documents setting `partial: true` on the final assistant message when continuing it: - https://github.com/MoonshotAI/Kimi-K3#6-model-usage - https://platform.kimi.ai/docs/api/partial ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:57:09 +07:00
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#2862
No description provided.