feat: improve stream monitoring and model catalog reliability

This commit is contained in:
Jason Xu committed 2026-09-04 02:22:27 +08:00
1 parent 3be4b393c0
commit 2c87495826
8 files changed
+640 -80

No files matched your search

+6
View File
@@ -85,6 +85,11 @@ func NewRuntimeManager(root context.Context, configPath string, cfg Config, logg
if err != nil {
return nil, err
}
if err := runtime.gateway.catalog.LoadCache(modelCatalogCachePath(configPath)); err != nil && !os.IsNotExist(err) {
if manager.logger != nil {
manager.logger.Warn("model catalog cache ignored", "component", "models", "event", "catalog_cache_load_failed", "path", modelCatalogCachePath(configPath), "error", err)
}
}
manager.current.Store(runtime)
manager.redactor.Replace(cfg)
setLogLevel(manager.level, cfg.Logging.Level)
@@ -99,6 +104,7 @@ func (m *RuntimeManager) build(cfg Config) (*gatewayRuntime, error) {
return nil, err
}
gateway.catalog.metadata = m.metadata
gateway.catalog.SetCachePath(modelCatalogCachePath(m.configPath))
return &gatewayRuntime{config: cfg, gateway: gateway, handler: gateway.Handler(), cancel: func() {}}, nil
}