mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #422] [Issue]: Silent fallback to paid API as agent default (no cost warning) #180
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#180
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 @cha1latte on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/422
Originally assigned to: @SpicyMarinara on GitHub.
Summary
When the local model is unavailable, Marinara silently falls back to whichever paid API connection is set as the default for agents — with no warning or confirmation. This caused significant unexpected charges from a high-cost model (Opus 4.7) being used for routine mini agent / tracker tasks. Discord post: https://discord.com/channels/1417099416812392641/1501008711064359114
Expected behavior
When the local model becomes unavailable (or was never installed) and a paid API connection is the default for agents, Marinara should either (a) prompt the user to confirm before falling back to the paid connection for agent traffic, or (b) at minimum surface a persistent warning in the UI noting that paid agent calls are now active and on which model. Ideally a dedicated cost-tier warning when the agent-default model is in a "premium" tier (e.g., Opus-class).
Actual behavior
With the local sidecar runtime not installed (see related Bug 2), all mini agent / tracker calls silently routed to the paid API connection set as agent default — Opus 4.7 in this case — with no notification or confirmation. The user only discovered the fallback after seeing significant unexpected charges on the API bill.
Steps to reproduce
Environment
f00a8b9)Logs, screenshots, or video
(No specific log — behavior is silent. API provider usage logs would show the unexpected agent traffic against the paid connection.)
Additional context
Suggested fixes, in increasing order of friction:
Related: Bug 2 (sidecar runtime install 403) is what surfaced this behavior here — but the silent-fallback issue exists independently and would happen any time the local model is unavailable.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@dutchaiagency commented on GitHub (May 5, 2026):
Read-only pass on current
main(4a6808d): this looks separate from #413.#413 adds a useful loadout-cost readout in
ChatSettingsDrawer, but it does not change the runtime connection resolution path that can bill the wrong provider.The fallback I would look at first is:
packages/server/src/routes/generate.routes.ts:2480-2484: if an agent config explicitly usesLOCAL_SIDECAR_CONNECTION_IDand the sidecar is not available,effectiveConnectionIdbecomesdefaultAgentConn?.id ?? null.packages/server/src/routes/generate.routes.ts:2533-2545: built-in agents without a DB row also pick updefaultAgentConnwhen present.packages/server/src/routes/generate/retry-agents-route.ts:357-377and398-414: retry-agent resolution is different; if local sidecar is unavailable it falls through to the chat connection, not the default-for-agents connection.So the warning/guard probably needs to cover both live generation and manual retry paths, otherwise one path can warn while the other still bills a different connection.
Minimal shape I would test:
connectionSource/fallbackReasonalongside each resolved agent (explicit,default_for_agents,chat,local_sidecar_unavailable_default,local_sidecar_unavailable_chat).That keeps #413 as "how heavy is this agent loadout?" and #422 as "which provider will actually be billed if the local path is unavailable?"
@SpicyMarinara commented on GitHub (May 5, 2026):
Fixed.