[GH-ISSUE #520] [Issue]: RP mode sends chat history as a single user message to llama.cpp #240

Closed
opened 2026-10-20 17:26:40 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @cha1latte on GitHub.

Summary

In RP mode, Marinara Engine appears to send the entire chat history as a single user message for a llama.cpp/OpenAI-compatible request. This makes the request look like a two-message payload (system plus one user containing <chat_history>, <last_message>, and <output_format>) instead of preserving the conversational role structure.

Expected behavior

Chat history should be formatted in a way that preserves the conversation structure expected by the target model/provider, so the model receives prior user/assistant turns as distinct chat messages or an otherwise intentional provider-compatible format.

Actual behavior

The reporter's simplified llama.cpp request log shows a payload shaped like:

{
  "model": "G4-MeroMero-31B.i1-Q4_K_M.gguf",
  "messages": [
    {
      "role": "system",
      "content": "<role>...</role>\n\n<lore>...</lore>\n\n<instructions>...</instructions>"
    },
    {
      "role": "user",
      "content": "<chat_history>\nthis is the first message\n</chat_history>\n\n<last_message>\nthis is the last message\n</last_message>\n\n<output_format>\n    here are the output formatting rules\n</output_format>"
    }
  ],
  "stream": true,
  "stream_options": {
    "include_usage": true
  },
  "max_tokens": 8192,
  "temperature": 1,
  "top_p": 1
}

The reporter notes that the model seems to function, but they do not trust that it is performing as well as it should when the chat history is not prompted with proper structure.

Steps to reproduce

  1. Install Marinara Engine v1.5.8 via the Windows Installer.
  2. Run on Windows 11.
  3. Configure RP mode to use meromero-31b/Gemma through llama.cpp.
  4. Send a message in RP mode.
  5. Inspect the llama.cpp request log.
  6. Observe that the chat history is sent inside one user message rather than as distinct chat turns.

Environment

  • Marinara Engine version: v1.5.8
  • Install type: Windows Installer
  • OS + version: Windows 11
  • Browser or app shell: Not specified.
  • Mode: RP mode
  • Provider/runtime: llama.cpp
  • Model: meromero-31b / Gemma, G4-MeroMero-31B.i1-Q4_K_M.gguf

Logs, screenshots, or video

Reporter provided a simplified llama.cpp request log in the issue text. No separate uploadable log file or Discord thread URL was provided.

Additional context

Original reporter summary:

"so, i'm using ME with meromero-31b (gemma4) through llamacpp and i noticed the formatting (at least in rp mode) is really weird. the entire chat history is sent as a single user message for some reason. i.e. the model cannot be expected to work properly. it seems to function ok, but i don't trust that it's as intelligent if not prompted properly."

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 @cha1latte on GitHub (May 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/520 Originally assigned to: @cha1latte on GitHub. ## Summary In RP mode, Marinara Engine appears to send the entire chat history as a single `user` message for a llama.cpp/OpenAI-compatible request. This makes the request look like a two-message payload (`system` plus one `user` containing `<chat_history>`, `<last_message>`, and `<output_format>`) instead of preserving the conversational role structure. ## Expected behavior Chat history should be formatted in a way that preserves the conversation structure expected by the target model/provider, so the model receives prior user/assistant turns as distinct chat messages or an otherwise intentional provider-compatible format. ## Actual behavior The reporter's simplified llama.cpp request log shows a payload shaped like: ```json { "model": "G4-MeroMero-31B.i1-Q4_K_M.gguf", "messages": [ { "role": "system", "content": "<role>...</role>\n\n<lore>...</lore>\n\n<instructions>...</instructions>" }, { "role": "user", "content": "<chat_history>\nthis is the first message\n</chat_history>\n\n<last_message>\nthis is the last message\n</last_message>\n\n<output_format>\n here are the output formatting rules\n</output_format>" } ], "stream": true, "stream_options": { "include_usage": true }, "max_tokens": 8192, "temperature": 1, "top_p": 1 } ``` The reporter notes that the model seems to function, but they do not trust that it is performing as well as it should when the chat history is not prompted with proper structure. ## Steps to reproduce 1. Install Marinara Engine v1.5.8 via the Windows Installer. 2. Run on Windows 11. 3. Configure RP mode to use meromero-31b/Gemma through llama.cpp. 4. Send a message in RP mode. 5. Inspect the llama.cpp request log. 6. Observe that the chat history is sent inside one `user` message rather than as distinct chat turns. ## Environment - Marinara Engine version: v1.5.8 - Install type: Windows Installer - OS + version: Windows 11 - Browser or app shell: Not specified. - Mode: RP mode - Provider/runtime: llama.cpp - Model: meromero-31b / Gemma, `G4-MeroMero-31B.i1-Q4_K_M.gguf` ## Logs, screenshots, or video Reporter provided a simplified llama.cpp request log in the issue text. No separate uploadable log file or Discord thread URL was provided. ## Additional context Original reporter summary: "so, i'm using ME with meromero-31b (gemma4) through llamacpp and i noticed the formatting (at least in rp mode) is really weird. the entire chat history is sent as a single user message for some reason. i.e. the model cannot be expected to work properly. it seems to function ok, but i don't trust that it's as intelligent if not prompted properly." ## 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:26:40 +07:00
  • closed this issue
  • added the
    bug
    label
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#240
No description provided.