mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-28 14:59:47 +00:00
Missing ZEROENTROPY_API_KEY threw AIConfigError from auth resolution, which rerank.ts recorded as reason 'unknown' — and doctor's reranker_health had no unknown bucket, so it reported ok while every rerank silently failed open. - gateway.rerank wraps AIConfigError from applyResolveAuth as RerankError(reason: 'auth') before any HTTP call. - checkRerankerHealth warns on >=3 'unknown' failures in the 7-day window (covers historical pre-fix audit rows), with a ZEROENTROPY_API_KEY setup hint when the error summary points at a missing key. - Tests: RerankError(auth) classification, applyReranker fail-open + audit reason, doctor warn on repeated unknowns. Takeover of #2070. Co-authored-by: maxpetrusenkoagent <maxpetrusenkoagent@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>