fix: pass global-timeout to router and use it for sd-server proxy#1422
Merged
jeremyfowers merged 1 commit intolemonade-sdk:mainfrom Mar 21, 2026
Merged
Conversation
The sd-server proxy used hardcoded 600s timeouts for image generation, edits, and variations — causing failures for models that take longer (e.g. Qwen Image Edit at ~36 min on consumer GPUs). Additionally, LEMONADE_GLOBAL_TIMEOUT was never propagated from lemonade-server to lemonade-router because ServerManager didn't pass --global-timeout in the subprocess args. Changes: - sd_server.cpp: replace hardcoded 600s with get_default_timeout() - ServerManager: accept and forward global_timeout to router via --global-timeout arg (both Unix execv and Windows CreateProcess) - TrayApp: pass server_config_.global_timeout to start_server() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Probably a better approach, but this takes the hardcoded default which breaks long image edit prompts via the router, and wires it up to the existing global timeout ENV when it is defined. |
jeremyfowers
added a commit
that referenced
this pull request
Mar 24, 2026
) Ported from main commit 922239e. Only the sd_server.cpp change applies to the spring-cleaning branch — the tray-side timeout propagation (server_manager.cpp, tray_app.cpp) is architecturally unnecessary since the tray no longer spawns the router. Replaces hardcoded 600s timeouts with get_default_timeout() so image generation respects the global timeout setting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_default_timeout()so image generation/edit/variation requests respectLEMONADE_GLOBAL_TIMEOUTglobal_timeoutfromlemonade-servertolemonade-routervia--global-timeoutCLI arg (fixes env var not propagating through subprocess spawn)server_config_.global_timeoutthrough bothstart_server()call sitesContext
Image generation models like Qwen Image Edit can take 30+ minutes on consumer GPUs (e.g. Radeon 8060S). The sd-server proxy had hardcoded 600s timeouts that couldn't be overridden, and
LEMONADE_GLOBAL_TIMEOUTset in/etc/lemonade/conf.d/was never reaching the router becauseServerManagerdidn't pass it as an arg.Complementary to #1421 which fixes the HttpClient timeout semantics — this PR ensures the global timeout value actually reaches the router and is used by the sd-server proxy.
Test plan
LEMONADE_GLOBAL_TIMEOUT=3600in/etc/lemonade/conf.d/timeout.conf--global-timeout 3600appears in router process args🤖 Generated with Claude Code