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

read the vision-run guard only when references are attached, so promptRunner mocks without it keep working

[._.]/ Adam Eivyd229a8edff34
diff --git a/server/services/codeAnimation/index.js b/server/services/codeAnimation/index.js
index 9c68e4af62..f27c5e529c 100644
--- a/server/services/codeAnimation/index.js
+++ b/server/services/codeAnimation/index.js
@@ -412,7 +412,8 @@ const canAttachImages = (provider) => provider.type === 'api'
|| isVisionCapableCliProvider(provider) || isVisionCapableCodexTuiProvider(provider);
async function runGeneration({ provider, model, effort, prompt, referencePaths }) {
- const { runPromptThroughProvider, assertVisionRunUsedImages } = await import('../promptRunner.js');
+ const promptRunner = await import('../promptRunner.js');
+ const { runPromptThroughProvider } = promptRunner;
const result = await runPromptThroughProvider({
provider,
model: model || undefined,
@@ -427,7 +428,8 @@ async function runGeneration({ provider, model, effort, prompt, referencePaths }
screenshots: canAttachImages(provider) ? referencePaths : [],
timeout: Math.max(provider.timeout || 0, 15 * 60 * 1000),
});
- if (referencePaths.length && canAttachImages(provider)) assertVisionRunUsedImages(result, provider);
+ // A fallback to a non-vision provider must not silently drop the references.
+ if (referencePaths.length && canAttachImages(provider)) promptRunner.assertVisionRunUsedImages(result, provider);
const html = extractAnimationHtml(result.text);
if (!html) throw new Error('The model response did not contain an HTML document');
return { html, provider: result.provider?.id || provider.id, model: result.model || null, runId: result.runId || null };