Places where a failure is swallowed or misreported:
-
serve.py:1473 blanket except turns validation errors into 500s. The whole do_POST route table is wrapped in one except Exception that returns 500 {type}: {e}. Unchecked field reads like b["model"] (serve.py:1440), b["prompt"] (:1447), b["messages"] (:1459) surface as 500 KeyError: 'model' instead of a 4xx with a usable message.
-
capture.py proxy dies instead of returning an error body. capture.py:113 does json.loads(self.rfile.read(int(self.headers["Content-Length"]))) with no handling for a missing header or bad JSON, and _serve() (capture.py:148) has no try/except around model.chat(). Any failure kills the connection, so the agent under capture sees a transport error rather than an OpenAI-shaped error response. That undercuts the drop-in-proxy contract, since real agent frameworks retry on API errors but often crash on transport errors.
-
backends/torch.py:74 has_cuda() is a bare except Exception: return False with no annotation or log. A broken CUDA install silently degrades select_backend("auto") to CPU, which contradicts the accel.py property of logging exactly what was enabled.
-
serve.py:788-789 and serve.py:824-825 swallow torch.cuda.empty_cache() failures with unannotated except Exception: pass. In the VRAM-pressure retry path the subsequent _load() then fails opaquely, and clear_vram() reports {"unloaded": n} success even when the cache clear threw.
-
Frontend: 23 swallowed promise rejections (.catch(() => {}) across App.tsx, pages/Models.tsx, pages/Dashboard.tsx, pages/Datasets.tsx, pages/Runs.tsx, pages/Playground.tsx, pages/Train.tsx, pages/Machines.tsx). Polling loops recover, but a first-load failure renders as an empty state with no error surface, indistinguishable from "no data yet".
Places where a failure is swallowed or misreported:
serve.py:1473blanket except turns validation errors into 500s. The wholedo_POSTroute table is wrapped in oneexcept Exceptionthat returns500 {type}: {e}. Unchecked field reads likeb["model"](serve.py:1440),b["prompt"](:1447),b["messages"](:1459) surface as500 KeyError: 'model'instead of a 4xx with a usable message.capture.pyproxy dies instead of returning an error body.capture.py:113doesjson.loads(self.rfile.read(int(self.headers["Content-Length"])))with no handling for a missing header or bad JSON, and_serve()(capture.py:148) has no try/except aroundmodel.chat(). Any failure kills the connection, so the agent under capture sees a transport error rather than an OpenAI-shaped error response. That undercuts the drop-in-proxy contract, since real agent frameworks retry on API errors but often crash on transport errors.backends/torch.py:74 has_cuda()is a bareexcept Exception: return Falsewith no annotation or log. A broken CUDA install silently degradesselect_backend("auto")to CPU, which contradicts the accel.py property of logging exactly what was enabled.serve.py:788-789andserve.py:824-825swallowtorch.cuda.empty_cache()failures with unannotatedexcept Exception: pass. In the VRAM-pressure retry path the subsequent_load()then fails opaquely, andclear_vram()reports{"unloaded": n}success even when the cache clear threw.Frontend: 23 swallowed promise rejections (
.catch(() => {})acrossApp.tsx,pages/Models.tsx,pages/Dashboard.tsx,pages/Datasets.tsx,pages/Runs.tsx,pages/Playground.tsx,pages/Train.tsx,pages/Machines.tsx). Polling loops recover, but a first-load failure renders as an empty state with no error surface, indistinguishable from "no data yet".