Skip to content

enable env browserbase for multi-region #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 16, 2025

Conversation

miguelg719
Copy link
Collaborator

why

what changed

test plan

Copy link

linear bot commented Jun 16, 2025

@miguelg719 miguelg719 marked this pull request as ready for review June 16, 2025 20:37
@miguelg719 miguelg719 marked this pull request as draft June 16, 2025 20:39
@miguelg719 miguelg719 marked this pull request as draft June 16, 2025 20:39
@@ -41,7 +41,6 @@ async def _create_session(self):
},
}
),
"proxies": True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a param?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just the default config if none is passed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should go inside browserbase_session_create_params anyway

and self.browserbase_session_create_params.get("region")
and self.browserbase_session_create_params.get("region") != "us-west-2"
):
self.use_api = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@filip-michalsky
Copy link
Collaborator

maybe update .env.example to also remove ENVIRONMENT var?

connect_url = session.connectUrl
stagehand_instance.session_id = session.id
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move up

@@ -96,6 +96,16 @@ class StagehandConfig(BaseModel):
alias="localBrowserLaunchOptions",
description="Local browser launch options",
)
use_api: Optional[bool] = Field(
True,
alias="useAPI",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None

)
experimental: Optional[bool] = Field(
False,
alias="experimental",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none

@miguelg719 miguelg719 marked this pull request as ready for review June 16, 2025 21:04
@miguelg719 miguelg719 merged commit ef9483c into main Jun 16, 2025
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants