pub struct BrowserbaseSessionConfig {
pub session_id: Option<String>,
pub warmup: bool,
pub warmup_stabilize_ms: u64,
pub max_retries: u8,
pub backoff_base_ms: u64,
}Expand description
Session reuse, warmup, and rate-limit retry configuration for the Browserbase-managed acquisition stage (T114).
Closes the gap reported against real-world Browserbase usage:
the stage previously minted a brand-new session on every call (no
reuse), never gave the remote session a chance to settle before
the real navigation (no warmup), and treated a 429 from
Browserbase’s own session-management API the same as any other
transport failure (no backoff).
Fields§
§session_id: Option<String>Reuse an existing Browserbase session instead of creating a
new one. When None (or empty), the BROWSERBASE_SESSION_ID
environment variable is consulted next; only when both are
unset does the stage fall back to creating — and, on
release, deleting — a fresh session. A session supplied here
or via the environment variable is never deleted by the
stage; the caller owns its lifecycle.
warmup: boolRun a warmup navigation to the target URL, and let it settle, before the real extraction navigation. Gives anti-bot challenge JS a chance to execute and cookies/fingerprint state a chance to stabilize on a freshly connected session before the page that actually gets scraped loads. Best effort: a warmup failure is logged and does not fail the stage.
warmup_stabilize_ms: u64Settle delay after the warmup navigation, in milliseconds.
max_retries: u8Maximum retry attempts for session creation when Browserbase
responds 429 (rate limited). 0 disables retries.
backoff_base_ms: u64Base delay for exponential backoff between retries, in
milliseconds. Attempt n (0-indexed) waits
backoff_base_ms * 2^n, unless Browserbase’s Retry-After
response header supplies an explicit delay.
Trait Implementations§
Source§impl Clone for BrowserbaseSessionConfig
impl Clone for BrowserbaseSessionConfig
Source§fn clone(&self) -> BrowserbaseSessionConfig
fn clone(&self) -> BrowserbaseSessionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more