mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-20 17:07:59 +00:00
feat(gateway): collapse multi-tier failure details into short client message
Clients saw the full per-tier chain error including upstream HTML WAF pages and JSON quota payloads. The response now carries one capped one-line reason per tier (quota/cooling skips preserved); full detail remains in rec.Err / stats API and is logged server-side.
This commit is contained in:
@ -139,7 +139,7 @@ func TestChatAutoChain503Summary(t *testing.T) {
|
||||
if rr.Code != http.StatusServiceUnavailable {
|
||||
t.Fatalf("status=%d body=%s", rr.Code, rr.Body.String())
|
||||
}
|
||||
if !strings.Contains(rr.Body.String(), "all auto tiers failed") ||
|
||||
if !strings.Contains(rr.Body.String(), "auto providers failed") ||
|
||||
!strings.Contains(rr.Body.String(), "a/a-m") ||
|
||||
!strings.Contains(rr.Body.String(), "b/b-m") {
|
||||
t.Fatalf("503 must summarize every tier, body=%s", rr.Body.String())
|
||||
|
||||
Reference in New Issue
Block a user