mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4879] [Issue]: Fallback-generated messages display the primary model name #2702
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#2702
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 @SpicyMarinara on GitHub (Aug 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4879
Originally assigned to: @SpicyMarinara on GitHub.
Summary
When the primary chat model fails or returns an empty completion and the configured main fallback produces the usable response, the saved message still displays the primary model name. The fallback works, but the message generation metadata attributes its output to the wrong model and provider.
Expected behavior
The saved assistant message or swipe should identify the model and provider that actually produced its usable response. A normal generation that does not use fallback should continue showing the primary model.
For multi-round tool generations, the displayed provenance should reflect the model that produced the final user-visible response rather than an earlier tool-only round.
Actual behavior
ConnectionFallbackProviderretries successfully with the configured fallback and emits afallback_usednotice containing the fallback connection and model. However,generate.routes.tsalways persistsconn.modelandconn.providerfrom the primary connection inextra.generationInfo. The client then displays that stored primary model name.For example, Sol returned an empty completion and Marinara retried successfully with Mythos Fable 5, but the completed message still showed Sol as its model.
Steps to reproduce
Environment
Logs, screenshots, or video
The resulting message nevertheless displays the primary Sol model.
Additional context
The relevant persistence path currently writes the primary connection unconditionally:
The fallback wrapper does not propagate the content-producing connection back through
chat()orchatComplete(), despite already knowing and notifying about the fallback target. The fix should cover streaming, non-streaming/tool-call generation, regenerations, and swipes without changing existing fallback behavior or notifications. Add a regression proving that an empty primary followed by a successful fallback saves the fallback model/provider, while an ordinary successful primary remains attributed to the primary.Template check
@SpicyMarinara commented on GitHub (Aug 10, 2026):
Taking this in the current SpicyMarinara assigned-issue sweep. No linked active PR or issue-numbered remote branch was found; implementation will be collected in a focused PR targeting staging.