refactor(cli): inject the control plane transport and keep httpx base_url

This commit is contained in:
Hugo Durand
2026-09-18 13:33:49 -04:00
parent 177d772cba
commit a0e9bbc93a
5 changed files with 154 additions and 205 deletions
+2 -2
View File
@@ -1414,11 +1414,11 @@ def _call_host_backend_with_optional_tenant(
"Find your workspace ID in LangSmith under Settings > Workspaces.",
fg="yellow",
)
client._client.headers["X-Tenant-ID"] = click.prompt("Workspace ID")
client.set_tenant(click.prompt("Workspace ID"))
prompted_for_tenant = True
continue
if err.status_code == 403 and "not enabled" in err.message.lower():
smith_base = _smith_dashboard_base_url(client._base_url)
smith_base = _smith_dashboard_base_url(client.base_url)
raise HostBackendError(
"LangSmith Deployment is not enabled for this organization. "
f"Enable it at {smith_base}/host/deployments"