[GH-ISSUE #1461] [Issue]: Peek Prompt and generation use inconsistent prompt formatting parameters - prompt assembler contract bad #723

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

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

Originally assigned to: @Promansis on GitHub.

Summary

Peek Prompt can show the final post-formatting request shape instead of a readable authored-section preview, and prompt assembly can apply different merged generation parameters than the final LLM request.

Expected behavior

Peek Prompt should display the authored prompt sections with clear section labels while still reflecting the same preset variables, connection, request, and chat-scoped generation parameters used by real generation.

Strict role formatting should preserve authored post-history system sections, such as output format instructions, instead of flattening them into user-side content.

Actual behavior

Peek Prompt may collapse or relabel prompt content according to the final LLM message shape, making strict-role and single-user formatting difficult to inspect.

Formatting flags such as strictRoleFormatting and singleUserMessage can be merged differently between prompt assembly and the final LLM request, so preview, assembly, and generation can disagree.

Post-history system sections can be converted into user-side content under strict role formatting.

Steps to reproduce

  1. Create or open a roleplay chat using a prompt preset with authored system sections, chat history, and a post-history output-format/system section.
  2. Set generation parameters through connection defaults, chat metadata, preset/request parameters, or a combination that affects strictRoleFormatting or singleUserMessage.
  3. Open Peek Prompt and compare the displayed prompt sections with the final generated request behavior.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: fix/prompt-assembly-format
  • Run mode: Tauri desktop or web shell preview/generation paths
  • OS + version: not confirmed
  • Node + pnpm versions: not confirmed
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: any provider using assembled ChatML messages

Logs, screenshots, or video

TODO: Add before/after Peek Prompt screenshots showing section labels and preview messages.

Regression notes

Observed on the refactor branch prompt assembly/preview path. Last known good commit not confirmed.

Additional context

Related branch work introduces separate preview-only prompt messages with section display names, shares generation parameter source ordering between assembly/preview/final request paths, and preserves post-
history system sections during strict role formatting.

Template check

Please uncheck 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 @Promansis on GitHub (May 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1461 Originally assigned to: @Promansis on GitHub. ## Summary Peek Prompt can show the final post-formatting request shape instead of a readable authored-section preview, and prompt assembly can apply different merged generation parameters than the final LLM request. ## Expected behavior Peek Prompt should display the authored prompt sections with clear section labels while still reflecting the same preset variables, connection, request, and chat-scoped generation parameters used by real generation. Strict role formatting should preserve authored post-history system sections, such as output format instructions, instead of flattening them into user-side content. ## Actual behavior Peek Prompt may collapse or relabel prompt content according to the final LLM message shape, making strict-role and single-user formatting difficult to inspect. Formatting flags such as `strictRoleFormatting` and `singleUserMessage` can be merged differently between prompt assembly and the final LLM request, so preview, assembly, and generation can disagree. Post-history system sections can be converted into user-side content under strict role formatting. ## Steps to reproduce 1. Create or open a roleplay chat using a prompt preset with authored system sections, chat history, and a post-history output-format/system section. 2. Set generation parameters through connection defaults, chat metadata, preset/request parameters, or a combination that affects `strictRoleFormatting` or `singleUserMessage`. 3. Open Peek Prompt and compare the displayed prompt sections with the final generated request behavior. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [x] Roleplay mode - [ ] Game mode - [x] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `fix/prompt-assembly-format` - Run mode: Tauri desktop or web shell preview/generation paths - OS + version: not confirmed - Node + pnpm versions: not confirmed - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: any provider using assembled ChatML messages ## Logs, screenshots, or video TODO: Add before/after Peek Prompt screenshots showing section labels and preview messages. ## Regression notes Observed on the refactor branch prompt assembly/preview path. Last known good commit not confirmed. ## Additional context Related branch work introduces separate preview-only prompt messages with section display names, shares generation parameter source ordering between assembly/preview/final request paths, and preserves post- history system sections during strict role formatting. ## Template check Please uncheck 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:32:24 +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#723
No description provided.