增加模型别名

This commit is contained in:
2026-07-04 14:49:52 +08:00
parent 641a021f7a
commit 03f9744dcb
16 changed files with 298 additions and 145 deletions
@@ -225,6 +225,11 @@ func (h *UserGenerationHandler) Logs(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"detail": "failed to load logs"})
return
}
modelByID, err := h.admin.ModelNameMap(c.Request.Context())
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"detail": "failed to load logs"})
return
}
out := make([]gin.H, 0, len(items))
for _, item := range items {
@@ -249,7 +254,7 @@ func (h *UserGenerationHandler) Logs(c *gin.Context) {
"ts": item.TS.Unix(),
"kind": item.Kind,
"status": item.Status,
"model": item.Model,
"model": displayModelName(modelByID, item.Model),
"provider": item.Provider,
"prompt": item.Prompt,
"ratio": item.Ratio,