mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8471] [Issue]: Roleplay generation fails with HTTP 500 when lorebook entries contain images and the roleplay model does not accept images #8368
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#8368
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/8471
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
@coderabbitai[bot] commented on GitHub (Oct 29, 2026):
⚠️ Possible Duplicate Issue(s)
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!