Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(pipeline): storyboards scene extraction honors per-series LLM config

[._.]/ Adam Eivy7b3dc6513d15
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 1b6082f0d6..6890d577d9 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -869,6 +869,22 @@
## Fixed
+- **Storyboards scene extraction now uses the per-series configured LLM.**
+ Clicking "From Teleplay" / "From Prose" on the Storyboards stage was
+ calling Claude Code (the system default) regardless of the
+ provider/model set in the issue header — leading to surprise
+ 5-minute timeouts when the user had Codex configured. Fix has three
+ parts: the `extract-scenes` route now accepts `modelOverride` and
+ falls back to `series.llm.provider` / `series.llm.model` when no
+ override is passed; `extractScenes` in `lib/sceneExtractor.js`
+ threads `modelOverride` through to `runStagedLLM`; the
+ `StoryboardsStage` component reads `series.llm.{provider,model}`
+ and passes both explicitly (defense in depth so even older client
+ builds against the new server still pick up the right provider).
+ Text-stage generates + auto-run already honored this; visual-refine
+ endpoints (`refine-prompt`) are intentionally exempt because they
+ use the per-issue `genConfig.refineProvider` setting.
+
- **`updateStageWithLatest` short-circuits on empty-patch returns.** A
computeFn returning `{}` (the "I decided not to write" signal — e.g.
a stale media-job completion landing against a re-rendered page) no
diff --git a/client/src/components/pipeline/stages/StoryboardsStage.jsx b/client/src/components/pipeline/stages/StoryboardsStage.jsx
index 440d52235d..4e12c0ee8f 100644
--- a/client/src/components/pipeline/stages/StoryboardsStage.jsx
+++ b/client/src/components/pipeline/stages/StoryboardsStage.jsx
@@ -29,7 +29,7 @@ import {
import MediaJobThumb from '../MediaJobThumb';
import { genConfigToImageOptions, genConfigToRefineOptions } from './VisualGenSettings';
-export default function StoryboardsStage({ issue, onStageUpdate, actionsGated = false }) {
+export default function StoryboardsStage({ issue, series, onStageUpdate, actionsGated = false }) {
const stage = issue.stages?.storyboards || { status: 'empty', scenes: [] };
const [scenes, setScenes] = useState(stage.scenes || []);
// Per-stage gen config — edited from the page-level settings modal.
@@ -97,7 +97,12 @@ export default function StoryboardsStage({ issue, onStageUpdate, actionsGated =
}
setExtractingFrom(from);
- const result = await extractPipelineStoryboardScenes(issue.id, { from, force: true }).catch((err) => {
+ const result = await extractPipelineStoryboardScenes(issue.id, {
+ from,
+ force: true,
+ providerOverride: series?.llm?.provider || undefined,
+ modelOverride: series?.llm?.model || undefined,
+ }).catch((err) => {
toast.error(err.message || 'Scene extraction failed');
return null;
});
diff --git a/client/src/services/apiPipeline.js b/client/src/services/apiPipeline.js
index 9506988458..e405a68b59 100644
--- a/client/src/services/apiPipeline.js
+++ b/client/src/services/apiPipeline.js
@@ -126,10 +126,10 @@ export const generatePipelineVisualImage = (issueId, stageId, opts) =>
// Auto-fill the storyboards stage's scenes[] from the issue's prose or
// teleplay text stage. `from` defaults server-side to 'teleplay'. Pass
// `force: true` to replace existing hand-curated scenes.
-export const extractPipelineStoryboardScenes = (issueId, { from, providerOverride, force } = {}) =>
+export const extractPipelineStoryboardScenes = (issueId, { from, providerOverride, modelOverride, force } = {}) =>
request(`/pipeline/issues/${encodeURIComponent(issueId)}/stages/storyboards/extract-scenes`, {
method: 'POST',
- body: JSON.stringify({ from, providerOverride, force }),
+ body: JSON.stringify({ from, providerOverride, modelOverride, force }),
});
// Auto-fill the comicPages stage's pages[] by deterministically parsing the
diff --git a/server/lib/sceneExtractor.js b/server/lib/sceneExtractor.js
index aa4595ef9e..08b29df3d5 100644
--- a/server/lib/sceneExtractor.js
+++ b/server/lib/sceneExtractor.js
@@ -120,6 +120,7 @@ export async function extractScenes({
series,
issue,
providerOverride,
+ modelOverride,
tag,
}) {
const stage = STAGE_FOR_SOURCE[sourceKind];
@@ -151,6 +152,7 @@ export async function extractScenes({
const result = await runStagedLLM(stage, variables, {
providerOverride,
+ modelOverride,
returnsJson: true,
source: tag || `scene-extract-${sourceKind}`,
});
diff --git a/server/routes/pipeline.js b/server/routes/pipeline.js
index 35aec964fb..225aaff41b 100644
--- a/server/routes/pipeline.js
+++ b/server/routes/pipeline.js
@@ -343,6 +343,7 @@ const promptRefineSchema = z.object({
const extractScenesSchema = z.object({
from: z.enum([SOURCE_KIND.PROSE, SOURCE_KIND.TELEPLAY]).optional().default(SOURCE_KIND.TELEPLAY),
providerOverride: z.string().trim().max(80).optional(),
+ modelOverride: z.string().trim().max(128).optional(),
force: z.boolean().optional(),
});
@@ -755,6 +756,9 @@ router.post('/issues/:id/stages/storyboards/extract-scenes', asyncHandler(async
);
}
+ // Fall back to the series' configured LLM when the client doesn't pass an
+ // explicit override — every Pipeline LLM action should honor the
+ // provider/model picked in the issue header (which mirrors series.llm).
const result = await extractScenes({
source,
sourceKind,
@@ -764,7 +768,8 @@ router.post('/issues/:id/stages/storyboards/extract-scenes', asyncHandler(async
work: { title: issue.title, kind: 'tv-episode' },
series: { name: series.name, styleNotes: series.styleNotes },
issue: { number: issue.number, title: issue.title },
- providerOverride: body.providerOverride,
+ providerOverride: body.providerOverride || series.llm?.provider || undefined,
+ modelOverride: body.modelOverride || series.llm?.model || undefined,
tag: `pipeline-storyboards-extract-${sourceKind}`,
});