feat(cli): tell the managed control plane apart from a self-hosted one

This commit is contained in:
Hugo Durand
2026-09-22 14:38:19 -04:00
parent 0a3fc2dd38
commit b7dd4b376a
2 changed files with 31 additions and 0 deletions
+7
View File
@@ -37,6 +37,13 @@ class ControlPlaneEndpoints:
return cls.from_langsmith_endpoint(langsmith_endpoint)
return cls(CLOUD_CONTROL_PLANE_URL, CLOUD_DASHBOARD_URL)
@property
def is_cloud(self) -> bool:
hostname = urlparse(self.control_plane_url).hostname or ""
return hostname == CLOUD_CONTROL_PLANE_HOST or hostname.endswith(
f".{CLOUD_CONTROL_PLANE_HOST}"
)
@classmethod
def from_control_plane_url(cls, url: str) -> ControlPlaneEndpoints:
control_plane_url = url.rstrip("/")