feat(node-capabilities): add voice HA capability pass-through from node-worker

Made-with: Cursor
This commit is contained in:
Apple
2026-03-03 07:15:39 -08:00
parent fa749fa56c
commit 5994a3a56f

View File

@@ -212,7 +212,11 @@ def _build_served_models(ollama: Dict, swapper: Dict, llama: Optional[Dict]) ->
def _derive_capabilities(served: List[Dict], worker_caps: Dict) -> Dict[str, Any]:
"""Merge served model types + worker provider flags into capability map."""
"""Merge served model types + worker provider flags into capability map.
Voice HA caps (voice_tts, voice_llm, voice_stt) pass through directly from
node-worker /caps where they are validated against active NATS subscriptions.
"""
served_types = {m.get("type", "llm") for m in served}
wc = worker_caps.get("capabilities", {})
wp = worker_caps.get("providers", {})
@@ -225,7 +229,12 @@ def _derive_capabilities(served: List[Dict], worker_caps: Dict) -> Dict[str, Any
"tts": wc.get("tts", False),
"ocr": has_vision and wp.get("ocr", "none") != "none",
"image": wc.get("image", False),
# Voice HA — pass through from node-worker /caps (reflects active subjects)
"voice_tts": wc.get("voice_tts", False),
"voice_llm": wc.get("voice_llm", False),
"voice_stt": wc.get("voice_stt", False),
"providers": wp,
"voice_concurrency": worker_caps.get("voice_concurrency", {}),
}