4 Commits
v2.0.7 ... main

Author SHA1 Message Date
78f8b5ad82 requeue downloads rejected for platform concurrency instead of discarding them
v2.3.0 burned through all 498 models in minutes with download_failed=498: the
platform already had 8 downloads running, every create returned "用户最多同时运行
8 个下载任务", and the worker treated a create failure as terminal (CREATE_FAILED)
and moved on.

Now a concurrency rejection puts the model back at the head of the queue and
waits for the next poll, so only genuine per-model failures (uniqueness check,
etc.) are recorded as failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 16:01:42 +08:00
251f21ac8f add DOWNLOAD_ONLY mode: run zhoushasha downloads without submitting any validation task
All 498 models in the current list already had their hygon and bi150 slots
reserved in earlier rounds, so this round only needs the downloads. Without a
switch the download list would be empty, since phase 2 only downloads models
reserved in the same run.

DOWNLOAD_ONLY skips the reservation phase entirely and downloads all of
ALL_MODEL_IDS. Also splits the worker into _reserve_phase / _download_phase and
gates bi150 behind ENABLE_BI150_SUBMIT for symmetry with hygon.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 15:56:45 +08:00
fae53f5a2a add a dedicated bi150 fallback account and skip hygon this round
bi150 coverage lagged hygon: the zero-credit accounts each take only one model,
so once all 34 were used the remaining models got no bi150 at all. Add
zhangyuanxi as the fallback so bi150 can catch up to hygon's coverage, using a
separate account from zhoukaile so the two cards don't compete for one quota.

hygon is already submitted for every model in the current 498-model list, so
ENABLE_HYGON_SUBMIT is off this round; flip it back on with a new model list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 15:39:26 +08:00
1155ac4f4e reserve validation slots before downloading, to stop competitors front-running our downloads
The download queue (/adminApi/async/task/model-download-task) is readable by ANY
account, including low-privilege xc-Token ones, so our WAITING model ids leak.
Competitors submit those via mechanism B (which needs no download), their task
waits for the file, and once our zhoushasha download lands it runs and wins the
slot - leaving us with 60028 on our own download.

New flow:
  phase 1 (reserve, instant): bi150 via zero-credit accounts that have no bi150
    task yet, hygon via zhoukaile - both mechanism B, no download required
  phase 2 (download): zhoushasha downloads only the models we reserved

Startup now filters out accounts that already hold a bi150 task, which also makes
the rotation cursor idempotent across redeploys.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 14:33:04 +08:00

2595
main.py

File diff suppressed because it is too large Load Diff