Initial commit: Luminary AI Gateway
CI / docker (push) Successful in 2m4s

OpenAI-compatible AI gateway with Vue admin UI, multi-provider egress,
ingress key governance, monitoring, and security controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
renjue
2026-06-23 21:46:16 +08:00
commit 76ba500417
134 changed files with 18988 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package gateway
import (
"net/http"
"testing"
)
func TestRetryableUpstreamStatus(t *testing.T) {
if !retryableUpstreamStatus(http.StatusTooManyRequests) {
t.Fatal("429 should be retryable")
}
if !retryableUpstreamStatus(http.StatusServiceUnavailable) {
t.Fatal("503 should be retryable")
}
if retryableUpstreamStatus(http.StatusBadRequest) {
t.Fatal("400 should not be retryable")
}
}
func TestTryNextKeyOnUpstreamStatus(t *testing.T) {
if !tryNextKeyOnUpstreamStatus(http.StatusTooManyRequests) {
t.Fatal("429 should try next key")
}
if !tryNextKeyOnUpstreamStatus(http.StatusUnauthorized) {
t.Fatal("401 should try next key")
}
}