千问模型429限制, AI model API request limitations.

Author: Xing-HeCreated Apr 10, 2026Updated Apr 10, 2026

API 调用极易触发平台访问限制检测,如下:

Translation attempt 1 failed: Error code: 429 - {'error': {'message': 'You have exceeded your current request limit. For details, see: https://help.aliyun.com/zh/model-studio/error-code#rate-limit', 'type': 
'limit_requests', 'param': None, 'code': 'limit_requests'}   

可以尝试增加 retry的次数和休眠,增加翻译成功率

  • qwen_translator.py
diff
+ max_attempts = 5

...

except Exception as e:
    ...
    else:
+        time.sleep(10) # 触发最大重试次数时,休眠10s

+  time.sleep(0.2) # 每调用一次API休眠0.2s
return t_text

Source: yihong0618/bilingual_book_maker