This commit is contained in:
Lizandro Guarnizo
2026-06-02 13:13:29 -05:00
parent ba76754331
commit 28d0eae715
7 changed files with 434 additions and 77 deletions
+2 -6
View File
@@ -373,13 +373,9 @@ func LandingGetAiConfig(c *fiber.Ctx) error {
if !landingSecret(c) {
return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{"error": "no autorizado"})
}
config, err := models.GetActiveAiConfig("qwen")
config, err := models.GetAiConfigForService("landing")
if err != nil {
// Intentar cualquier provider activo como fallback
config, err = models.GetActiveAiConfig("")
if err != nil {
return c.Status(fiber.StatusNotFound).JSON(fiber.Map{"error": "no hay configuración de IA activa"})
}
return c.Status(fiber.StatusNotFound).JSON(fiber.Map{"error": "no hay configuración de IA activa"})
}
return c.JSON(fiber.Map{
"provider": config.Provider,