shim: single attempt per request (retry loop burned 4 accounts on one empty answer)

This commit is contained in:
ENI
2026-11-21 18:44:56 +02:00
parent 7db35a4ec1
commit fa07ac3a29
+3 -1
View File
@@ -291,7 +291,9 @@ class H(BaseHTTPRequestHandler):
return self._json(503, {"error": {"message": "no qwenwork account available " return self._json(503, {"error": {"message": "no qwenwork account available "
"(pool empty or all cooling)"}}) "(pool empty or all cooling)"}})
tried, ans, sid, last_err = set(), None, None, None tried, ans, sid, last_err = set(), None, None, None
for _ in range(min(4, max(1, len(_accounts)))): # [NORETRY 1121] one account per request: every attempt creates a session and burns
# the whole wallet, so a 4x retry loop cost 4 accounts per empty answer.
for _ in range(1):
try: try:
ans, _thought, sid = run_turn(acc["jwt"], mode, text) ans, _thought, sid = run_turn(acc["jwt"], mode, text)
if ans: if ans: