mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2996] [Issue]: Retry-agents resolution does not filter runtime-disabled/retired built-ins, unlike the main generation path #1569
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#1569
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 @kolacheee on GitHub (Jun 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2996
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
The main generation path excludes runtime-disabled and retired built-in agents from resolution. The retry path's resolver does not — it only filters deleted configs and builds its built-in fallback list straight from BUILT_IN_AGENTS without the runtime-disabled/retired guards. So a direct retry request for a runtime-disabled built-in (currently the
htmlagent) in roleplay mode resolves an agent the main pipeline would never run, issuing a real LLM call whose result type is unhandled — a wasted model call and tokens.How to reproduce (try it yourself)
htmlagent config (legacy).{ chatId, agentTypes: ["html"] }for a roleplay-mode chat.You'll see:
htmlis included in resolvedAgents and an agent LLM call is issued, even though it is runtime-disabled and the main /generate path skips it.Expected: runtime-disabled built-ins are skipped on retry as they are during generation. (Note: the bundled client has no retry trigger for html, so this is reachable via a direct API call.)
Where it is
packages/server/src/routes/generate/retry-agents-route.ts:947-953(resolveRetryAgents— enabledConfigs filter and builtInFallbackConfigs build). Main-path comparison:packages/server/src/services/generation/agent-resolution.ts:226-231and:366.What's happening
The retry resolver duplicates the main resolver's enabled/fallback logic but omits the
isBuiltInAgentRuntimeDisabledandisRetiredBuiltInAgentIdguards, so the two paths disagree on which built-ins may run.Suggested fix
Mirror the main path AND add the missing imports (neither symbol is currently imported in retry-agents-route.ts, so the bare suggested fix would fail
pnpm checkwith TS2304).@marinara-engine/sharedimport block:isBuiltInAgentRuntimeDisabled,andisRetiredBuiltInAgentId,.(Retired ids are already absent from BUILT_IN_AGENTS, so no retired check is needed in step 3, matching agent-resolution.ts:361-369.) Both guards are no-ops for custom DB agents and for active built-ins, so no legitimate retry target is newly blocked.
AI-investigated against v2.0.6; cited lines read and confirmed. Please verify before fixing.
@SpicyMarinara commented on GitHub (Jun 29, 2026):
Fixed in merged staging PR #3004.