fix: surface moonshot on providers page
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

This commit is contained in:
2026-03-25 09:35:08 -04:00
parent 6b2bd13903
commit eebcadcba1
2 changed files with 15 additions and 10 deletions

View File

@@ -801,7 +801,7 @@ func (s *Server) handleGetProviders(c *gin.Context) {
dbMap[cfg.ID] = cfg
}
providerIDs := []string{"openai", "gemini", "deepseek", "grok", "ollama"}
providerIDs := []string{"openai", "gemini", "deepseek", "moonshot", "grok", "ollama"}
var result []gin.H
for _, id := range providerIDs {
@@ -822,6 +822,10 @@ func (s *Server) handleGetProviders(c *gin.Context) {
name = "DeepSeek"
enabled = s.cfg.Providers.DeepSeek.Enabled
baseURL = s.cfg.Providers.DeepSeek.BaseURL
case "moonshot":
name = "Moonshot"
enabled = s.cfg.Providers.Moonshot.Enabled
baseURL = s.cfg.Providers.Moonshot.BaseURL
case "grok":
name = "xAI Grok"
enabled = s.cfg.Providers.Grok.Enabled
@@ -870,6 +874,7 @@ func (s *Server) handleGetProviders(c *gin.Context) {
if s.registry != nil {
registryID := id
if id == "gemini" { registryID = "google" }
if id == "moonshot" { registryID = "moonshot" }
if id == "grok" { registryID = "xai" }
if pInfo, ok := s.registry.Providers[registryID]; ok {