From 0157ce4a347f9625e1e9d09e2bbf0fbfad722557 Mon Sep 17 00:00:00 2001 From: historia Date: Fri, 4 Sep 2026 17:41:43 -0400 Subject: fix: sglomni retry contract, booting detection, CLI keys, companion refresh, ffmpeg dep --- app/backends/sglomni/status.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'app/backends/sglomni/status.py') diff --git a/app/backends/sglomni/status.py b/app/backends/sglomni/status.py index 2b77307..6a47cff 100644 --- a/app/backends/sglomni/status.py +++ b/app/backends/sglomni/status.py @@ -3,8 +3,8 @@ from pathlib import Path from typing import List, Optional -from backends import BackendStatus, ServerSpec, envs, format_launch_hint, \ - probe, servers +from backends import BackendStatus, ServerSpec, common, envs, \ + format_launch_hint, probe, servers from backends.sglomni import gpu from backends.sglomni.catalog import ModelEntry, entry_by_repo, \ fallback_config_path, config_path @@ -101,15 +101,9 @@ def gpu_fallback_note(entry: ModelEntry) -> Optional[str]: def _port() -> int: - return _port_of(config.SGLOMNI_API_URL) - - -def _port_of(url: str) -> int: - import urllib.parse - try: - return urllib.parse.urlsplit(url).port or DEFAULT_PORT - except ValueError: - return DEFAULT_PORT + """The managed server's port (the configured URL's explicit port, + else the backend default).""" + return common.port_of(config.SGLOMNI_API_URL, DEFAULT_PORT) def _managed_running_entry() -> Optional[ModelEntry]: -- cgit v1.2.3