From e3f6ff290897d96c50f86e732fd8f5ed05bfebb8 Mon Sep 17 00:00:00 2001 From: Adriano Dal Pastro Date: Mon, 11 May 2026 14:45:47 +0200 Subject: [PATCH] fix(_deps): fail-fast on missing services.sam21.base_url Align sam21() with nuwa()/marker()/yolo(): require base_url to be present in config rather than silently defaulting. Misconfiguration now raises KeyError at factory call instead of masking as a transport error. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/presa_mano/api/_deps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/presa_mano/api/_deps.py b/src/presa_mano/api/_deps.py index a894593..c538a16 100644 --- a/src/presa_mano/api/_deps.py +++ b/src/presa_mano/api/_deps.py @@ -32,7 +32,7 @@ def yolo() -> YoloClient: def sam21() -> Sam21Client: c = _svc(get_config(), "sam21") return Sam21Client( - base_url=c.get("base_url", "http://localhost:8002"), + base_url=c["base_url"], timeout_s=float(c.get("timeout_s", 10.0)), )