From e5586e87813b5ce2cc87b019f200262bc8daaae8 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 2 Oct 2024 20:20:50 +0200 Subject: [PATCH] chore: get model also from query (#3716) Signed-off-by: Ettore Di Giacinto --- core/http/ctx/fiber.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/http/ctx/fiber.go b/core/http/ctx/fiber.go index 28a35ac4..254f0704 100644 --- a/core/http/ctx/fiber.go +++ b/core/http/ctx/fiber.go @@ -19,7 +19,9 @@ func ModelFromContext(ctx *fiber.Ctx, cl *config.BackendConfigLoader, loader *mo if ctx.Params("model") != "" { modelInput = ctx.Params("model") } - + if ctx.Query("model") != "" { + modelInput = ctx.Query("model") + } // Set model from bearer token, if available bearer := strings.TrimLeft(ctx.Get("authorization"), "Bear ") // Reduced duplicate characters of Bearer bearerExists := bearer != "" && loader.ExistsInModelPath(bearer)