mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-20 20:34:36 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user