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: align video guidance with resolved model

[._.]/ Adam Eivyf617221b6cb9
diff --git a/server/services/creativeCommissions/abilityAdapters.js b/server/services/creativeCommissions/abilityAdapters.js
index 6373b99de6..1bd7b84ef4 100644
--- a/server/services/creativeCommissions/abilityAdapters.js
+++ b/server/services/creativeCommissions/abilityAdapters.js
@@ -108,8 +108,12 @@ function videoPromptGuidanceFor(commission, {
} = {}) {
const generation = commission?.generation;
const isCloudVideo = (effectiveVideoMode || generation?.videoMode) === VIDEO_GEN_MODE.GROK;
+ const hasExplicitLocalModel = generation?.videoMode === VIDEO_GEN_MODE.LOCAL && generation?.videoModelId;
const modelId = isCloudVideo ? undefined : (
- generation?.videoModelId || generation?.model || effectiveVideoModelId
+ (hasExplicitLocalModel ? generation.videoModelId : undefined)
+ || effectiveVideoModelId
+ || generation?.videoModelId
+ || generation?.model
|| (typeof defaultVideoModelId === 'function' ? defaultVideoModelId() : undefined)
);
return buildVideoPromptGuidance(modelId);
diff --git a/server/services/creativeCommissions/abilityAdapters.test.js b/server/services/creativeCommissions/abilityAdapters.test.js
index 6ff66177af..d7fdd26c75 100644
--- a/server/services/creativeCommissions/abilityAdapters.test.js
+++ b/server/services/creativeCommissions/abilityAdapters.test.js
@@ -134,6 +134,30 @@ describe('buildCommissionDirective — video (unchanged brief/feedback fold)', (
);
expect(directive.goal).toContain('MiniMax H3 prompt template');
});
+
+ it('uses the resolved target model for auto mode even when the commission has a stale model', () => {
+ const directive = buildCommissionDirective(
+ {
+ targetAbility: 'video',
+ brief: { intent: 'a quiet harbor' },
+ generation: { videoMode: 'auto', videoModelId: 'minimax_h3_8bit' },
+ },
+ { effectiveVideoMode: 'local', effectiveVideoModelId: 'ltx-2.5' },
+ );
+ expect(directive.goal).not.toContain('MiniMax H3 prompt template');
+ });
+
+ it('keeps an explicitly pinned local commission model ahead of the target default', () => {
+ const directive = buildCommissionDirective(
+ {
+ targetAbility: 'video',
+ brief: { intent: 'a quiet harbor' },
+ generation: { videoMode: 'local', videoModelId: 'minimax_h3_8bit' },
+ },
+ { effectiveVideoMode: 'local', effectiveVideoModelId: 'ltx-2.5' },
+ );
+ expect(directive.goal).toContain('MiniMax H3 prompt template');
+ });
});
describe('per-ability directives steer the planner to the right tools', () => {