Check live provider health in control room
This commit is contained in:
parent
2176b7f675
commit
34732f0252
1 changed files with 14 additions and 1 deletions
|
|
@ -246,4 +246,17 @@ class AgentControlRoomService:
|
|||
if version.model == "sol" and provider == "opencode":
|
||||
resource = candidate
|
||||
break
|
||||
return resource.health_status if resource else "UNKNOWN"
|
||||
if resource is None:
|
||||
return "UNKNOWN"
|
||||
if resource.health_status != "UNKNOWN":
|
||||
return resource.health_status
|
||||
try:
|
||||
from model_router.providers import QwenProvider, SolProvider
|
||||
|
||||
if resource.provider == "local_inference":
|
||||
return QwenProvider(resource).health()
|
||||
if resource.provider == "opencode":
|
||||
return SolProvider(resource).health()
|
||||
except Exception:
|
||||
return "UNKNOWN"
|
||||
return resource.health_status
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue