Skip to content

add missing sent at header #119

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 2 commits into from
Jun 25, 2025
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Stagehand Python Changelog
10 changes: 0 additions & 10 deletions CHANGELOG.txt

This file was deleted.

3 changes: 3 additions & 0 deletions stagehand/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
from datetime import datetime
from typing import Any

from .utils import convert_dict_keys_to_camel_case
Expand Down Expand Up @@ -67,6 +68,7 @@ async def _create_session(self):
"x-bb-project-id": self.browserbase_project_id,
"x-model-api-key": self.model_api_key,
"Content-Type": "application/json",
"x-sent-at": datetime.now().isoformat(),
"x-language": "python",
}

Expand Down Expand Up @@ -96,6 +98,7 @@ async def _execute(self, method: str, payload: dict[str, Any]) -> Any:
"x-bb-project-id": self.browserbase_project_id,
"Content-Type": "application/json",
"Connection": "keep-alive",
"x-sent-at": datetime.now().isoformat(),
# Always enable streaming for better log handling
"x-stream-response": "true",
}
Expand Down