feat(auto): quota-aware AUTO slot scheduling (model tiers, hour/week/month resets) + key scope periods; fix key/slot create/delete UX

This commit is contained in:
root
2026-08-09 11:07:38 +08:00
parent 3408c9cb1f
commit 859d310ad3
9 changed files with 1065 additions and 162 deletions

View File

@ -72,6 +72,8 @@ func (g *Gateway) routes(w http.ResponseWriter, r *http.Request) {
g.handleStatsAPI(w, r)
case r.URL.Path == "/api/keys" || strings.HasPrefix(r.URL.Path, "/api/keys/"):
g.handleKeysAPI(w, r)
case r.URL.Path == "/api/auto":
g.handleAutoAPI(w, r)
case r.URL.Path == "/login":
g.handleLogin(w, r)
case r.URL.Path == "/api/login":
@ -92,6 +94,7 @@ func (g *Gateway) serveUI(w http.ResponseWriter, r *http.Request) {
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Write(data)
return
}