From ba1796d7ce75d474126800d5ff309e4cea896a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:27:55 +0800 Subject: [PATCH] Add files via upload --- internal/multiagent/eino_transient_retry.go | 6 +++++- internal/multiagent/eino_transient_retry_test.go | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/multiagent/eino_transient_retry.go b/internal/multiagent/eino_transient_retry.go index 751a90f1..5046c52f 100644 --- a/internal/multiagent/eino_transient_retry.go +++ b/internal/multiagent/eino_transient_retry.go @@ -60,6 +60,7 @@ func isEinoTransientRunError(err error) bool { "bad gateway", "gateway timeout", "internal server error", + "unexpected internal error", "connection reset", "connection refused", "connection closed", @@ -72,6 +73,7 @@ func isEinoTransientRunError(err error) bool { "dial tcp", "tls handshake timeout", "stream error", + "failed to receive stream chunk", "goaway", // http2: server sent GOAWAY and closed the connection "unexpected eof", `": eof`, // net/http: Post "url": EOF (often wraps io.EOF) @@ -136,7 +138,8 @@ func einoTransientRunErrorUserDetail(err error) (kind, summary string) { case strings.Contains(lower, "overloaded") || strings.Contains(lower, "capacity") || strings.Contains(lower, "temporarily unavailable") || - strings.Contains(lower, "service unavailable"): + strings.Contains(lower, "service unavailable") || + strings.Contains(lower, "unexpected internal error"): kind = "upstream_busy" case strings.Contains(lower, "connection reset") || strings.Contains(lower, "connection refused") || @@ -153,6 +156,7 @@ func einoTransientRunErrorUserDetail(err error) (kind, summary string) { strings.Contains(lower, "unexpected eof"): kind = "network" case strings.Contains(lower, "stream error") || + strings.Contains(lower, "failed to receive stream chunk") || strings.Contains(lower, "unexpected end of json"): kind = "stream" default: diff --git a/internal/multiagent/eino_transient_retry_test.go b/internal/multiagent/eino_transient_retry_test.go index 696a4b7b..be22250d 100644 --- a/internal/multiagent/eino_transient_retry_test.go +++ b/internal/multiagent/eino_transient_retry_test.go @@ -34,6 +34,7 @@ func TestIsEinoTransientRunError(t *testing.T) { {"rate limit", errors.New(`{"error":"rate limit exceeded"}`), true}, {"connection reset", errors.New("read tcp: connection reset by peer"), true}, {"http2 goaway", errors.New("failed to receive stream chunk: error, http2: server sent GOAWAY and closed the connection; LastStreamID=791, ErrCode=NO_ERROR"), true}, + {"unexpected internal stream chunk", errors.New("failed to receive stream chunk: error, The service encountered an unexpected internal error. Request id: 0217851391106464f01ec66621d0980a42fd45436ed75957a6a0a"), true}, {"unexpected eof", errors.New("unexpected EOF"), true}, {"503", errors.New("upstream returned 503"), true}, {"iteration limit", errors.New("max iteration reached"), false}, @@ -74,6 +75,7 @@ func TestEinoTransientRunErrorUserDetail(t *testing.T) { {"upstream", errors.New("upstream returned 503"), "upstream_server"}, {"network", errors.New("read tcp: connection reset by peer"), "network"}, {"stream", errors.New("unexpected end of JSON"), "stream"}, + {"stream chunk", errors.New("failed to receive stream chunk: error, The service encountered an unexpected internal error. Request id: abc"), "upstream_busy"}, } for _, tc := range cases { tc := tc