feat(novita): 1h async media poll budget for a single generation#11
Merged
Conversation
…tion Split the overloaded REQUEST_TIMEOUT const: it stays the per-HTTP-request timeout (create-task submit, single poll fetch); a new ASYNC_TASK_TIMEOUT (3600s) governs the total poll-loop deadline for one async media generation. Heavy models (e.g. sora_2_pro_i2v) routinely render past the old 300s budget, producing spurious "did not complete within 300s" timeouts. RouterBase no longer retries these (MAX_ATTEMPTS=1), so this is the single, final budget — one upstream task per request, no throwaway re-submissions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
I have read the Contributor License Agreement (CLA) and hereby sign the CLA. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
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.
What
Splits the overloaded
REQUEST_TIMEOUTconstant in the Novita provider:REQUEST_TIMEOUT(300s) — stays the per-HTTP-request timeout (create-task submit, single poll fetch).ASYNC_TASK_TIMEOUT(3600s / 1h) — new constant, the total poll-loop deadline for one async media generation.Why
Heavy models (e.g.
sora_2_pro_i2v) routinely render past the old 300s budget, producing spuriousNovita async task … did not complete within 300sfailures even though the upstream render eventually succeeds.On the RouterBase side this generation is now single-attempt, no-retry (
video_submitterMAX_ATTEMPTS=1), so this is the one and only budget for a request — one upstream Novita task, no throwaway re-submissions spawning fresh task ids.Paired change
Requires the RouterBase parent PR that:
MAX_ATTEMPTS=1and raises the worker reaper above 1h (STUCK_TIMEOUT_MINUTES=70),/logs.Risk
A single submission now holds an idle connection to the gateway open for up to 1h. Backend-side keepalive mitigates conntrack/idle drops; worth watching connection counts at high concurrency on first real 1h render.
🤖 Generated with Claude Code