mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-06 08:03:47 +00:00
feat: improve stream monitoring and model catalog reliability
This commit is contained in:
1 parent
3be4b393c0
commit
2c87495826
8 files changed
+640
-80
No files matched your search
@@ -422,11 +422,12 @@ type DebugInferenceResult struct {
|
||||
|
||||
func (a *AdminServer) handleDebugModels(w http.ResponseWriter, _ *http.Request) {
|
||||
models, metadata := a.manager.DebugModels()
|
||||
catalog := a.manager.Resources().Models
|
||||
a.mu.Lock()
|
||||
last := a.lastInference
|
||||
a.mu.Unlock()
|
||||
w.Header().Set("Cache-Control", "no-store")
|
||||
writeJSON(w, http.StatusOK, map[string]any{"models": models, "metadata": metadata, "last_inference": last})
|
||||
writeJSON(w, http.StatusOK, map[string]any{"models": models, "metadata": metadata, "catalog": catalog, "last_inference": last})
|
||||
}
|
||||
|
||||
func (a *AdminServer) handleDebugInference(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in new issue
Block a user