diff --git a/CHANGELOG.md b/CHANGELOG.md index 20b388a..212e5fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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=` 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/; ua=python/ httpx/`; the SDK's own `user-agent` stays as `youdotcom-python-sdk/`. 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 diff --git a/src/youdotcom_temporal/activities.py b/src/youdotcom_temporal/activities.py index bc22c68..dd9fd59 100644 --- a/src/youdotcom_temporal/activities.py +++ b/src/youdotcom_temporal/activities.py @@ -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: diff --git a/src/youdotcom_temporal/models.py b/src/youdotcom_temporal/models.py index 80305a9..376bb3d 100644 --- a/src/youdotcom_temporal/models.py +++ b/src/youdotcom_temporal/models.py @@ -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 diff --git a/tests/test_activities.py b/tests/test_activities.py index b772f9d..bdfe250 100644 --- a/tests/test_activities.py +++ b/tests/test_activities.py @@ -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):