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: allow Runway image generation with the inherited default model

[._.]/ Adam Eivyc68c39e10b3e
diff --git a/client/src/components/imageGen/ImageGenFormEditor.jsx b/client/src/components/imageGen/ImageGenFormEditor.jsx
index e3e5933802..d771c886fc 100644
--- a/client/src/components/imageGen/ImageGenFormEditor.jsx
+++ b/client/src/components/imageGen/ImageGenFormEditor.jsx
@@ -64,6 +64,7 @@ export default function ImageGenFormEditor({ form, backend, generation }) {
refreshFlux2Status,
needsFlux2Token,
} = generation;
+ const resolvedRunwayModel = effectiveRunwayModel || settings.savedRunwayModel || RUNWAY_IMAGE_DEFAULT_MODEL;
return (
<div className="min-w-0 bg-port-card border border-port-border rounded-xl p-3 sm:p-4 space-y-3">
@@ -84,7 +85,7 @@ export default function ImageGenFormEditor({ form, backend, generation }) {
>
<button
type="submit"
- disabled={(isRunwayMode && !runwayCatalog.imageModels.some((m) => m.id === effectiveRunwayModel)) || derived.loraHandoffBlocked || derived.unsupportedLocalInputs || remix.pending || (derived.remoteTargetActive
+ disabled={(isRunwayMode && !runwayCatalog.imageModels.some((m) => m.id === resolvedRunwayModel)) || derived.loraHandoffBlocked || derived.unsupportedLocalInputs || remix.pending || (derived.remoteTargetActive
? derived.remoteBlocked !== null
: (derived.localBackendPending || derived.notConnected || derived.editImageMissing || derived.cloudNeedsPrompt))}
title={derived.unsupportedLocalInputs ? 'Remove unsupported LoRAs and input images in Options before rendering.' : loraTest.pending ? 'Preparing this LoRA test…' : loraTest.error || (remix.pending
@@ -243,7 +244,7 @@ export default function ImageGenFormEditor({ form, backend, generation }) {
modelStatus={isLocalMode ? modelDownload.getStatus(fields.modelId) : null}
onModelDownload={isLocalMode ? modelDownload.start : undefined}
onModelDownloadCancel={modelDownload.cancel}
- cloudModels={isAgyMode ? backend.agy.models : isFalMode ? FAL_IMAGE_MODEL_OPTIONS : isRunwayMode ? [...runwayCatalog.imageModels, ...(!runwayCatalog.imageModels.some((m) => m.id === effectiveRunwayModel) ? [{ id: effectiveRunwayModel, label: `${effectiveRunwayModel} (unavailable)` }] : [])] : []}
+ cloudModels={isAgyMode ? backend.agy.models : isFalMode ? FAL_IMAGE_MODEL_OPTIONS : isRunwayMode ? [...runwayCatalog.imageModels, ...(effectiveRunwayModel && !runwayCatalog.imageModels.some((m) => m.id === effectiveRunwayModel) ? [{ id: effectiveRunwayModel, label: `${effectiveRunwayModel} (unavailable)` }] : [])] : []}
cloudModel={isRunwayMode ? effectiveRunwayModel : isFalMode ? effectiveFalModel : effectiveAgyModel}
onCloudModelChange={isRunwayMode ? fields.setRunwayModel : isFalMode ? fields.setFalModel : fields.setAgyModel}
cloudModelLabel={isRunwayMode ? 'Runway model' : isFalMode ? 'fal.ai model' : 'Agent model'}
diff --git a/client/src/pages/ImageGen.runway.test.jsx b/client/src/pages/ImageGen.runway.test.jsx
new file mode 100644
index 0000000000..301158706c
--- /dev/null
+++ b/client/src/pages/ImageGen.runway.test.jsx
@@ -0,0 +1,34 @@
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { act, fireEvent, screen, waitFor } from '@testing-library/react';
+import { loadImageGenPage, renderImageGenPage, resetImageGenMockState, state } from '../test/imageGenPageMocks.jsx';
+
+vi.mock('../hooks/useRunwayCatalog.js', () => ({
+ useRunwayCatalog: () => ({ imageModels: [
+ { id: 'gen4_image', label: 'Runway Gen-4 Image' },
+ { id: 'gen4_image_turbo', label: 'Runway Gen-4 Image Turbo' },
+ ] }),
+}));
+
+await loadImageGenPage();
+
+describe('ImageGen Runway default model', () => {
+ beforeEach(() => {
+ resetImageGenMockState();
+ state.settings = { imageGen: { mode: 'runway', runway: { enabled: true, model: 'gen4_image_turbo' } } };
+ });
+
+ it('generates with the available Settings model without turning inheritance into a per-render override', async () => {
+ await renderImageGenPage();
+ const model = await screen.findByLabelText('Runway model');
+ await waitFor(() => expect(model).toHaveValue(''));
+ expect(screen.getByRole('option', { name: 'Settings default (gen4_image_turbo)' })).toBeInTheDocument();
+ expect(screen.queryByRole('option', { name: /unavailable/ })).not.toBeInTheDocument();
+ fireEvent.change(screen.getByLabelText('Prompt'), { target: { value: 'A lighthouse at dusk' } });
+ const generate = screen.getByRole('button', { name: /^Generate$/ });
+ await waitFor(() => expect(generate).toBeEnabled());
+ await act(async () => { fireEvent.click(generate); });
+ await waitFor(() => expect(state.generateImage).toHaveBeenCalled());
+ expect(state.generateImage.mock.calls[0][0]).toMatchObject({ mode: 'runway', prompt: 'A lighthouse at dusk' });
+ expect(state.generateImage.mock.calls[0][0]).not.toHaveProperty('cloudModel');
+ });
+});