From d0ed5b94d97cc89c966d365e65003205b8970b84 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Tue, 16 Jun 2026 23:38:28 +0200 Subject: [PATCH] refactor(podcasts): use shared second-based brief duration defaults --- .../app/podcasts/generation/brief/config.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/surfsense_backend/app/podcasts/generation/brief/config.py b/surfsense_backend/app/podcasts/generation/brief/config.py index 4f92585ae..9b206bde4 100644 --- a/surfsense_backend/app/podcasts/generation/brief/config.py +++ b/surfsense_backend/app/podcasts/generation/brief/config.py @@ -6,10 +6,13 @@ from dataclasses import dataclass, field, fields from langchain_core.runnables import RunnableConfig +from app.podcasts.duration_limits import ( + DEFAULT_MAX_SECONDS, + DEFAULT_MIN_SECONDS, +) + # Sensible defaults for a fresh brief; the user adjusts the range at the gate. DEFAULT_SPEAKER_COUNT = 2 -DEFAULT_MIN_MINUTES = 10 -DEFAULT_MAX_MINUTES = 20 @dataclass(kw_only=True) @@ -17,8 +20,8 @@ class BriefConfig: """Signals used to propose a brief; everything here is non-LLM context.""" speaker_count: int = DEFAULT_SPEAKER_COUNT - min_minutes: int = DEFAULT_MIN_MINUTES - max_minutes: int = DEFAULT_MAX_MINUTES + min_seconds: int = DEFAULT_MIN_SECONDS + max_seconds: int = DEFAULT_MAX_SECONDS focus: str | None = None last_used_language: str | None = None last_used_voices: list[str] = field(default_factory=list)