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: drop the freeform Codex image model field from the music-video tool picker

Adam Eivy84e7a6f24fd4
diff --git a/client/src/components/musicVideo/ToolPicker.jsx b/client/src/components/musicVideo/ToolPicker.jsx
index 7421313ef5..0cdc5f52e7 100644
--- a/client/src/components/musicVideo/ToolPicker.jsx
+++ b/client/src/components/musicVideo/ToolPicker.jsx
@@ -7,6 +7,9 @@ import { getVideoGenModelContext } from '../../services/apiImageVideo.js';
const GROUPS = [['image', 'Image'], ['video', 'Video'], ['code', 'Code']];
const LOCAL_VIDEO_TOOL_ID = 'video:local';
+// Codex image gen always uses the PortOS Codex Imagegen config (Settings → Image Gen),
+// so it takes no per-run model pin.
+const NO_MODEL_PIN_TOOL_IDS = new Set(['image:codex']);
const inputClass = 'w-full min-w-0 bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm';
/**
@@ -74,11 +77,15 @@ function useLocalVideoModels(enabled) {
export default function ToolPicker({ idPrefix = 'mv-auto', tools, models, onChange }) {
const picked = new Set(tools);
const medium = autonomousMedium(tools);
- const toggleTool = (id) => onChange({
- tools: MUSIC_VIDEO_AUTOMATION_TOOL_IDS.filter((t) => (t === id ? !picked.has(t) : picked.has(t))),
- models,
- });
- const modelTools = MUSIC_VIDEO_AUTOMATION_TOOLS.filter((t) => t.group !== 'code' && picked.has(t.id));
+ const toggleTool = (id) => {
+ // Drop any stale pin for a tool that no longer exposes a model field.
+ const { [id]: _dropped, ...rest } = models;
+ onChange({
+ tools: MUSIC_VIDEO_AUTOMATION_TOOL_IDS.filter((t) => (t === id ? !picked.has(t) : picked.has(t))),
+ models: NO_MODEL_PIN_TOOL_IDS.has(id) ? rest : models,
+ });
+ };
+ const modelTools = MUSIC_VIDEO_AUTOMATION_TOOLS.filter((t) => t.group !== 'code' && !NO_MODEL_PIN_TOOL_IDS.has(t.id) && picked.has(t.id));
const localImage = useLocalImageModels(picked.has('image:local'));
const localVideo = useLocalVideoModels(modelTools.some((tool) => tool.id === LOCAL_VIDEO_TOOL_ID));
const setModel = (toolId, value) => onChange({ tools, models: { ...models, [toolId]: value } });
diff --git a/client/src/components/musicVideo/ToolPicker.test.jsx b/client/src/components/musicVideo/ToolPicker.test.jsx
index b70a31fc2a..8266d286de 100644
--- a/client/src/components/musicVideo/ToolPicker.test.jsx
+++ b/client/src/components/musicVideo/ToolPicker.test.jsx
@@ -31,3 +31,12 @@ describe('local image tool models', () => {
expect(screen.getByRole('combobox').disabled).toBe(false);
});
});
+describe('codex image tool', () => {
+ it('shows no model field and drops a stale pin when toggled', () => {
+ const onChange = vi.fn();
+ render(<ToolPicker tools={['image:codex']} models={{ 'image:codex': 'old' }} onChange={onChange} />);
+ expect(screen.queryByRole('textbox')).toBeNull();
+ fireEvent.click(screen.getByText('Codex image gen $'));
+ expect(onChange).toHaveBeenLastCalledWith({ tools: [], models: {} });
+ });
+});