mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7664] [MERGED] fix(images): queue media requests per provider account #7866
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#7866
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7664
Author: @ylli-selmani
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ylli-selmani
Base:
staging← Head:fix/provider-media-queue📝 Commits (10+)
8a4aa40fix(images): queue media requests per provider account in generateImage (#7662)b4e317bfix(images): leave a short gap between NovelAI requests in one lane (#7662)a40dacdfix(images): retry NovelAI image requests when the provider is busy (#7662)9f538bbfix(video): queue video requests per provider account (#7662)5cf8f96fix(images): type the busy-retry delay lookup (#7662)f655f32refactor(images): let generateImage own media queueing on image routes (#7662)f456735fix(images): key provider lanes without hashing API keys (#7662)bc43e85fix(images): forget interned API keys once every lane is idle (#7662)9890996fix(images): release the provider lane before trying a fallback (#7662)fbf9784fix(images): skip the 429 retry wait when cancelled during body cleanup (#7662)📊 Changes
10 files changed (+782 additions, -184 deletions)
View changed files
📝
packages/client/src/lib/settings-registry.ts(+2 -1)📝
packages/client/src/localization/locales/en.json(+1 -1)📝
packages/server/src/routes/app-settings.routes.ts(+2 -0)📝
packages/server/src/routes/gallery.routes.ts(+31 -48)📝
packages/server/src/routes/generate/retry-agents-route.ts(+20 -30)📝
packages/server/src/services/image/image-generation-queue.ts(+126 -0)📝
packages/server/src/services/image/image-generation.ts(+69 -36)📝
packages/server/src/services/storage/app-settings.storage.ts(+4 -0)📝
packages/server/src/services/video/video-generation.ts(+84 -68)➕
scripts/regressions/media-provider-lane.regression.ts(+443 -0)📄 Description
Linked issue
Closes #7662
Why this change
[illustrate]command, the Illustrator alongside Character Tracker NPC avatars, or Slurp generating many posts. Only a few routes honored the toggle, and everything else only had the global ceiling of 4 parallel requests.What changed
[illustrate]commands, capability packages (Slurp), the gallery, and game assets. Different accounts and providers still run in parallel.How:
generateImageandgenerateVideoenter a provider lane before they take a global permit. The lane is keyed on the physical endpoint plus an opaque per-process account number, so no API key or digest ends up in a key. The lane is re-entrant, so nested and fallback calls don't wait on themselves. Capability packages reach images throughhost.images.generate, which callsgenerateImage, so no Marinara-Agents change is needed. The illustrator retry and gallery routes no longer wrapgenerateImagein the old per-connection queue.Slices
generateImage. One queue per provider account, with the toggle read on the server, plus a regression.generateVideo.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm checkon the final head (passed), plus the regressions matchingmedia,image,gallery,retry,videoandnovelai(all pass).scripts/regressions/media-provider-lane.regression.tschecks:generateImageandgenerateVideopaths against local fixture providers.source: itsimgServiceHintalready falls back toimageGenerationSource, so the lane resolves the same backend the request actually goes to. (2, trivial) The account map keeps API keys in memory: the server already holds those keys, and the map grows by one entry per distinct key. Hashing them is what CodeQL rejected.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Only the setting's help text changed (Settings → Overall Generations → Queue media generation requests).
🤖 Generated with Claude Code
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.