mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8470] [Issue]: Roleplay generation fails with HTTP 500 when lorebook entries contain images and the roleplay model does not accept images #8369
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8369
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @minouris on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8470
Originally assigned to: @SpicyMarinara on GitHub.
Summary
When a lorebook entry has attached images, the engine injects them as visual references into the roleplay generation prompt and sends them to the roleplay model. If the roleplay model does not accept images, the endpoint returns HTTP 500 "image input is not supported".
LorebookImageProvideronly treats HTTP 400/415/422 as recoverable image-incompatibility, so the 500 propagates and the entire generation fails instead of skipping the images and continuing.Expected behavior
For a non-vision roleplay model, lorebook reference images should be skipped and generation should continue, with the
imagesUnsupportedModelNoticesurfaced to the UI (as the feature already intends), regardless of whether the endpoint reports the incompatibility as 400, 415, 422, or 500.Actual behavior
Generation fails with
LLMHttpError(status 500) and no response is produced. The chat's generation is aborted. The issue reproduces across multiple consecutive generation attempts.Steps to reproduce
Environment
Logs, screenshots, or video
Relevant error (prompt content omitted):
Additional context
isImageInputUnsupported()inpackages/server/src/services/llm/lorebook-image-provider.tsonly recognises HTTP 400/415/422. A text-only endpoint served by llama.cpp reports the same condition as HTTP 500, so the wrapper never enters its text-only retry path.isImageInputUnsupported()to also treat an HTTP 500 whose message indicates image input is not supported (e.g. "image input is not supported" / "provide the mmproj") as recoverable, so the existing graceful-skip path fires for llama.cpp-backed endpoints.Template check
@minouris commented on GitHub (Oct 29, 2026):
For completeness, the llama.cpp image is this one: https://github.com/agenticsnz/llama.cpp-rocm-docker
@SpicyMarinara commented on GitHub (Oct 30, 2026):
@SpicyMarinara requested an end-to-end sweep of assigned issues. Codex is taking ownership of the explicit unsupported-image HTTP 500 fallback. I checked the open PRs and issue-linked work before starting; a draft PR will make implementation progress visible. The fix will target staging, pass the repository validation and review gates, and this issue will close only after the resolved behavior is delivered.
@SpicyMarinara commented on GitHub (Oct 30, 2026):
Resolved on staging by #8484 (merge
c619aca012). An explicit unsupported-image HTTP 500 now uses the existing text-only retry for lorebook reference images and retains the skipped-image notice. User attachments are preserved; unrelated 500 errors, partial streams, aborts, and failures without removable references do not retry. The focused stream/non-stream regression matrix, prompt regressions, pnpm check, local CodeRabbit review, required PR checks, and final-head Dottore review passed. Post-merge staging checks are separate.