Skip to content

Commit 9735851

Browse files
committed
Merge remote-tracking branch 'upstream/main' into improving-ci-coverage-and-configuring-.coveragerc
2 parents 7d0fcfc + c93c666 commit 9735851

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • src/ogx/providers/remote/inference/nvidia

src/ogx/providers/remote/inference/nvidia/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
# This source code is licensed under the terms described in the LICENSE file in
55
# the root directory of this source tree.
66

7+
from urllib.parse import urlparse
8+
79
from . import NVIDIAConfig
810

11+
_NVIDIA_HOSTED_HOSTNAME = "integrate.api.nvidia.com"
12+
913

1014
def _is_nvidia_hosted(config: NVIDIAConfig) -> bool:
11-
return "integrate.api.nvidia.com" in str(config.base_url)
15+
hostname = urlparse(str(config.base_url)).hostname
16+
return hostname == _NVIDIA_HOSTED_HOSTNAME

0 commit comments

Comments
 (0)