fix(deps): upgrade OpenAI stack and resolve dependency vulnerabilities
This commit is contained in:
1 parent
bb873ec0e0
commit
6b2c0f199d
14 files changed
+2738
-2732
No files matched your search
@@ -30,6 +30,7 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from enum import StrEnum
|
||||
import random
|
||||
import re
|
||||
from functools import lru_cache
|
||||
import threading
|
||||
import time
|
||||
@@ -124,6 +125,11 @@ def classify_failure(error: BaseException) -> Failure:
|
||||
# Programmer/request errors: retrying is useless and falling back only
|
||||
# hides the bug inside a different model's output.
|
||||
return Failure(FailureCategory.BAD_REQUEST, False, False)
|
||||
# langchain-openai 1.7 raises this ValueError for a response.failed event
|
||||
# without provider error details, before our completion guard sees it.
|
||||
# Preserve the bounded invalid-output retry policy for these failed streams.
|
||||
if isinstance(error, ValueError) and re.fullmatch(r"Response \S+ failed\.", str(error)):
|
||||
return Failure(FailureCategory.INVALID_OUTPUT, True, True)
|
||||
return Failure(FailureCategory.UNKNOWN, True, True)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user