Skip to content

Commit e5586e8

Browse files
authored
chore: get model also from query (#3716)
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 3acd767 commit e5586e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/http/ctx/fiber.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ func ModelFromContext(ctx *fiber.Ctx, cl *config.BackendConfigLoader, loader *mo
1919
if ctx.Params("model") != "" {
2020
modelInput = ctx.Params("model")
2121
}
22-
22+
if ctx.Query("model") != "" {
23+
modelInput = ctx.Query("model")
24+
}
2325
// Set model from bearer token, if available
2426
bearer := strings.TrimLeft(ctx.Get("authorization"), "Bear ") // Reduced duplicate characters of Bearer
2527
bearerExists := bearer != "" && loader.ExistsInModelPath(bearer)

0 commit comments

Comments
 (0)