Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stagehand/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from typing import Any, Callable, Literal, Optional

from browserbase.types import SessionCreateParams as BrowserbaseSessionCreateParams
Expand Down Expand Up @@ -42,7 +43,7 @@ class StagehandConfig(BaseModel):
None, alias="projectId", description="Browserbase project ID"
)
api_url: Optional[str] = Field(
"https://api.stagehand.browserbase.com/v1",
os.environ.get("STAGEHAND_API_URL", "https://api.stagehand.browserbase.com/v1"),
alias="apiUrl",
description="Stagehand API URL",
)
Expand Down
2 changes: 1 addition & 1 deletion stagehand/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(
self.config = config

# Handle non-config parameters
self.api_url = self.config.api_url or os.getenv("STAGEHAND_API_URL")
self.api_url = self.config.api_url
self.model_api_key = self.config.model_api_key or os.getenv("MODEL_API_KEY")
self.model_name = self.config.model_name

Expand Down