2025-05-13 16:06:13 -07:00
from pydantic import BaseModel , Field
2025-09-18 17:21:46 +08:00
from skyvern . schemas . docs . doc_strings import PROXY_LOCATION_DOC_STRING
from skyvern . schemas . runs import ProxyLocation
2025-05-13 16:06:13 -07:00
MIN_TIMEOUT = 5
2025-09-30 07:53:26 -07:00
MAX_TIMEOUT = 60 * 24 # 24 hours
2025-05-13 16:06:13 -07:00
DEFAULT_TIMEOUT = 60
class CreateBrowserSessionRequest ( BaseModel ) :
2025-05-14 18:20:56 -07:00
timeout : int | None = Field (
2025-05-13 16:06:13 -07:00
default = DEFAULT_TIMEOUT ,
description = f " Timeout in minutes for the session. Timeout is applied after the session is started. Must be between { MIN_TIMEOUT } and { MAX_TIMEOUT } . Defaults to { DEFAULT_TIMEOUT } . " ,
ge = MIN_TIMEOUT ,
le = MAX_TIMEOUT ,
)
2025-09-18 17:21:46 +08:00
proxy_location : ProxyLocation | None = Field (
default = None ,
description = PROXY_LOCATION_DOC_STRING ,
)