feat: feed selector health and demote in-call failed sources
RetryMW keeps a per-call failure map (local, never instance state): a source failing twice in one call yields to the next candidate. Attempt outcomes feed OutcomeAwareSelector behind a swallow-and-warn guard; ResultInvalid and provider-rejected paths record success with count_attempt=False so the breaker window stays clean. Same accounting applied in EmbeddingClient.
This commit is contained in:
@@ -152,7 +152,9 @@ class ProviderGate(Protocol):
|
||||
|
||||
async def try_enter(self, source_name: str, owner: str) -> GateDecision: ...
|
||||
|
||||
async def record_success(self, entry: GateDecision) -> GateUpdate: ...
|
||||
async def record_success(
|
||||
self, entry: GateDecision, *, count_attempt: bool = True
|
||||
) -> GateUpdate: ...
|
||||
|
||||
async def record_failure(
|
||||
self, entry: GateDecision, reason: str, force_open: bool
|
||||
|
||||
Reference in New Issue
Block a user