feat(node-capabilities): add voice HA capability pass-through from node-worker
Made-with: Cursor
This commit is contained in:
@@ -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]:
|
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}
|
served_types = {m.get("type", "llm") for m in served}
|
||||||
wc = worker_caps.get("capabilities", {})
|
wc = worker_caps.get("capabilities", {})
|
||||||
wp = worker_caps.get("providers", {})
|
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),
|
"tts": wc.get("tts", False),
|
||||||
"ocr": has_vision and wp.get("ocr", "none") != "none",
|
"ocr": has_vision and wp.get("ocr", "none") != "none",
|
||||||
"image": wc.get("image", False),
|
"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,
|
"providers": wp,
|
||||||
|
"voice_concurrency": worker_caps.get("voice_concurrency", {}),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user