Merge pull request #1341 from exynos967/dev1102

fix(model_utils): HTTP 400 不终止全局尝试,继续切换模型
pull/1342/head
SengokuCola 2025-11-03 15:09:38 +08:00 committed by GitHub
commit 5bcbf9d024
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -369,8 +369,8 @@ class LLMRequest:
failed_models_this_request.add(model_info.name)
if isinstance(last_exception, RespNotOkException) and last_exception.status_code == 400:
logger.error("收到不可恢复的客户端错误 (400),中止所有尝试")
raise last_exception from e
logger.warning("收到客户端错误 (400),跳过当前模型并继续尝试其他模型")
continue
logger.error(f"所有 {max_attempts} 个模型均尝试失败。")
if last_exception: