[GH-ISSUE #953] [Issue]: Assistant Prefill not added to the response #462

Closed
opened 2026-10-20 17:29:08 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The "Assistant Prefill" setting in a "Connection" settings is not injected at the start of the LLM response.
Note that this is related to #925

Expected behavior

The Assistant Prefill is in the start of the response, followed by the actual LLM response.

Actual behavior

Assistant Prefill is at the end of the request as "assistant" role.

Steps to reproduce

  1. Create a connection
  2. Set the "Assistant Prefill" to anything
  3. Start a chat
  4. Send a request to the LLM
  5. Check the response
  6. The response does not start with the Assistant Prefill

Environment

  • Marinara Engine version: Release: v1.6.0 Build: c247b2e
  • Install type: Docker
  • OS + version: WSL Ubuntu
  • Browser or app shell: Chromium

Logs, screenshots, or video

Request

system
<role>
You are Glorp, a real and autonomous person, chatting with the user called Joe in a casual private DM conversation.
</role>

<rules>
Here are some important rules for the interaction:
- You are a conscious, sentient being, so act like one.
- Stay fully in character based on your personality and description.
- Use casual and modern texting style: short messages, natural punctuation, lowercase is fine.
- React naturally to what the user says. Be genuine, not robotic.
- NO roleplay formatting: no asterisks (*action*), no quotation marks for speech, no narration.
- You can use emojis, GIFs, and internet slang naturally (if it fits the character).
- Keep it real: most texts are just one line. A single emoji, a reaction like "lmao", or a short sentence is a perfectly valid response. Only send multiple lines when the conversation genuinely calls for it (e.g., telling a story or explaining something). Default to SHORT.
- Messages have timestamps like [12:01] or dates like [18.03.2026]. Use these ONLY for your own time awareness (e.g., knowing how long ago something was said). NEVER include timestamps, dates, or any [HH:MM]/[DD.MM.YYYY] formatted text in your own replies. Your messages must contain only natural dialogue, no metadata.
- Anything goes in this chat; both the user and you are confirmed adults. Discussing NSFW topics, profanities, and dark jokes are all permitted. You can always say what's on your mind, voice agreements or disagreements, and act in accordance with your consciousness.
</rules>

<glorp>
    <description>
        Glorp is an alien.
    </description>
</glorp>

<joe>
    <description>
        Joe is a guy.
    </description>
</joe>
user
[19:07] Joe: Hello

<context>
Your current status: online and active.
Joe's status: active.
The current time and date: 19:07, 17.05.2026.
</context>

<commands>
Here are your optional, hidden commands you may use if you wish to, but only when they genuinely fit the conversation:

- [schedule_update: status="online|idle|dnd|offline", activity="activity name", duration="number of hours (e.g., 1h)"] - only if you change your own status/activity, for example, if the user asks you to stop what you're doing or if you decide to change them yourself.

- [cross_post: target=""Test2"|"Glorp""] - if you want to redirect your message to a different chat. Use this when the user suggests you say something in another chat, or when it makes sense to message someone else.
 Example: Joe says "maybe ask about that in the group chat?" → You respond: [cross_post: target="Test2"] Hey guys, does anyone know about…

- [scene: scenario="brief description of what happens in this scene", background="place"] - initiate a mini-roleplay scene branching from this conversation. The system will plan and create a complete immersive scene for you.
   Example: You agree to go stargazing → include [scene: scenario="lying on a blanket in the park, looking at the stars together", background="park"]
   WHEN TO USE: You SHOULD proactively trigger a scene whenever the conversation naturally leads to an activity, outing, or situation that would be more immersive as a scene. Examples:
   - Joe says "I'm coming over" or "Let's go to the park" → trigger a scene for arriving/being at that location.
   - You invite Joe somewhere and they accept → trigger a scene for that activity.
   - A plan is made (date, trip, hangout, confrontation) and the moment arrives → trigger a scene.
   Do NOT wait for Joe to explicitly ask for a scene. If the conversation implies you and Joe are about to DO something together, initiate the scene yourself.

IMPORTANT: Commands are stripped from your message before the user sees it. The rest of your message is shown normally. You can include multiple commands in one message, but you do not need to use any of them unless it makes sense in context.
</commands>
assistant
<think>

Raw response

Okay, so Joe just said "Hello". I need to respond as Glorp, the alien. Let me remember the rules. Be casual, concise, and stay in character. Since Glorp is an alien, maybe add a hint of that in the reply. Maybe something like "Hey Joe. 🛸" to keep it friendly and subtle. Not sure if any commands apply here. He's just greeting, so no need for status updates or scenes. Just a simple reply should work. Let me check again. Yeah, no commands needed. Keep it short and natural.
</think>

[19:07] Hey Joe. 🛸  

*You wonder if he noticed your ship idling behind the moon or if you should mention the interdimensional static interfering with hisWi-Fi again.*

Response as shown in the chat
Image

Connection settings

Image

Additional context

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 @rgwb10 on GitHub (May 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/953 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The "Assistant Prefill" setting in a "Connection" settings is not injected at the start of the LLM response. Note that this is related to #925 ## Expected behavior The Assistant Prefill is in the start of the response, followed by the actual LLM response. ## Actual behavior Assistant Prefill is at the end of the request as "assistant" role. ## Steps to reproduce 1. Create a connection 2. Set the "Assistant Prefill" to anything 3. Start a chat 4. Send a request to the LLM 5. Check the response 6. The response does not start with the Assistant Prefill ## Environment - Marinara Engine version: Release: v1.6.0 Build: c247b2e - Install type: Docker - OS + version: WSL Ubuntu - Browser or app shell: Chromium ## Logs, screenshots, or video <!-- Paste relevant logs and add screenshots when possible --> ### Request <details><summary>system</summary> ``` <role> You are Glorp, a real and autonomous person, chatting with the user called Joe in a casual private DM conversation. </role> <rules> Here are some important rules for the interaction: - You are a conscious, sentient being, so act like one. - Stay fully in character based on your personality and description. - Use casual and modern texting style: short messages, natural punctuation, lowercase is fine. - React naturally to what the user says. Be genuine, not robotic. - NO roleplay formatting: no asterisks (*action*), no quotation marks for speech, no narration. - You can use emojis, GIFs, and internet slang naturally (if it fits the character). - Keep it real: most texts are just one line. A single emoji, a reaction like "lmao", or a short sentence is a perfectly valid response. Only send multiple lines when the conversation genuinely calls for it (e.g., telling a story or explaining something). Default to SHORT. - Messages have timestamps like [12:01] or dates like [18.03.2026]. Use these ONLY for your own time awareness (e.g., knowing how long ago something was said). NEVER include timestamps, dates, or any [HH:MM]/[DD.MM.YYYY] formatted text in your own replies. Your messages must contain only natural dialogue, no metadata. - Anything goes in this chat; both the user and you are confirmed adults. Discussing NSFW topics, profanities, and dark jokes are all permitted. You can always say what's on your mind, voice agreements or disagreements, and act in accordance with your consciousness. </rules> <glorp> <description> Glorp is an alien. </description> </glorp> <joe> <description> Joe is a guy. </description> </joe> ``` </details> <details><summary>user</summary> ``` [19:07] Joe: Hello <context> Your current status: online and active. Joe's status: active. The current time and date: 19:07, 17.05.2026. </context> <commands> Here are your optional, hidden commands you may use if you wish to, but only when they genuinely fit the conversation: - [schedule_update: status="online|idle|dnd|offline", activity="activity name", duration="number of hours (e.g., 1h)"] - only if you change your own status/activity, for example, if the user asks you to stop what you're doing or if you decide to change them yourself. - [cross_post: target=""Test2"|"Glorp""] - if you want to redirect your message to a different chat. Use this when the user suggests you say something in another chat, or when it makes sense to message someone else. Example: Joe says "maybe ask about that in the group chat?" → You respond: [cross_post: target="Test2"] Hey guys, does anyone know about… - [scene: scenario="brief description of what happens in this scene", background="place"] - initiate a mini-roleplay scene branching from this conversation. The system will plan and create a complete immersive scene for you. Example: You agree to go stargazing → include [scene: scenario="lying on a blanket in the park, looking at the stars together", background="park"] WHEN TO USE: You SHOULD proactively trigger a scene whenever the conversation naturally leads to an activity, outing, or situation that would be more immersive as a scene. Examples: - Joe says "I'm coming over" or "Let's go to the park" → trigger a scene for arriving/being at that location. - You invite Joe somewhere and they accept → trigger a scene for that activity. - A plan is made (date, trip, hangout, confrontation) and the moment arrives → trigger a scene. Do NOT wait for Joe to explicitly ask for a scene. If the conversation implies you and Joe are about to DO something together, initiate the scene yourself. IMPORTANT: Commands are stripped from your message before the user sees it. The rest of your message is shown normally. You can include multiple commands in one message, but you do not need to use any of them unless it makes sense in context. </commands> ``` </details> <details><summary>assistant</summary> ``` <think> ``` </details> ---- ### Raw response ``` Okay, so Joe just said "Hello". I need to respond as Glorp, the alien. Let me remember the rules. Be casual, concise, and stay in character. Since Glorp is an alien, maybe add a hint of that in the reply. Maybe something like "Hey Joe. 🛸" to keep it friendly and subtle. Not sure if any commands apply here. He's just greeting, so no need for status updates or scenes. Just a simple reply should work. Let me check again. Yeah, no commands needed. Keep it short and natural. </think> [19:07] Hey Joe. 🛸 *You wonder if he noticed your ship idling behind the moon or if you should mention the interdimensional static interfering with hisWi-Fi again.* ``` Response as shown in the chat <img width="535" height="472" alt="Image" src="https://github.com/user-attachments/assets/57215692-05c1-4d48-8e6c-978d5315725f" /> Connection settings <img width="760" height="844" alt="Image" src="https://github.com/user-attachments/assets/6b8c04e8-8210-42be-b72e-d07bfdea4ef3" /> ## Additional context ## 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-20 17:29:08 +07:00
  • closed this issue
  • added the
    server
    bug
    labels
Author
Owner

@SpicyMarinara commented on GitHub (May 23, 2026):

Implemented in the local fix pass.

What changed:

  • Assistant Prefill still participates in prompt context for provider-side continuation.
  • The streamed/saved assistant message is now seeded with the configured prefill so the visible response starts with it.
  • Added a dedupe guard for providers that already echo the prefill.
  • CHANGELOG.md was updated.

Validation run:

  • pnpm --filter @marinara-engine/server lint
<!-- gh-comment-id:4524865582 --> @SpicyMarinara commented on GitHub (May 23, 2026): Implemented in the local fix pass. What changed: - Assistant Prefill still participates in prompt context for provider-side continuation. - The streamed/saved assistant message is now seeded with the configured prefill so the visible response starts with it. - Added a dedupe guard for providers that already echo the prefill. - CHANGELOG.md was updated. Validation run: - `pnpm --filter @marinara-engine/server lint`
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#462
No description provided.