From 1c9ade20f8e0ef43ece8d168ded547dee46575f0 Mon Sep 17 00:00:00 2001 From: RCD <90105158+Finesssee@users.noreply.github.com> Date: Sun, 1 Feb 2026 11:28:20 +0700 Subject: [PATCH] fix: change HTTP status code from 400 to 502 when no provider available Cherry-picked from upstream 6da7ed53 Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) --- sdk/api/handlers/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/api/handlers/handlers.go b/sdk/api/handlers/handlers.go index 85657e12..3de2b229 100644 --- a/sdk/api/handlers/handlers.go +++ b/sdk/api/handlers/handlers.go @@ -651,7 +651,7 @@ func (h *BaseAPIHandler) getRequestDetails(modelName string) (providers []string } if len(providers) == 0 { - return nil, "", &interfaces.ErrorMessage{StatusCode: http.StatusBadRequest, Error: fmt.Errorf("unknown provider for model %s", modelName)} + return nil, "", &interfaces.ErrorMessage{StatusCode: http.StatusBadGateway, Error: fmt.Errorf("unknown provider for model %s", modelName)} } // The thinking suffix is preserved in the model name itself, so no