fix(model_utils): HTTP 400 不终止全局尝试,继续切换模型

This commit is contained in:
exynos
2025-11-02 17:33:58 +08:00
committed by GitHub
parent 6d70cf7528
commit b63057edec

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: