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
+29
View File
@@ -0,0 +1,29 @@
package admin
import (
"fmt"
"strconv"
"github.com/rose_cat707/luminary/internal/model"
"github.com/rose_cat707/luminary/internal/provider"
"github.com/rose_cat707/luminary/internal/provider/anthropic"
"github.com/rose_cat707/luminary/internal/provider/custom"
"github.com/rose_cat707/luminary/internal/provider/openai"
)
func parseUint(s string) uint {
v, _ := strconv.ParseUint(s, 10, 64)
return uint(v)
}
func (h *Handler) gatewayClient(t model.ProviderType) (provider.Client, error) {
switch t {
case model.ProviderOpenAI, model.ProviderAzureOpenAI, model.ProviderOpenRouter, model.ProviderOllama:
return openai.New(), nil
case model.ProviderAnthropic:
return anthropic.New(), nil
case model.ProviderCustom:
return custom.New(), nil
default:
return nil, fmt.Errorf("unsupported provider type: %s", t)
}
}