feat: add configurable token_refresh_interval_hours to runtime settings with validation and hot-reload support

This commit is contained in:
CJACK
2026-03-30 01:41:13 +08:00
parent af7c7c6770
commit 822b14ed6b
25 changed files with 300 additions and 41 deletions

View File

@@ -45,6 +45,9 @@ func (h *Handler) updateSettings(w http.ResponseWriter, r *http.Request) {
if runtimeCfg.GlobalMaxInflight > 0 {
c.Runtime.GlobalMaxInflight = runtimeCfg.GlobalMaxInflight
}
if runtimeCfg.TokenRefreshIntervalHours > 0 {
c.Runtime.TokenRefreshIntervalHours = runtimeCfg.TokenRefreshIntervalHours
}
}
if toolcallCfg != nil {
if strings.TrimSpace(toolcallCfg.Mode) != "" {