feat: default two structured re-asks and sharper AIMD cut
Round 5 left three residual failure classes; ladder exhaustion (3.2% of structured calls with a single re-ask) and 429 leakage (5.8%, AIMD oscillating above the sustainable point) are addressable: re-ask default goes 1 to 2 (conservative vs instructor's 3) and the AIMD cut factor drops to 0.5.
This commit is contained in:
@@ -332,7 +332,7 @@ def _load_cache_keys(
|
||||
|
||||
def _load_structured_retries(env: Mapping[str, str]) -> int:
|
||||
found = _first(env, "PGW_STRUCTURED_MAX_RETRIES")
|
||||
value = int(_cast(found[1], "int", found[0])) if found else 1
|
||||
value = int(_cast(found[1], "int", found[0])) if found else 2 # M2.5 迭代4: 1→2
|
||||
if value < 0:
|
||||
raise ValueError("PGW_STRUCTURED_MAX_RETRIES 不能为负")
|
||||
return value
|
||||
|
||||
@@ -95,7 +95,7 @@ class AdaptivePacer:
|
||||
"""
|
||||
|
||||
_INITIAL = 8.0
|
||||
_CUT = 0.7
|
||||
_CUT = 0.5 # M2.5 迭代4: 0.7→0.5,残漏 5.8% 的 429 证明在临界点上方震荡
|
||||
_FLOOR = 1.0
|
||||
|
||||
def __init__(self, *, ceiling: float) -> None:
|
||||
|
||||
Reference in New Issue
Block a user