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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Python SDK floor bumped to `youdotcom>=3.1.2,<4` (was `>=3.0.0,<4`). The 3.1.2 release ships the `X-Client-Info` attribution header and the `app_name` / `app_version` / `app_title` / `app_url` constructor kwargs on `You`
- The plugin now passes `app_name="youdotcom-temporal"` and `app_version=<package version>` to the `You(...)` constructor instead of mutating `client.sdk_configuration.user_agent` post-construction. Each outbound request carries `X-Client-Info: sdk; client=youdotcom-temporal/<version>; ua=python/<v> httpx/<v>`; the SDK's own `user-agent` stays as `youdotcom-python-sdk/<v>`. The `_USER_AGENT` constant is removed
- `youdotcom_research_background` now forwards `timeout_s` as-is (including `None`) to `research_and_wait_async` instead of substituting `120.0`. When `timeout_s` is `None`, the SDK derives an effort-based default (600s for standard, 14400s for frontier) via `_resolve_default_timeout()`. Previously the `120.0` fallback prevented that derivation, capping every effort tier at 120s

## [1.0.1] — 2026-08-18

Expand Down
2 changes: 1 addition & 1 deletion src/youdotcom_temporal/activities.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async def youdotcom_research_background(inp: ResearchInput) -> dict[str, Any]:
research_effort=effort,
source_control=source_control,
output_schema=inp.output_schema,
timeout_s=inp.timeout_s if inp.timeout_s is not None else 120.0,
timeout_s=inp.timeout_s,
)
return task_detail.model_dump(mode="json")
except Exception as exc:
Expand Down
6 changes: 3 additions & 3 deletions src/youdotcom_temporal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class ResearchInput:
background: bool = False
source_control: dict[str, Any] | None = None
output_schema: dict[str, Any] | None = None
# Only used by youdotcom_research_background: max seconds to wait for
# SSE streaming before falling back to polling. Default 120s, use
# 14400 (4h) for frontier tasks.
# Only used by youdotcom_research_background: max seconds to wait for the
# task to complete (SSE streaming + polling). When None, the SDK derives a
# default from research_effort: 600s for standard, 14400s (4h) for frontier.
timeout_s: float | None = None


Expand Down
4 changes: 2 additions & 2 deletions tests/test_activities.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ async def test_research_background_passes_params_to_helper(env: ActivityEnvironm
assert isinstance(call_kwargs["source_control"], models.SourceControl)
assert call_kwargs["source_control"].include_domains == ["arxiv.org"]
assert call_kwargs["output_schema"] == {"type": "object", "properties": {}}
# Default timeout_s when not specified by user
assert call_kwargs["timeout_s"] == 120.0
# timeout_s forwarded as-is (None) so the SDK derives the effort-based default
assert call_kwargs["timeout_s"] is None


async def test_research_background_passes_custom_timeout(env: ActivityEnvironment):
Expand Down
Loading