fix(aiproxy): clarify unavailable backend error message (#25683)

This commit is contained in:
Zexi Li
2026-09-13 22:32:17 +08:00
committed by GitHub
parent 7b80690bac
commit 92e18c0e07

View File

@@ -233,9 +233,9 @@ func resolveUpstreamAPIKeyExcluding(prov *SAiProvider, modelKey string, exclude
if hasSecretKey {
detail := formatAiKeySkipReasons(skipReasons)
if detail != "" {
return nil, errors.Wrapf(httperrors.ErrInvalidStatus, "no available ai_key for catalog model %q: %s", modelKey, detail)
return nil, errors.Wrapf(httperrors.ErrInvalidStatus, "no available backend for model %q: %s", modelKey, detail)
}
return nil, errors.Wrapf(httperrors.ErrInvalidStatus, "no available ai_key for catalog model %q", modelKey)
return nil, errors.Wrapf(httperrors.ErrInvalidStatus, "no available backend for model %q", modelKey)
}
return nil, errors.Wrap(httperrors.ErrInvalidStatus, "add an enabled ai_key with secret for this provider")
}