From d0ea267ad141203237d26a5df2c53bf8083535bb Mon Sep 17 00:00:00 2001 From: Prakash Maheshwaran Date: Thu, 5 Jun 2025 04:44:53 -0400 Subject: [PATCH] Revert "feat: add SKYVERN_BASE_URL environment variable support for client base URL" This reverts commit 8e414ae23297a2d60e3b712d4221baeed37b2532. --- skyvern/client/client.py | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/skyvern/client/client.py b/skyvern/client/client.py index 11b42d9b..1c08b30e 100644 --- a/skyvern/client/client.py +++ b/skyvern/client/client.py @@ -1,12 +1,8 @@ # This file was auto-generated by Fern from our API Definition. -import os import typing -import logging from .environment import SkyvernEnvironment import httpx - -logger = logging.getLogger(__name__) from .core.client_wrapper import SyncClientWrapper from .types.run_engine import RunEngine from .types.proxy_location import ProxyLocation @@ -46,9 +42,7 @@ class Skyvern: Parameters ---------- base_url : typing.Optional[str] - The base url to use for requests from the client. If omitted, the value - of the ``SKYVERN_BASE_URL`` environment variable is used when set; otherwise - it falls back to the selected ``environment``. + The base url to use for requests from the client. environment : SkyvernEnvironment The environment to use for requests from the client. from .environment import SkyvernEnvironment @@ -1628,9 +1622,7 @@ class AsyncSkyvern: Parameters ---------- base_url : typing.Optional[str] - The base url to use for requests from the client. If omitted, the value - of the ``SKYVERN_BASE_URL`` environment variable is used when set; otherwise - it falls back to the selected ``environment``. + The base url to use for requests from the client. environment : SkyvernEnvironment The environment to use for requests from the client. from .environment import SkyvernEnvironment @@ -3361,16 +3353,8 @@ class AsyncSkyvern: def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SkyvernEnvironment) -> str: if base_url is not None: - logger.debug("Using explicit base_url: %s", base_url) return base_url - - env_base_url = os.getenv("SKYVERN_BASE_URL") - if env_base_url: - logger.debug("Using SKYVERN_BASE_URL from environment: %s", env_base_url) - return env_base_url - - if environment is not None: - logger.debug("Using base_url from environment enum: %s", environment.value) + elif environment is not None: return environment.value - - raise Exception("Please pass in either base_url or environment to construct the client") + else: + raise Exception("Please pass in either base_url or environment to construct the client")