fix: inject synthetic key on /api/models to prevent nil dereference

This commit is contained in:
2026-06-29 12:56:39 +02:00
parent ea2b24ed62
commit f977c484b0

View File

@@ -91,7 +91,7 @@ func (a *API) Mount(r chi.Router) {
r.Get("/api/me", a.apiMe)
// Dashboard test chat — OIDC auth, synthetic allow-all key injected.
r.With(a.dashboardKeyAuth).Post("/api/chat/completions", a.chatCompletions)
r.Get("/api/models", a.listModels)
r.With(a.dashboardKeyAuth).Get("/api/models", a.listModels)
r.Route("/api/admin", func(r chi.Router) {
// Keys and logs are user-scoped (admins see all via nil filter).