Merge pull request #1341 from exynos967/dev1102

fix(model_utils): HTTP 400 不终止全局尝试,继续切换模型
This commit is contained in:
SengokuCola
2025-11-03 15:09:38 +08:00
committed by GitHub

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: