From a10874c574c05445718f1d1eea09fb82f5f216ca Mon Sep 17 00:00:00 2001 From: dschlueter Date: Sat, 11 Jul 2026 15:56:02 +0200 Subject: [PATCH] Pin the transcript JSON keys so a stray "sender" cannot kill the podcast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The retried podcast failed with "Failed to parse ValidatedTranscript ... 2 validation errors ... missing": qwen3.5:27b had emitted "sender" instead of "speaker" in 2 of 14 dialogue entries. Pydantic rejects the object, langchain raises OUTPUT_PARSING_FAILURE and the entire job dies — after the outline and most of the transcript were already done. The template showed the schema as a JSON example but never forbade other key names, so the model was free to drift. transcript.jinja now states the constraint explicitly, right where the schema is defined. This does not make the model deterministic — a parse failure still occurred once on the next run, but podcast_creator's own retry absorbed it and the episode completed: 15:16 min of audio, 53 clips. Before the change the same failure was fatal. Also, since this is the run that proved the non-root switch end to end: the final MP3 is owned by dschlueter, and prune_podcast_data.py cleaned up the leftovers of the two dead runs (5.5 MB) with a plain host-side rmtree. Co-Authored-By: Claude Opus 4.8 --- prompts/podcast/transcript.jinja | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prompts/podcast/transcript.jinja b/prompts/podcast/transcript.jinja index 3b9b75f..40d787a 100644 --- a/prompts/podcast/transcript.jinja +++ b/prompts/podcast/transcript.jinja @@ -87,6 +87,11 @@ Follow these format requirements strictly: } ``` +CRITICAL KEY NAMES: every object inside "transcript" must use EXACTLY the two keys +"speaker" and "dialogue" — never "sender", "name", "text", "content" or any other +variant, not even for a single entry. One wrong key makes the entire podcast fail +to parse and the whole job is lost. + Formatting instructions: {{ format_instructions}}