[GH-ISSUE #3124] [Issue]: Prompt Preset choices are not respected when using setting presets #1674

Closed
opened 2026-10-21 05:41:36 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @calmcacil on GitHub (Jul 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3124

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Quick Setup / Use Settings Presets ignores saved prompt-preset variable defaults. If the selected chat/settings preset includes a prompt preset with saved non-first variable defaults, generation can still resolve those variables to the first option.

Expected behavior

When a chat/settings preset selects a prompt preset, that prompt preset’s saved defaultChoices should be used unless the chat has explicit presetChoices already saved.

Actual behavior

Quick Setup applies the chat/settings preset and closes without opening the preset variable modal. The chat preset saves promptPresetId but excludes presetChoices, and generation only reads prompt-preset defaultChoices for non-chat override presets. As a result, empty chat choices reach the prompt assembler, which falls back to the first option.

Steps to reproduce

  1. Create or edit a prompt preset with a variable choice block.
  2. Save a non-first option as the default choice for that prompt preset.
  3. Save a roleplay chat/settings preset that selects this prompt preset.
  4. Click New Roleplay.
  5. Click Use Settings Presets.
  6. Select/apply the saved chat/settings preset.
  7. Generate a reply.
  8. Observe that the variable resolves to the first option instead of the saved prompt-preset default.

Environment

  • Marinara Engine version: 2.0.8
  • Install type: docker
  • OS + version: linux
  • Browser or app shell: Chromium

Logs, screenshots, or video

Relevant code path:

  • packages/client/src/components/chat/ChatSetupWizard.tsx
    • Quick Setup applies the chat preset and closes.
  • packages/server/src/services/storage/chat-presets.storage.ts
    • Applying the chat preset writes promptPresetId.
  • packages/shared/src/types/chat-preset.ts
    • Chat presets exclude presetChoices.
  • packages/server/src/routes/generate.routes.ts
    • Prompt preset defaultChoices are only used when the effective preset differs from the chat’s prompt preset.
  • packages/server/src/services/prompt/assembler.ts
    • With no selection/default passed in, variables fall back to the first option.

Additional context

Likely fix: when chat.promptPresetId is selected but chatMeta.presetChoices does not contain a value for a variable, merge in that prompt preset’s saved defaultChoices before assembling the prompt.

Regression coverage should verify that Quick Setup with a chat/settings preset selecting a prompt preset uses the prompt preset’s saved defaults rather than option 1.

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 @calmcacil on GitHub (Jul 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3124 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Quick Setup / Use Settings Presets ignores saved prompt-preset variable defaults. If the selected chat/settings preset includes a prompt preset with saved non-first variable defaults, generation can still resolve those variables to the first option. ## Expected behavior When a chat/settings preset selects a prompt preset, that prompt preset’s saved `defaultChoices` should be used unless the chat has explicit `presetChoices` already saved. ## Actual behavior Quick Setup applies the chat/settings preset and closes without opening the preset variable modal. The chat preset saves `promptPresetId` but excludes `presetChoices`, and generation only reads prompt-preset `defaultChoices` for non-chat override presets. As a result, empty chat choices reach the prompt assembler, which falls back to the first option. ## Steps to reproduce 1. Create or edit a prompt preset with a variable choice block. 2. Save a non-first option as the default choice for that prompt preset. 3. Save a roleplay chat/settings preset that selects this prompt preset. 4. Click **New Roleplay**. 5. Click **Use Settings Presets**. 6. Select/apply the saved chat/settings preset. 7. Generate a reply. 8. Observe that the variable resolves to the first option instead of the saved prompt-preset default. ## Environment - Marinara Engine version: 2.0.8 - Install type: docker - OS + version: linux - Browser or app shell: Chromium ## Logs, screenshots, or video Relevant code path: - `packages/client/src/components/chat/ChatSetupWizard.tsx` - Quick Setup applies the chat preset and closes. - `packages/server/src/services/storage/chat-presets.storage.ts` - Applying the chat preset writes `promptPresetId`. - `packages/shared/src/types/chat-preset.ts` - Chat presets exclude `presetChoices`. - `packages/server/src/routes/generate.routes.ts` - Prompt preset `defaultChoices` are only used when the effective preset differs from the chat’s prompt preset. - `packages/server/src/services/prompt/assembler.ts` - With no selection/default passed in, variables fall back to the first option. ## Additional context Likely fix: when `chat.promptPresetId` is selected but `chatMeta.presetChoices` does not contain a value for a variable, merge in that prompt preset’s saved `defaultChoices` before assembling the prompt. Regression coverage should verify that Quick Setup with a chat/settings preset selecting a prompt preset uses the prompt preset’s saved defaults rather than option 1. ## 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:41:36 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
Author
Owner

@SpicyMarinara commented on GitHub (Jul 2, 2026):

Codex is taking this in branch codex/issue-sweep-3119-3135 for a staging-targeted fix sweep.

<!-- gh-comment-id:4864509728 --> @SpicyMarinara commented on GitHub (Jul 2, 2026): Codex is taking this in branch codex/issue-sweep-3119-3135 for a staging-targeted fix sweep.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 2, 2026):

Fix is ready in PR #3138 with CI passing. This issue will close automatically when the PR merges into staging.

<!-- gh-comment-id:4864746055 --> @SpicyMarinara commented on GitHub (Jul 2, 2026): Fix is ready in PR #3138 with CI passing. This issue will close automatically when the PR merges into staging.
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#1674
No description provided.