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) <noreply@anthropic.com>
This commit is contained in:
1 parent
748f5f58f7
commit
e3f6ff2908
1 file changed
+1
-1
@@ -32,7 +32,7 @@ def yolo() -> YoloClient:
|
|||||||
def sam21() -> Sam21Client:
|
def sam21() -> Sam21Client:
|
||||||
c = _svc(get_config(), "sam21")
|
c = _svc(get_config(), "sam21")
|
||||||
return Sam21Client(
|
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)),
|
timeout_s=float(c.get("timeout_s", 10.0)),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user