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

feat: disclose video model provenance, licensing, and backend policy scope (#3674)

[._.]/ Adam Eivy75d44684ab0f
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index ced6580f37..ea50eab0c9 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -72,3 +72,5 @@
- **Series Pipeline runs can now pick a reasoning effort.** Pipeline stage LLM calls never emitted one, so a run's thinking effort was whatever the provider's configured CLI args (or an effort-encoding model id) happened to bake in — making a cheaper or harder-thinking autopilot run a global provider edit. Effort is now threaded exactly like the run provider and model: the Autonomous-mode Options popover (and a scheduled run's setup) offers it next to the provider/model picker for effort-capable providers, names the level the run resolves to, and applies it as a soft per-run default. A deliberate per-stage `effort` pin still wins, a level the chosen provider doesn't offer is clamped down its ladder rather than dropped, and a provider with no effort control simply gets no flag.
- Internal: the Autonomous-mode Options popover's saved-default/per-run-override plumbing moved onto a shared `usePersistedOptions` hook. Each option was seven hand-copied edits scattered across a 1000-line component, and forgetting one silently produced the "I toggled it and ran, but it did not apply" bug; an option is now a single spec row that owns its default, its saved-value reader, its clamp and its persist behavior. No behavior change.
+
+- **Video Gen now tells you what runs where, and under whose terms.** Model names such as "LTX-2.3 Distilled Q4 (~22 GB)" carried the only provenance a user got, and the local/hosted backend switch offered a one-line tooltip — so "local" was easy to read as "no rules apply", which is wrong: a local runtime only means PortOS isn't sending your prompt to a hosted provider, it doesn't waive the weights or runtime license. A compact disclosure now sits under the backend and model controls and updates with them, showing whether inference runs on this machine or is submitted to xAI, the model card and pinned revision, the weights license and the (often different) runtime license, the pinned-snapshot download size, the memory minimum against what this machine actually has, supported modes and runtime name. Every value was checked against a primary upstream source — the HuggingFace model card's own license metadata, the runtime project's LICENSE file, the file listing at the pinned revision — and anything that could not be established renders as "Unknown" rather than being guessed from a repo name. Custom models you added yourself show Unknown throughout, and so does a shipped model whose repo you re-pointed at a fork. The local wording says plainly that PortOS applies no model-level prompt filter *and* that the licenses still apply; the hosted wording says the request leaves the machine and xAI's terms and retention apply independently. Nothing about downloads, verification, render arguments or prompt handling changed — this is disclosure only, and it deliberately avoids ranking backends as more or less restrictive.
diff --git a/client/src/components/videoGen/ModelDisclosure.jsx b/client/src/components/videoGen/ModelDisclosure.jsx
new file mode 100644
index 0000000000..cfabe8d0f0
--- /dev/null
+++ b/client/src/components/videoGen/ModelDisclosure.jsx
@@ -0,0 +1,161 @@
+// Selected-model disclosure (#3674) — what runs where, under whose terms.
+//
+// Renders factual, server-sourced metadata for the selected backend/model:
+// local vs hosted execution + policy scope, model card / pinned revision,
+// weights and runtime licenses, download size, memory requirement vs this
+// system, supported modes and runtime name.
+//
+// Two rules this component exists to hold:
+// - A fact the registry does not carry renders as "Unknown". It is NEVER
+// derived from the model's display name, its repo slug, or a sibling model.
+// - Backend wording is rendered verbatim from the server payload
+// (`status.backendDisclosures`), so the policy-scope language lives in one
+// place (server/lib/videoDisclosure.js) and can't drift here.
+//
+// It is deliberately NOT part of `ModelSelect` — that component selects models
+// and must stay a plain picker.
+import { ExternalLink, Server, Cloud } from 'lucide-react';
+
+const UNKNOWN = 'Unknown';
+
+// Compact GB rendering — `estimatedDownloadGb` is decimal GB (10^9 bytes),
+// measured from the pinned repository snapshot on HuggingFace.
+const formatGb = (gb) => (typeof gb === 'number' && gb > 0 ? `~${gb} GB` : null);
+
+function Fact({ label, children }) {
+ return (
+ <div className="min-w-0">
+ <dt className="text-[10px] uppercase tracking-wide text-gray-500">{label}</dt>
+ <dd className="text-[11px] text-gray-300 break-words">{children ?? <span className="text-gray-500">{UNKNOWN}</span>}</dd>
+ </div>
+ );
+}
+
+function FactLink({ href, children }) {
+ return (
+ <a
+ href={href}
+ target="_blank"
+ rel="noreferrer noopener"
+ className="inline-flex items-center gap-1 text-port-accent hover:underline break-all"
+ >
+ {children}
+ <ExternalLink className="w-3 h-3 shrink-0" aria-hidden="true" />
+ </a>
+ );
+}
+
+function LicenseFact({ label, license }) {
+ return (
+ <Fact label={label}>
+ {license?.name
+ ? (license.url ? <FactLink href={license.url}>{license.name}</FactLink> : license.name)
+ : null}
+ </Fact>
+ );
+}
+
+// Minimum unified memory the registry declares for this model, plus how it
+// compares to this machine. Both halves are Unknown-safe: an entry with no
+// `memoryGb`, or a status payload with no `systemMemoryGb`, says so.
+function MemoryFact({ model, systemMemoryGb }) {
+ const required = typeof model?.memoryGb === 'number' ? model.memoryGb : null;
+ const system = typeof systemMemoryGb === 'number' ? systemMemoryGb : null;
+ if (required === null) return <Fact label="Minimum unified memory">{null}</Fact>;
+ const fits = system === null ? null : system >= required;
+ return (
+ <Fact label="Minimum unified memory">
+ {required} GB
+ {system === null ? (
+ <span className="text-gray-500"> · this system: {UNKNOWN}</span>
+ ) : (
+ <span className={fits ? ' text-port-success' : ' text-port-warning'}>
+ {' '}· this system has {system} GB{fits ? '' : ' — below the stated minimum'}
+ </span>
+ )}
+ </Fact>
+ );
+}
+
+export default function ModelDisclosure({ backend = 'local', backendDisclosures, model, systemMemoryGb }) {
+ const list = Array.isArray(backendDisclosures) ? backendDisclosures : [];
+ const backendInfo = list.find((b) => b?.id === backend) || null;
+ const hosted = backendInfo?.execution === 'hosted';
+ // Model metadata only describes the local registry. On a hosted backend the
+ // provider picks the model, so showing local model facts would be wrong.
+ const showModelFacts = !hosted && !!model;
+ const disclosure = model?.disclosure && typeof model.disclosure === 'object' ? model.disclosure : null;
+
+ if (!backendInfo && !showModelFacts) return null;
+
+ const modes = Array.isArray(model?.supportedModes) && model.supportedModes.length > 0
+ ? model.supportedModes.join(', ')
+ : null;
+
+ return (
+ <details className="bg-port-card border border-port-border rounded-xl overflow-hidden">
+ <summary className="cursor-pointer list-none px-3 py-2 text-[11px] text-gray-400 flex flex-wrap items-center gap-x-2 gap-y-1 hover:text-gray-200">
+ {hosted
+ ? <Cloud className="w-3.5 h-3.5 shrink-0 text-port-warning" aria-hidden="true" />
+ : <Server className="w-3.5 h-3.5 shrink-0 text-port-success" aria-hidden="true" />}
+ <span className="font-medium text-gray-300">
+ {hosted ? 'Hosted' : 'Runs on this machine'}
+ </span>
+ {showModelFacts && (
+ <>
+ <span aria-hidden="true">·</span>
+ <span>Weights license: {disclosure?.weightsLicense?.name || UNKNOWN}</span>
+ <span aria-hidden="true">·</span>
+ <span>Download: {formatGb(disclosure?.estimatedDownloadGb) || UNKNOWN}</span>
+ </>
+ )}
+ <span className="text-gray-500 underline">Details</span>
+ </summary>
+
+ <div className="px-3 pb-3 space-y-3 border-t border-port-border/60 pt-2">
+ {backendInfo && (
+ <section aria-label="Execution and policy scope">
+ <p className="text-[11px] text-gray-300">{backendInfo.summary}</p>
+ <ul className="mt-1 space-y-0.5 text-[11px] text-gray-400 list-disc pl-4">
+ {(backendInfo.facts || []).map((fact) => <li key={fact}>{fact}</li>)}
+ </ul>
+ {(backendInfo.links || []).length > 0 && (
+ <p className="mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px]">
+ {backendInfo.links.map((link) => (
+ <FactLink key={link.url} href={link.url}>{link.label}</FactLink>
+ ))}
+ </p>
+ )}
+ </section>
+ )}
+
+ {showModelFacts && (
+ <section aria-label="Selected model disclosure">
+ <dl className="grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-2">
+ <Fact label="Model card / source">
+ {disclosure?.modelCardUrl
+ ? <FactLink href={disclosure.modelCardUrl}>{model?.repo || disclosure.modelCardUrl}</FactLink>
+ : (model?.repo || null)}
+ </Fact>
+ <Fact label="Pinned revision">
+ {model?.revision ? <code className="text-gray-400">{model.revision}</code> : null}
+ </Fact>
+ <LicenseFact label="Weights license" license={disclosure?.weightsLicense} />
+ <LicenseFact label="Runtime license" license={disclosure?.runtimeLicense} />
+ <Fact label="Estimated download">{formatGb(disclosure?.estimatedDownloadGb)}</Fact>
+ <MemoryFact model={model} systemMemoryGb={systemMemoryGb} />
+ <Fact label="Supported modes">{modes}</Fact>
+ <Fact label="Runtime">{model?.runtime || null}</Fact>
+ </dl>
+ <p className="mt-2 text-[10px] text-gray-500">
+ {disclosure?.reviewedAt
+ ? `Disclosure facts checked against upstream sources on ${disclosure.reviewedAt}. `
+ : ''}
+ &ldquo;{UNKNOWN}&rdquo; means PortOS has no source-backed value — it is not a claim that the fact does not exist.
+ </p>
+ </section>
+ )}
+ </div>
+ </details>
+ );
+}
diff --git a/client/src/components/videoGen/ModelDisclosure.test.jsx b/client/src/components/videoGen/ModelDisclosure.test.jsx
new file mode 100644
index 0000000000..bc7bdc2656
--- /dev/null
+++ b/client/src/components/videoGen/ModelDisclosure.test.jsx
@@ -0,0 +1,136 @@
+import { describe, it, expect } from 'vitest';
+import { render, screen, within } from '@testing-library/react';
+import ModelDisclosure from './ModelDisclosure.jsx';
+
+const BACKENDS = [
+ {
+ id: 'local',
+ label: 'Local',
+ execution: 'local',
+ summary: 'Inference runs on this PortOS machine.',
+ facts: [
+ 'This render path does not send your prompt or source media to a hosted inference provider.',
+ 'PortOS applies no model-level prompt filter on this path.',
+ 'The model weights license and the runtime license still apply.',
+ ],
+ links: [],
+ },
+ {
+ id: 'grok',
+ label: 'Grok',
+ execution: 'hosted',
+ provider: 'xAI',
+ summary: 'Inference is submitted to xAI and leaves this machine.',
+ facts: ['Your prompt and any source image are sent to xAI to render the clip.'],
+ links: [{ label: 'xAI legal terms', url: 'https://x.ai/legal' }],
+ },
+];
+
+const SHIPPED_MODEL = {
+ id: 'example_video',
+ name: 'Example Video Model',
+ repo: 'example-org/example-video',
+ revision: 'abc123def456',
+ runtime: 'wan22',
+ supportedModes: ['text', 'image'],
+ memoryGb: 24,
+ disclosure: {
+ modelCardUrl: 'https://huggingface.co/example-org/example-video',
+ weightsLicense: { name: 'Apache-2.0', url: 'https://www.apache.org/licenses/LICENSE-2.0' },
+ runtimeLicense: { name: 'MIT', url: 'https://opensource.org/license/mit' },
+ estimatedDownloadGb: 18.2,
+ reviewedAt: '2026-08-09',
+ },
+};
+
+const renderDisclosure = (props = {}) => render(
+ <ModelDisclosure backendDisclosures={BACKENDS} systemMemoryGb={64} {...props} />,
+);
+
+// The panel body lives inside <details>; jsdom keeps it in the DOM either way,
+// so queries below reach it without needing to toggle the summary open.
+describe('ModelDisclosure', () => {
+ it('shows local execution and policy scope for the local backend', () => {
+ renderDisclosure({ backend: 'local', model: SHIPPED_MODEL });
+ expect(screen.getByText('Inference runs on this PortOS machine.')).toBeInTheDocument();
+ expect(screen.getByText(/does not send your prompt/i)).toBeInTheDocument();
+ expect(screen.getByText(/no model-level prompt filter/i)).toBeInTheDocument();
+ expect(screen.getByText(/license and the runtime license still apply/i)).toBeInTheDocument();
+ expect(screen.getByText('Runs on this machine')).toBeInTheDocument();
+ });
+
+ it('renders the model facts from the registry disclosure', () => {
+ renderDisclosure({ backend: 'local', model: SHIPPED_MODEL });
+ const facts = screen.getByLabelText('Selected model disclosure');
+ expect(within(facts).getByRole('link', { name: /example-org\/example-video/ }))
+ .toHaveAttribute('href', 'https://huggingface.co/example-org/example-video');
+ expect(within(facts).getByText('abc123def456')).toBeInTheDocument();
+ expect(within(facts).getByRole('link', { name: /Apache-2\.0/ }))
+ .toHaveAttribute('href', 'https://www.apache.org/licenses/LICENSE-2.0');
+ expect(within(facts).getByRole('link', { name: /MIT/ })).toBeInTheDocument();
+ expect(within(facts).getByText('~18.2 GB')).toBeInTheDocument();
+ expect(within(facts).getByText('text, image')).toBeInTheDocument();
+ expect(within(facts).getByText('wan22')).toBeInTheDocument();
+ expect(within(facts).getByText(/Disclosure facts checked against upstream sources on 2026-08-09/))
+ .toBeInTheDocument();
+ });
+
+ it('opens external links safely', () => {
+ renderDisclosure({ backend: 'local', model: SHIPPED_MODEL });
+ for (const link of screen.getAllByRole('link')) {
+ expect(link).toHaveAttribute('target', '_blank');
+ expect(link.getAttribute('rel')).toContain('noreferrer');
+ expect(link.getAttribute('href')).toMatch(/^https:\/\//);
+ }
+ });
+
+ it('compares the memory requirement against this system', () => {
+ renderDisclosure({ backend: 'local', model: SHIPPED_MODEL, systemMemoryGb: 64 });
+ expect(screen.getByText(/this system has 64 GB/)).toBeInTheDocument();
+ expect(screen.queryByText(/below the stated minimum/)).not.toBeInTheDocument();
+ });
+
+ it('flags a model that exceeds this system memory', () => {
+ renderDisclosure({ backend: 'local', model: SHIPPED_MODEL, systemMemoryGb: 16 });
+ expect(screen.getByText(/below the stated minimum/)).toBeInTheDocument();
+ });
+
+ it('renders Unknown for every fact a custom model does not carry', () => {
+ const custom = { id: 'mine', name: 'My Model', source: 'user' };
+ renderDisclosure({ backend: 'local', model: custom });
+ const facts = screen.getByLabelText('Selected model disclosure');
+ // model card, revision, weights license, runtime license, download,
+ // memory, modes, runtime → all Unknown.
+ expect(within(facts).getAllByText('Unknown')).toHaveLength(8);
+ expect(within(facts).queryByRole('link')).not.toBeInTheDocument();
+ });
+
+ it('never guesses a license from the model name or repo', () => {
+ const unlicensed = { ...SHIPPED_MODEL, disclosure: { estimatedDownloadGb: 5, reviewedAt: '2026-08-09' } };
+ renderDisclosure({ backend: 'local', model: unlicensed });
+ const facts = screen.getByLabelText('Selected model disclosure');
+ expect(within(facts).queryByText(/Apache/)).not.toBeInTheDocument();
+ expect(within(facts).queryByText(/MIT/)).not.toBeInTheDocument();
+ });
+
+ it('shows hosted provider scope and hides local model facts on the grok backend', () => {
+ renderDisclosure({ backend: 'grok', model: null });
+ expect(screen.getByText('Hosted')).toBeInTheDocument();
+ expect(screen.getByText(/submitted to xAI/)).toBeInTheDocument();
+ expect(screen.getByRole('link', { name: /xAI legal terms/ })).toHaveAttribute('href', 'https://x.ai/legal');
+ expect(screen.queryByLabelText('Selected model disclosure')).not.toBeInTheDocument();
+ });
+
+ it('still renders model facts when the backend payload has not loaded yet', () => {
+ render(<ModelDisclosure backend="local" model={SHIPPED_MODEL} />);
+ expect(screen.queryByLabelText('Execution and policy scope')).not.toBeInTheDocument();
+ expect(screen.getByLabelText('Selected model disclosure')).toBeInTheDocument();
+ });
+
+ it('renders nothing when there is neither a backend disclosure nor a local model view', () => {
+ const { container } = render(<ModelDisclosure backend="grok" backendDisclosures={BACKENDS} model={null} />);
+ expect(container.querySelector('details')).not.toBeNull();
+ const { container: empty } = render(<ModelDisclosure backend="grok" backendDisclosures={[]} model={null} />);
+ expect(empty.querySelector('details')).toBeNull();
+ });
+});
diff --git a/client/src/pages/VideoGen.jsx b/client/src/pages/VideoGen.jsx
index 81f1ce7816..0a4575e696 100644
--- a/client/src/pages/VideoGen.jsx
+++ b/client/src/pages/VideoGen.jsx
@@ -48,6 +48,7 @@ import ExtendPanel from '../components/videoGen/ExtendPanel';
import IcLoraPanel from '../components/videoGen/IcLoraPanel';
import AdvancedParamsPanel from '../components/videoGen/AdvancedParamsPanel';
import RuntimeFingerprint from '../components/videoGen/RuntimeFingerprint';
+import ModelDisclosure from '../components/videoGen/ModelDisclosure';
import ModelRepairBanner from '../components/videoGen/ModelRepairBanner';
import VideoPreviewPanel from '../components/videoGen/VideoPreviewPanel';
import VideoGenGallery from '../components/videoGen/VideoGenGallery';
@@ -1042,6 +1043,17 @@ export default function VideoGen() {
</div>
)}
+ {/* Provenance / licensing / policy-scope disclosure for the selected
+ backend + model (#3674). Sits directly below the backend and model
+ controls and updates with them; purely informational — it never
+ gates or alters a render. */}
+ <ModelDisclosure
+ backend={backend}
+ backendDisclosures={status?.backendDisclosures}
+ model={isGrok ? null : currentModel}
+ systemMemoryGb={status?.systemMemoryGb}
+ />
+
{/* Sampler/output knobs live behind a closed-by-default disclosure so
Generate stays above the fold — the sibling /media/image tab keeps
only Model + Resolution inline for the same reason (issue #3279). */}
diff --git a/data.reference/media-models.json b/data.reference/media-models.json
index cce54bea8a..9c18b9ce8c 100644
--- a/data.reference/media-models.json
+++ b/data.reference/media-models.json
@@ -9,7 +9,20 @@
"runtime": "mlx_video",
"steps": 30,
"guidance": 3,
- "deprecated": true
+ "deprecated": true,
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/notapalindrome/ltx2-mlx-av",
+ "weightsLicense": {
+ "name": "MIT",
+ "url": "https://opensource.org/license/mit"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://pypi.org/project/mlx-video-with-audio/"
+ },
+ "estimatedDownloadGb": 44.7,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "ltx23_unified",
@@ -17,7 +30,16 @@
"repo": "notapalindrome/ltx23-mlx-av",
"runtime": "mlx_video",
"steps": 25,
- "guidance": 3
+ "guidance": 3,
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/notapalindrome/ltx23-mlx-av",
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://pypi.org/project/mlx-video-with-audio/"
+ },
+ "estimatedDownloadGb": 53.5,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "ltx23_distilled_q4",
@@ -25,7 +47,16 @@
"repo": "notapalindrome/ltx23-mlx-av-q4",
"runtime": "mlx_video",
"steps": 25,
- "guidance": 3
+ "guidance": 3,
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/notapalindrome/ltx23-mlx-av-q4",
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://pypi.org/project/mlx-video-with-audio/"
+ },
+ "estimatedDownloadGb": 22.8,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "ltx23_dgrauet_q4",
@@ -33,7 +64,20 @@
"repo": "dgrauet/ltx-2.3-mlx-q4",
"runtime": "ltx2",
"steps": 8,
- "guidance": 3
+ "guidance": 3,
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/dgrauet/ltx-2.3-mlx-q4",
+ "weightsLicense": {
+ "name": "Custom — see model card",
+ "url": "https://huggingface.co/dgrauet/ltx-2.3-mlx-q4"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://github.com/dgrauet/ltx-2-mlx/blob/main/LICENSE"
+ },
+ "estimatedDownloadGb": 59.7,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "ltx23_dgrauet_q8",
@@ -41,7 +85,20 @@
"repo": "dgrauet/ltx-2.3-mlx-q8",
"runtime": "ltx2",
"steps": 8,
- "guidance": 3
+ "guidance": 3,
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/dgrauet/ltx-2.3-mlx-q8",
+ "weightsLicense": {
+ "name": "Custom — see model card",
+ "url": "https://huggingface.co/dgrauet/ltx-2.3-mlx-q8"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://github.com/dgrauet/ltx-2-mlx/blob/main/LICENSE"
+ },
+ "estimatedDownloadGb": 87.5,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "wan22_ti2v_5b",
@@ -49,14 +106,34 @@
"repo": "AbstractFramework/wan2.2-ti2v-5b-diffusers-8bit",
"revision": "6875952a110b6bdbcfc00d72b1d89a8e02ab0fc3",
"runtime": "wan22",
- "supportedModes": ["text", "image"],
+ "supportedModes": [
+ "text",
+ "image"
+ ],
"frameStride": 4,
- "fpsOptions": [16, 20, 24],
+ "fpsOptions": [
+ 16,
+ 20,
+ 24
+ ],
"memoryGb": 24,
"steps": 25,
"guidance": 5,
"flowShift": 3,
- "solver": "unipc"
+ "solver": "unipc",
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/AbstractFramework/wan2.2-ti2v-5b-diffusers-8bit",
+ "weightsLicense": {
+ "name": "Apache-2.0",
+ "url": "https://www.apache.org/licenses/LICENSE-2.0"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://github.com/lpalbou/mlx-gen/blob/main/LICENSE"
+ },
+ "estimatedDownloadGb": 18.2,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "wan22_t2v_a14b",
@@ -64,15 +141,34 @@
"repo": "AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit",
"revision": "39ee5f1f630789956f29f40b5c2c6d48c6e9a798",
"runtime": "wan22",
- "supportedModes": ["text"],
+ "supportedModes": [
+ "text"
+ ],
"frameStride": 4,
- "fpsOptions": [16, 20, 24],
+ "fpsOptions": [
+ 16,
+ 20,
+ 24
+ ],
"memoryGb": 48,
"steps": 20,
"guidance": 4,
"guidance2": 3,
"flowShift": 3,
- "solver": "unipc"
+ "solver": "unipc",
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit",
+ "weightsLicense": {
+ "name": "Apache-2.0",
+ "url": "https://www.apache.org/licenses/LICENSE-2.0"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://github.com/lpalbou/mlx-gen/blob/main/LICENSE"
+ },
+ "estimatedDownloadGb": 42.4,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "wan22_i2v_a14b",
@@ -80,15 +176,34 @@
"repo": "AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit",
"revision": "1a17fbea2649c576de844e08e79fe56296751efa",
"runtime": "wan22",
- "supportedModes": ["image"],
+ "supportedModes": [
+ "image"
+ ],
"frameStride": 4,
- "fpsOptions": [16, 20, 24],
+ "fpsOptions": [
+ 16,
+ 20,
+ 24
+ ],
"memoryGb": 48,
"steps": 20,
"guidance": 3.5,
"guidance2": 3.5,
"flowShift": 3,
- "solver": "unipc"
+ "solver": "unipc",
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit",
+ "weightsLicense": {
+ "name": "Apache-2.0",
+ "url": "https://www.apache.org/licenses/LICENSE-2.0"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://github.com/lpalbou/mlx-gen/blob/main/LICENSE"
+ },
+ "estimatedDownloadGb": 42.4,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "wan22_t2v_a14b_lightning",
@@ -96,9 +211,15 @@
"repo": "AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit",
"revision": "39ee5f1f630789956f29f40b5c2c6d48c6e9a798",
"runtime": "wan22",
- "supportedModes": ["text"],
+ "supportedModes": [
+ "text"
+ ],
"frameStride": 4,
- "fpsOptions": [16, 20, 24],
+ "fpsOptions": [
+ 16,
+ 20,
+ 24
+ ],
"memoryGb": 48,
"steps": 4,
"guidance": 1,
@@ -106,15 +227,33 @@
"flowShift": 5,
"solver": "euler",
"samplerLocked": true,
- "requiredWeights": [{
- "repo": "lightx2v/Wan2.2-Lightning",
- "revision": "18bccf8884ec0a078eed79785eb4ef13ea16ce1e",
- "files": [
- "Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1.1/high_noise_model.safetensors",
- "Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1.1/low_noise_model.safetensors"
- ],
- "targetRoles": ["high_noise_transformer", "low_noise_transformer"]
- }]
+ "requiredWeights": [
+ {
+ "repo": "lightx2v/Wan2.2-Lightning",
+ "revision": "18bccf8884ec0a078eed79785eb4ef13ea16ce1e",
+ "files": [
+ "Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1.1/high_noise_model.safetensors",
+ "Wan2.2-T2V-A14B-4steps-lora-rank64-Seko-V1.1/low_noise_model.safetensors"
+ ],
+ "targetRoles": [
+ "high_noise_transformer",
+ "low_noise_transformer"
+ ]
+ }
+ ],
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit",
+ "weightsLicense": {
+ "name": "Apache-2.0",
+ "url": "https://www.apache.org/licenses/LICENSE-2.0"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://github.com/lpalbou/mlx-gen/blob/main/LICENSE"
+ },
+ "estimatedDownloadGb": 44.9,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "wan22_i2v_a14b_lightning",
@@ -122,9 +261,15 @@
"repo": "AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit",
"revision": "1a17fbea2649c576de844e08e79fe56296751efa",
"runtime": "wan22",
- "supportedModes": ["image"],
+ "supportedModes": [
+ "image"
+ ],
"frameStride": 4,
- "fpsOptions": [16, 20, 24],
+ "fpsOptions": [
+ 16,
+ 20,
+ 24
+ ],
"memoryGb": 48,
"steps": 4,
"guidance": 1,
@@ -132,15 +277,33 @@
"flowShift": 5,
"solver": "euler",
"samplerLocked": true,
- "requiredWeights": [{
- "repo": "lightx2v/Wan2.2-Lightning",
- "revision": "18bccf8884ec0a078eed79785eb4ef13ea16ce1e",
- "files": [
- "Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1/high_noise_model.safetensors",
- "Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1/low_noise_model.safetensors"
- ],
- "targetRoles": ["high_noise_transformer", "low_noise_transformer"]
- }]
+ "requiredWeights": [
+ {
+ "repo": "lightx2v/Wan2.2-Lightning",
+ "revision": "18bccf8884ec0a078eed79785eb4ef13ea16ce1e",
+ "files": [
+ "Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1/high_noise_model.safetensors",
+ "Wan2.2-I2V-A14B-4steps-lora-rank64-Seko-V1/low_noise_model.safetensors"
+ ],
+ "targetRoles": [
+ "high_noise_transformer",
+ "low_noise_transformer"
+ ]
+ }
+ ],
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit",
+ "weightsLicense": {
+ "name": "Apache-2.0",
+ "url": "https://www.apache.org/licenses/LICENSE-2.0"
+ },
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://github.com/lpalbou/mlx-gen/blob/main/LICENSE"
+ },
+ "estimatedDownloadGb": 44.9,
+ "reviewedAt": "2026-08-09"
+ }
},
{
"id": "hunyuan_video",
@@ -151,7 +314,20 @@
"steps": 30,
"guidance": 6,
"precision": "fp32",
- "deprecated": true
+ "deprecated": true,
+ "disclosure": {
+ "modelCardUrl": "https://huggingface.co/tencent/HunyuanVideo",
+ "weightsLicense": {
+ "name": "Tencent Hunyuan Community License",
+ "url": "https://huggingface.co/tencent/HunyuanVideo/blob/main/LICENSE"
+ },
+ "runtimeLicense": {
+ "name": "Tencent Hunyuan Community License",
+ "url": "https://github.com/gaurav-nelson/HunyuanVideo_MLX/blob/main/LICENSE.txt"
+ },
+ "estimatedDownloadGb": 39.8,
+ "reviewedAt": "2026-08-09"
+ }
}
],
"windows": [
@@ -160,7 +336,14 @@
"name": "LTX-Video 0.9.5 — T2V + I2V (~9.5 GB, auto-downloads)",
"runtime": "mlx_video",
"steps": 25,
- "guidance": 3
+ "guidance": 3,
+ "disclosure": {
+ "runtimeLicense": {
+ "name": "MIT",
+ "url": "https://pypi.org/project/mlx-video-with-audio/"
+ },
+ "reviewedAt": "2026-08-09"
+ }
}
],
"defaultMacos": "ltx23_distilled_q4",
diff --git a/scripts/migrations/237-video-model-disclosure.js b/scripts/migrations/237-video-model-disclosure.js
new file mode 100644
index 0000000000..d298da145a
--- /dev/null
+++ b/scripts/migrations/237-video-model-disclosure.js
@@ -0,0 +1,60 @@
+/**
+ * Attach provenance/licensing disclosure metadata to shipped video models
+ * (issue #3674) in existing installs.
+ *
+ * `data.reference/media-models.json` ships the new `disclosure` block for fresh
+ * installs, and `mediaModels.js` backfills it at load — but `data/
+ * media-models.json` is the gitignored, user-editable copy that is never
+ * merge-updated, so this migration makes the change durable on disk instead of
+ * relying on the in-memory backfill running every boot.
+ *
+ * Preservation contract (identical to `applyVideoDisclosures`):
+ * - an entry that already has a `disclosure` key is left alone (user edit)
+ * - an id the user deleted is NOT recreated
+ * - a custom / user-added model is untouched (no shipped facts exist for it)
+ * - an entry whose `repo` was re-pointed at a fork is skipped — upstream's
+ * license and download-size facts must not be attributed to a fork
+ * - entry order is preserved; nothing else on the entry is modified
+ */
+
+import { readFile } from 'fs/promises';
+import { join } from 'path';
+import { atomicWrite } from '../../server/lib/fileUtils.js';
+import { applyVideoDisclosures } from '../../server/lib/videoDisclosure.js';
+
+const REL_PATH = 'data/media-models.json';
+const PLATFORMS = ['macos', 'windows'];
+
+export default {
+ async up({ rootDir }) {
+ const path = join(rootDir, REL_PATH);
+ const raw = await readFile(path, 'utf-8').catch((err) => {
+ if (err.code === 'ENOENT') return null;
+ throw err;
+ });
+ if (raw == null) return;
+ let config;
+ try {
+ config = JSON.parse(raw);
+ } catch (err) {
+ throw new Error(`Cannot migrate ${REL_PATH}: invalid JSON (${err.message})`, { cause: err });
+ }
+ if (!config?.video || typeof config.video !== 'object') return;
+
+ let enriched = 0;
+ for (const platform of PLATFORMS) {
+ const list = config.video[platform];
+ if (!Array.isArray(list)) continue;
+ const next = applyVideoDisclosures(list);
+ for (let i = 0; i < list.length; i += 1) {
+ if (next[i] !== list[i]) enriched += 1;
+ }
+ config.video[platform] = next;
+ }
+
+ if (enriched > 0) {
+ await atomicWrite(path, `${JSON.stringify(config, null, 2)}\n`);
+ console.log(`📝 ${REL_PATH}: added model disclosure metadata to ${enriched} video ${enriched === 1 ? 'entry' : 'entries'}`);
+ }
+ },
+};
diff --git a/scripts/migrations/237-video-model-disclosure.test.js b/scripts/migrations/237-video-model-disclosure.test.js
new file mode 100644
index 0000000000..bd7bb7154a
--- /dev/null
+++ b/scripts/migrations/237-video-model-disclosure.test.js
@@ -0,0 +1,132 @@
+import { describe, it, expect, beforeEach, afterEach } from 'vitest';
+import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync, mkdirSync } from 'fs';
+import { tmpdir } from 'os';
+import { join } from 'path';
+
+import migration from './237-video-model-disclosure.js';
+import { VIDEO_MODEL_DISCLOSURES } from '../../server/lib/videoDisclosure.js';
+
+const writeJson = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + '\n');
+const readJson = (path) => JSON.parse(readFileSync(path, 'utf-8'));
+
+const HUNYUAN_REPO = VIDEO_MODEL_DISCLOSURES.hunyuan_video.shippedRepo;
+const TI2V_REPO = VIDEO_MODEL_DISCLOSURES.wan22_ti2v_5b.shippedRepo;
+
+const baseRegistry = (overrides = {}) => ({
+ video: {
+ macos: [
+ { id: 'wan22_ti2v_5b', name: 'Wan 2.2 TI2V 5B', repo: TI2V_REPO, runtime: 'wan22', steps: 25, ...overrides },
+ { id: 'hunyuan_video', name: 'HunyuanVideo', repo: HUNYUAN_REPO, runtime: 'hunyuan', steps: 30 },
+ { id: 'my_custom_model', name: 'My Custom Model', repo: 'example-org/example-video', source: 'user' },
+ ],
+ windows: [{ id: 'ltx_video', name: 'LTX-Video 0.9.5', runtime: 'mlx_video', steps: 25 }],
+ defaultMacos: 'wan22_ti2v_5b',
+ },
+});
+
+const findMacos = (path, id) => readJson(path).video.macos.find((e) => e.id === id);
+
+describe('migration 237 — video model disclosure metadata', () => {
+ let rootDir;
+ let path;
+
+ beforeEach(() => {
+ rootDir = mkdtempSync(join(tmpdir(), 'migration-237-'));
+ mkdirSync(join(rootDir, 'data'), { recursive: true });
+ path = join(rootDir, 'data', 'media-models.json');
+ });
+
+ afterEach(() => {
+ rmSync(rootDir, { recursive: true, force: true });
+ });
+
+ it('enriches shipped video entries with source-backed disclosure metadata', async () => {
+ writeJson(path, baseRegistry());
+ await migration.up({ rootDir });
+ const entry = findMacos(path, 'hunyuan_video');
+ expect(entry.disclosure).toEqual(VIDEO_MODEL_DISCLOSURES.hunyuan_video.disclosure);
+ expect(entry.disclosure.weightsLicense.name).toBe('Tencent Hunyuan Community License');
+ expect(entry.disclosure.runtimeLicense.name).toBe('Tencent Hunyuan Community License');
+ expect(entry.disclosure.estimatedDownloadGb).toBeGreaterThan(0);
+ });
+
+ it('enriches the windows list too', async () => {
+ writeJson(path, baseRegistry());
+ await migration.up({ rootDir });
+ const entry = readJson(path).video.windows.find((e) => e.id === 'ltx_video');
+ expect(entry.disclosure.runtimeLicense.name).toBe('MIT');
+ // No repo → no model card and no weights license we can attribute.
+ expect('modelCardUrl' in entry.disclosure).toBe(false);
+ expect('weightsLicense' in entry.disclosure).toBe(false);
+ });
+
+ it('preserves canonical fields and entry order', async () => {
+ writeJson(path, baseRegistry());
+ await migration.up({ rootDir });
+ const got = readJson(path);
+ expect(got.video.macos.map((e) => e.id)).toEqual(['wan22_ti2v_5b', 'hunyuan_video', 'my_custom_model']);
+ const ti2v = got.video.macos[0];
+ expect(ti2v.repo).toBe(TI2V_REPO);
+ expect(ti2v.runtime).toBe('wan22');
+ expect(ti2v.steps).toBe(25);
+ expect(got.video.defaultMacos).toBe('wan22_ti2v_5b');
+ });
+
+ it('does not duplicate canonical fields inside disclosure', async () => {
+ writeJson(path, baseRegistry());
+ await migration.up({ rootDir });
+ const keys = Object.keys(findMacos(path, 'wan22_ti2v_5b').disclosure);
+ for (const canonical of ['repo', 'revision', 'runtime', 'memoryGb', 'supportedModes', 'requiredWeights']) {
+ expect(keys).not.toContain(canonical);
+ }
+ });
+
+ it('leaves custom (user-added) models untouched', async () => {
+ writeJson(path, baseRegistry());
+ await migration.up({ rootDir });
+ const custom = findMacos(path, 'my_custom_model');
+ expect('disclosure' in custom).toBe(false);
+ });
+
+ it('preserves a user-customized disclosure (including an intentional clear)', async () => {
+ writeJson(path, baseRegistry({ disclosure: null }));
+ await migration.up({ rootDir });
+ expect(findMacos(path, 'wan22_ti2v_5b').disclosure).toBe(null);
+ });
+
+ it('skips an entry whose repo was re-pointed at a fork', async () => {
+ writeJson(path, baseRegistry({ repo: 'example-org/wan2.2-fork' }));
+ await migration.up({ rootDir });
+ expect('disclosure' in findMacos(path, 'wan22_ti2v_5b')).toBe(false);
+ });
+
+ it('does not recreate entries the user deleted', async () => {
+ writeJson(path, { video: { macos: [{ id: 'hunyuan_video', repo: HUNYUAN_REPO }], windows: [] } });
+ await migration.up({ rootDir });
+ expect(readJson(path).video.macos.map((e) => e.id)).toEqual(['hunyuan_video']);
+ });
+
+ it('is idempotent — a second run rewrites nothing', async () => {
+ writeJson(path, baseRegistry());
+ await migration.up({ rootDir });
+ const after = readFileSync(path, 'utf-8');
+ await migration.up({ rootDir });
+ expect(readFileSync(path, 'utf-8')).toBe(after);
+ });
+
+ it('skips silently when data/media-models.json is missing (fresh install)', async () => {
+ await migration.up({ rootDir });
+ expect(existsSync(path)).toBe(false);
+ });
+
+ it('skips when the video section is missing entirely', async () => {
+ writeJson(path, { image: [] });
+ await migration.up({ rootDir });
+ expect(readJson(path)).toEqual({ image: [] });
+ });
+
+ it('throws a clear error on invalid JSON', async () => {
+ writeFileSync(path, '{ not json');
+ await expect(migration.up({ rootDir })).rejects.toThrow(/invalid JSON/);
+ });
+});
diff --git a/server/lib/README.md b/server/lib/README.md
index fd33b13c7a..695f02e7f5 100644
--- a/server/lib/README.md
+++ b/server/lib/README.md
@@ -109,6 +109,7 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub
| `promptTemplate.js` | Mustache-flavored, dot-notation-aware prompt template engine. |
| `promptPartials.js` | Mustache-style partial expansion. |
| `mediaModels.js` | Single source of truth for image/video model metadata. |
+| `videoDisclosure.js` | Video Gen provenance/licensing + backend policy-scope facts (#3674). `VIDEO_MODEL_DISCLOSURES` maps each shipped video model id to `{ shippedRepo, disclosure }` (model card URL, weights license, runtime license, pinned-snapshot download size in decimal GB, review date) — every value checked against a primary upstream source, and any fact that could not be established is OMITTED so the UI renders "Unknown" instead of guessing. `applyVideoDisclosures(list)` is the load-time backfill (twin of migration 237) with the same preservation guards: an existing `disclosure` key wins, a custom id is skipped, and a `repo` pointed at a fork keeps Unknown. `VIDEO_BACKEND_DISCLOSURES` / `videoBackendDisclosure(id)` state where inference runs (`execution: local or hosted`) and whose policy applies — execution facts only, never a restrictiveness ranking. |
| `providerModels.js` | Provider model resolution sentinels + helpers (`CODEX_CONFIGURED_DEFAULT` / `ANTIGRAVITY_CONFIGURED_DEFAULT` / `GROK_CONFIGURED_DEFAULT` / `KIMI_CONFIGURED_DEFAULT`, `resolveCliModel`, `filterSelectableModels`, Bedrock/OpenCode model mappers, model-flag scan helpers incl. `stripBrokenModelFlags`, `isCodexProvider`, `isKimiProvider`, `isAntigravityProvider`) plus reasoning-effort helpers for the claude/codex/agy CLIs (`CLAUDE_EFFORT_LEVELS` / `CODEX_EFFORT_LEVELS` / `ANTIGRAVITY_EFFORT_LEVELS` / `EFFORT_LEVELS`, `effortLevelsForProvider`, `resolveCliEffort` — clamps an out-of-range effort to the nearest level the target CLI accepts rather than dropping it, so a value saved against a wider ladder survives a provider switch — `hasEffortFlag`, and `buildEffortArgs` — the one emitter of `--effort <level>` / `-c model_reasoning_effort=<level>`) plus codex startup-arg helpers (`CODEX_UPDATE_CHECK_KEY`, `hasCodexUpdateCheckConfig`, `buildCodexStartupArgs` — the one emitter of `-c check_for_update_on_startup=false`, spread by every codex spawn builder to disable the blocking startup update modal). |
| `providerVendors.js` | `PROVIDER_VENDORS` — one row per coding-agent CLI/TUI vendor (claude/codex/antigravity/opencode/grok/kimi/cursor, plus a deliberately-incomplete legacy `gemini-cli` row), consumed by every dispatch site that used to hand-roll its own vendor if-chain across ~8 branches in 5 files (#3618): `applyCommandDefaults`/`prepareCliPrompt` (re-exported from `tuiHandshake.js`/`cliProviderArgs.js`), `buildVendorCliArgs`/`buildVendorSpawnConfig` (consumed by `cliProviderArgs.js#buildCliArgs` / `agentCliSpawning.js#buildCliSpawnConfig`), `inferTuiCommand` (re-exported from `tuiHandshake.js`), and `injectTuiModelAndEffort` — the shared antigravity-validates-the-pair-vs-everyone-else `--model`/`--effort` injection used by both `tuiHandshake.js#buildTuiInvocation` and `agentTuiSpawning.js#buildTuiSpawnConfig`, replacing a second copy of that split that had already drifted once before this file existed. Doesn't rewrite any vendor's argv-building logic — that stays in `antigravity.js`/`grok.js`/`kimi.js`/`cursor.js`/`codex.js`. Dependency-light on purpose, mirroring those files. |
| `modelPricing.js` | Per-model API billing rates for the /devtools/usage cost estimates — `resolveModelRates(providerId, model)` (exact → family regex → provider default → blended fallback, with a `matched` tier; also derives `cacheReadPer1M`/`cacheWritePer1M` from the input rate via per-family multipliers), `isFreeProvider` (ollama/lmstudio/`ollamaBacked`/localhost = free), `estimateCostUsd(tokensIn, tokensOut, rates, cache?)` — `tokensIn` is UNCACHED input; cache tiers are priced separately via the optional 4th arg — and `PRICING_AS_OF`. Informational only (PortOS runs on subscriptions); still excludes batch/long-context tiers. |
diff --git a/server/lib/index.js b/server/lib/index.js
index ed68360a3f..9be6b7e9ce 100644
--- a/server/lib/index.js
+++ b/server/lib/index.js
@@ -109,6 +109,7 @@ export * from './sseHeaders.js';
export * from './installLogger.js';
export * from './kimi.js';
export * from './mediaModels.js';
+export * from './videoDisclosure.js';
export * from './promptPartials.js';
export * from './promptRunner.js';
export * from './promptSystemStages.js';
diff --git a/server/lib/mediaModels.js b/server/lib/mediaModels.js
index cdf577e5b4..eb3af8935b 100644
--- a/server/lib/mediaModels.js
+++ b/server/lib/mediaModels.js
@@ -8,7 +8,14 @@
* cached at boot — there's no hot-reload).
*
* Schema (see seed defaults below for the full picture):
- * - video.macos[], video.windows[]: { id, name, repo?, steps, guidance, broken? }
+ * - video.macos[], video.windows[]: { id, name, repo?, steps, guidance, broken?, disclosure? }
+ * `disclosure` is optional provenance/licensing metadata (issue #3674):
+ * { modelCardUrl?, weightsLicense?: { name, url }, runtimeLicense?: { name, url },
+ * estimatedDownloadGb?, reviewedAt? }. Every key is optional and an
+ * absent key means "not established" — the UI renders it as Unknown
+ * rather than guessing. Canonical fields (repo/revision/runtime/memoryGb/
+ * supportedModes/requiredWeights) are NOT duplicated inside it. Shipped
+ * values live in lib/videoDisclosure.js and are backfilled at load.
* - video.defaultMacos / video.defaultWindows: id of the default model
* - image[]: { id, name, steps, guidance, broken? }
* - textEncoders[]: { id, label, repo, localPath? }
@@ -21,6 +28,7 @@ import { PATHS, expandHome } from './fileUtils.js';
import { isPlainObject } from './objects.js';
import { RUNNER_FAMILIES } from './runners.js';
import { ServerError } from './errorHandler.js';
+import { applyVideoDisclosures } from './videoDisclosure.js';
// fileUtils.ensureDir is async/Promise-returning; this module needs a
// synchronous version because `loadMediaModels()` is called at import-time
// from videoGen/imageGen modules, which can't await before exporting.
@@ -33,7 +41,11 @@ const IS_WIN = process.platform === 'win32';
const DEFAULT_REGISTRY = {
_doc: 'PortOS media model registry. Edit to add models, tune defaults, or switch the text encoder. Restart the server to apply changes.',
video: {
- macos: [
+ // `applyVideoDisclosures` attaches the shipped provenance/licensing block
+ // (lib/videoDisclosure.js) to each entry, so the seed written on a fresh
+ // install, the in-memory defaults, and data.reference/media-models.json all
+ // carry the same disclosure without repeating it inline here.
+ macos: applyVideoDisclosures([
// notapalindrome's mlx-video-with-audio runtime — single PyPI package,
// T2V/I2V only, FFLF degrades to last-frame conditioning (one --image arg).
// LTX-2 (the older 42 GB model) stays deprecated — superseded by 2.3.
@@ -171,10 +183,10 @@ const DEFAULT_REGISTRY = {
precision: 'fp32',
deprecated: true,
},
- ],
- windows: [
+ ]),
+ windows: applyVideoDisclosures([
{ id: 'ltx_video', name: 'LTX-Video 0.9.5 — T2V + I2V (~9.5 GB, auto-downloads)', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
- ],
+ ]),
defaultMacos: 'ltx23_distilled_q4',
defaultWindows: 'ltx_video',
},
@@ -644,8 +656,12 @@ const normalizeRegistry = (parsed) => {
video: {
...DEFAULT_REGISTRY.video,
...safeVideo,
- macos: backfillRuntime(macosResult.entries),
- windows: backfillRuntime(windowsResult.entries),
+ // applyVideoDisclosures is the load-time twin of migration 237: installs
+ // that persisted their registry before `disclosure` existed pick it up
+ // here without waiting for the migration, and both paths share the same
+ // preservation guards (user value wins, forked repo keeps Unknown).
+ macos: applyVideoDisclosures(backfillRuntime(macosResult.entries)),
+ windows: applyVideoDisclosures(backfillRuntime(windowsResult.entries)),
},
_shippedDefaults: {
...(safe._shippedDefaults || {}),
diff --git a/server/lib/videoDisclosure.js b/server/lib/videoDisclosure.js
new file mode 100644
index 0000000000..11c41a08d5
--- /dev/null
+++ b/server/lib/videoDisclosure.js
@@ -0,0 +1,274 @@
+/**
+ * Video Gen disclosure facts — provenance/licensing metadata for the shipped
+ * video models, plus the execution/policy scope of each render backend.
+ *
+ * Two related concerns, one module, because both answer the same user
+ * question: "what actually happens, and under whose terms, when I hit
+ * Generate?" (issue #3674).
+ *
+ * Rules this module exists to enforce:
+ * - Every value is a FACT from a primary upstream source (the HuggingFace
+ * model card's declared license metadata, the runtime project's LICENSE,
+ * the pinned revision's file listing). Nothing is inferred from a display
+ * name or a repository slug.
+ * - A fact we could not establish is OMITTED, never guessed. The UI renders
+ * "Unknown" for an absent key — that's the intended, honest outcome
+ * (custom/user-added models have no disclosure at all).
+ * - Backend disclosures describe execution and policy scope only. They are
+ * NOT a ranking: no "uncensored"/"safe"/"unrestricted" labels, and the
+ * absence of a PortOS prompt filter is never a promise about output.
+ *
+ * Canonical fields (`repo`, `revision`, `runtime`, `memoryGb`,
+ * `supportedModes`, `requiredWeights`) stay on the registry entry itself and
+ * are deliberately NOT duplicated here.
+ */
+
+// Every shipped disclosure was checked against its upstream source on this
+// date. Bump it (and re-check) whenever an entry below changes.
+export const VIDEO_DISCLOSURE_REVIEWED_AT = '2026-08-09';
+
+// License descriptors reused across entries. `url` points at the primary text
+// of the license, or at the model card when the card declares a custom license
+// without publishing a distinct document.
+const MIT = { name: 'MIT', url: 'https://opensource.org/license/mit' };
+const APACHE_2 = { name: 'Apache-2.0', url: 'https://www.apache.org/licenses/LICENSE-2.0' };
+const TENCENT_HUNYUAN_WEIGHTS = {
+ name: 'Tencent Hunyuan Community License',
+ url: 'https://huggingface.co/tencent/HunyuanVideo/blob/main/LICENSE',
+};
+
+// Runtime (inference code) licenses, keyed by the registry's `runtime` value.
+// Distinct from the weights license — a permissively-licensed runtime does not
+// relicense the weights it loads, and vice versa.
+const RUNTIME_LICENSE = {
+ // PyPI `mlx-video-with-audio` (the package scripts/setup-image-video.sh
+ // installs — NOT the unrelated PyPI `mlx_video`).
+ mlx_video: { name: 'MIT', url: 'https://pypi.org/project/mlx-video-with-audio/' },
+ ltx2: { name: 'MIT', url: 'https://github.com/dgrauet/ltx-2-mlx/blob/main/LICENSE' },
+ wan22: { name: 'MIT', url: 'https://github.com/lpalbou/mlx-gen/blob/main/LICENSE' },
+ hunyuan: {
+ name: 'Tencent Hunyuan Community License',
+ url: 'https://github.com/gaurav-nelson/HunyuanVideo_MLX/blob/main/LICENSE.txt',
+ },
+};
+
+const hfModelCard = (repo) => `https://huggingface.co/${repo}`;
+
+// A model card that declares `license: other` with no `license_name` /
+// `license_link` — the only honest rendering is "custom, read the card".
+const customLicense = (repo) => ({ name: 'Custom — see model card', url: hfModelCard(repo) });
+
+/**
+ * Shipped disclosure metadata, keyed by registry entry id.
+ *
+ * `shippedRepo` is the fork-preservation guard (same contract as
+ * `backfillKvRepo` in mediaModels.js): the disclosure is only attached when the
+ * entry still points at the repo these facts were checked against. A user who
+ * re-pointed `repo` at a fork keeps "Unknown" rather than inheriting upstream's
+ * license and size claims.
+ *
+ * `estimatedDownloadGb` is the total size of the pinned repository snapshot in
+ * decimal GB (10^9 bytes), summed from the HuggingFace file listing at the
+ * entry's pinned revision (or `main` when unpinned) — i.e. what PortOS's own
+ * download path actually pulls, which can exceed the resident-memory figure in
+ * a model's display name. Lightning entries include their `requiredWeights`
+ * LoRA files.
+ */
+export const VIDEO_MODEL_DISCLOSURES = Object.freeze({
+ ltx2_unified: {
+ shippedRepo: 'notapalindrome/ltx2-mlx-av',
+ disclosure: {
+ modelCardUrl: hfModelCard('notapalindrome/ltx2-mlx-av'),
+ weightsLicense: MIT,
+ runtimeLicense: RUNTIME_LICENSE.mlx_video,
+ estimatedDownloadGb: 44.7,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ ltx23_unified: {
+ shippedRepo: 'notapalindrome/ltx23-mlx-av',
+ disclosure: {
+ modelCardUrl: hfModelCard('notapalindrome/ltx23-mlx-av'),
+ // Model card declares no license — omitted, renders as Unknown.
+ runtimeLicense: RUNTIME_LICENSE.mlx_video,
+ estimatedDownloadGb: 53.5,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ ltx23_distilled_q4: {
+ shippedRepo: 'notapalindrome/ltx23-mlx-av-q4',
+ disclosure: {
+ modelCardUrl: hfModelCard('notapalindrome/ltx23-mlx-av-q4'),
+ // Model card declares no license — omitted, renders as Unknown.
+ runtimeLicense: RUNTIME_LICENSE.mlx_video,
+ estimatedDownloadGb: 22.8,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ ltx23_dgrauet_q4: {
+ shippedRepo: 'dgrauet/ltx-2.3-mlx-q4',
+ disclosure: {
+ modelCardUrl: hfModelCard('dgrauet/ltx-2.3-mlx-q4'),
+ weightsLicense: customLicense('dgrauet/ltx-2.3-mlx-q4'),
+ runtimeLicense: RUNTIME_LICENSE.ltx2,
+ estimatedDownloadGb: 59.7,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ ltx23_dgrauet_q8: {
+ shippedRepo: 'dgrauet/ltx-2.3-mlx-q8',
+ disclosure: {
+ modelCardUrl: hfModelCard('dgrauet/ltx-2.3-mlx-q8'),
+ weightsLicense: customLicense('dgrauet/ltx-2.3-mlx-q8'),
+ runtimeLicense: RUNTIME_LICENSE.ltx2,
+ estimatedDownloadGb: 87.5,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ wan22_ti2v_5b: {
+ shippedRepo: 'AbstractFramework/wan2.2-ti2v-5b-diffusers-8bit',
+ disclosure: {
+ modelCardUrl: hfModelCard('AbstractFramework/wan2.2-ti2v-5b-diffusers-8bit'),
+ weightsLicense: APACHE_2,
+ runtimeLicense: RUNTIME_LICENSE.wan22,
+ estimatedDownloadGb: 18.2,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ wan22_t2v_a14b: {
+ shippedRepo: 'AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit',
+ disclosure: {
+ modelCardUrl: hfModelCard('AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit'),
+ weightsLicense: APACHE_2,
+ runtimeLicense: RUNTIME_LICENSE.wan22,
+ estimatedDownloadGb: 42.4,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ wan22_i2v_a14b: {
+ shippedRepo: 'AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit',
+ disclosure: {
+ modelCardUrl: hfModelCard('AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit'),
+ weightsLicense: APACHE_2,
+ runtimeLicense: RUNTIME_LICENSE.wan22,
+ estimatedDownloadGb: 42.4,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ wan22_t2v_a14b_lightning: {
+ shippedRepo: 'AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit',
+ disclosure: {
+ modelCardUrl: hfModelCard('AbstractFramework/wan2.2-t2v-a14b-diffusers-8bit'),
+ weightsLicense: APACHE_2,
+ runtimeLicense: RUNTIME_LICENSE.wan22,
+ // Base snapshot (42.4) + the two lightx2v/Wan2.2-Lightning LoRA files.
+ estimatedDownloadGb: 44.9,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ wan22_i2v_a14b_lightning: {
+ shippedRepo: 'AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit',
+ disclosure: {
+ modelCardUrl: hfModelCard('AbstractFramework/wan2.2-i2v-a14b-diffusers-8bit'),
+ weightsLicense: APACHE_2,
+ runtimeLicense: RUNTIME_LICENSE.wan22,
+ // Base snapshot (42.4) + the two lightx2v/Wan2.2-Lightning LoRA files.
+ estimatedDownloadGb: 44.9,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ hunyuan_video: {
+ shippedRepo: 'tencent/HunyuanVideo',
+ disclosure: {
+ modelCardUrl: hfModelCard('tencent/HunyuanVideo'),
+ weightsLicense: TENCENT_HUNYUAN_WEIGHTS,
+ runtimeLicense: RUNTIME_LICENSE.hunyuan,
+ estimatedDownloadGb: 39.8,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+ // Windows-only legacy entry. It carries no `repo` (the mlx_video CLI resolves
+ // the weights itself), so there is no model card to point at and no weights
+ // license we can attribute from a primary source — both stay Unknown.
+ ltx_video: {
+ shippedRepo: null,
+ disclosure: {
+ runtimeLicense: RUNTIME_LICENSE.mlx_video,
+ reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
+ },
+ },
+});
+
+// Deep-freeze the nested disclosure objects so a consumer can't mutate the
+// shared descriptors (`MIT`, `APACHE_2`, …) through one entry and corrupt every
+// other entry that reuses them.
+for (const spec of Object.values(VIDEO_MODEL_DISCLOSURES)) {
+ for (const value of Object.values(spec.disclosure)) {
+ if (value && typeof value === 'object') Object.freeze(value);
+ }
+ Object.freeze(spec.disclosure);
+ Object.freeze(spec);
+}
+
+/**
+ * Attach shipped disclosure metadata to a video model list.
+ *
+ * Preservation contract (mirrors migration 237):
+ * - `'disclosure' in entry` → user/existing value wins, untouched.
+ * - entry id not shipped → custom model, left as-is (Unknown in UI).
+ * - `repo` differs from shipped → forked weights, left as-is.
+ *
+ * Returns a new array; never mutates the input entries.
+ */
+export const applyVideoDisclosures = (list) => {
+ if (!Array.isArray(list)) return list;
+ return list.map((entry) => {
+ if (!entry || typeof entry !== 'object' || typeof entry.id !== 'string') return entry;
+ if ('disclosure' in entry) return entry;
+ const spec = VIDEO_MODEL_DISCLOSURES[entry.id];
+ if (!spec) return entry;
+ if (spec.shippedRepo !== null && entry.repo !== spec.shippedRepo) return entry;
+ return { ...entry, disclosure: spec.disclosure };
+ });
+};
+
+/**
+ * Execution + policy scope for each Video Gen render backend. Server-owned so
+ * the client never has to author (or drift on) the wording.
+ *
+ * `execution` is the machine-readable discriminator ('local' | 'hosted');
+ * `facts` are the sentences the UI renders verbatim.
+ */
+export const VIDEO_BACKEND_DISCLOSURES = Object.freeze([
+ Object.freeze({
+ id: 'local',
+ label: 'Local',
+ execution: 'local',
+ summary: 'Inference runs on this PortOS machine.',
+ facts: Object.freeze([
+ 'This render path does not send your prompt or source media to a hosted inference provider.',
+ 'PortOS applies no model-level prompt filter on this path. That is a statement about PortOS, not a guarantee about what a model will produce.',
+ 'The model weights license and the runtime license still apply, as do any other terms you are bound by.',
+ ]),
+ links: Object.freeze([]),
+ }),
+ Object.freeze({
+ id: 'grok',
+ label: 'Grok',
+ execution: 'hosted',
+ provider: 'xAI',
+ summary: 'Inference is submitted to xAI and leaves this machine.',
+ facts: Object.freeze([
+ 'Your prompt and any source image are sent to xAI to render the clip.',
+ "xAI's terms, retention behavior, and enforcement apply independently of PortOS.",
+ 'Renders count against your Grok plan.',
+ ]),
+ links: Object.freeze([
+ Object.freeze({ label: 'xAI legal terms', url: 'https://x.ai/legal' }),
+ Object.freeze({ label: 'xAI API documentation', url: 'https://docs.x.ai/docs' }),
+ ]),
+ }),
+]);
+
+export const videoBackendDisclosure = (backendId) =>
+ VIDEO_BACKEND_DISCLOSURES.find((b) => b.id === backendId) || null;
diff --git a/server/lib/videoDisclosure.test.js b/server/lib/videoDisclosure.test.js
new file mode 100644
index 0000000000..ca696eb764
--- /dev/null
+++ b/server/lib/videoDisclosure.test.js
@@ -0,0 +1,158 @@
+import { describe, it, expect } from 'vitest';
+import {
+ VIDEO_MODEL_DISCLOSURES,
+ VIDEO_BACKEND_DISCLOSURES,
+ VIDEO_DISCLOSURE_REVIEWED_AT,
+ applyVideoDisclosures,
+ videoBackendDisclosure,
+} from './videoDisclosure.js';
+
+const CANONICAL_FIELDS = ['repo', 'revision', 'runtime', 'memoryGb', 'supportedModes', 'requiredWeights'];
+const RANKING_WORDS = /uncensored|unrestricted|\bunsafe\b|\bsafe\b|less restrictive|no limits/i;
+
+describe('VIDEO_MODEL_DISCLOSURES', () => {
+ it('carries a reviewedAt on every entry, stamped with the module review date', () => {
+ for (const [id, spec] of Object.entries(VIDEO_MODEL_DISCLOSURES)) {
+ expect(spec.disclosure.reviewedAt, id).toBe(VIDEO_DISCLOSURE_REVIEWED_AT);
+ }
+ expect(VIDEO_DISCLOSURE_REVIEWED_AT).toMatch(/^\d{4}-\d{2}-\d{2}$/);
+ });
+
+ it('never duplicates a canonical registry field inside disclosure', () => {
+ for (const [id, spec] of Object.entries(VIDEO_MODEL_DISCLOSURES)) {
+ for (const field of CANONICAL_FIELDS) {
+ expect(Object.keys(spec.disclosure), `${id}.${field}`).not.toContain(field);
+ }
+ }
+ });
+
+ it('uses https URLs for every link it publishes', () => {
+ for (const [id, spec] of Object.entries(VIDEO_MODEL_DISCLOSURES)) {
+ const { modelCardUrl, weightsLicense, runtimeLicense } = spec.disclosure;
+ for (const url of [modelCardUrl, weightsLicense?.url, runtimeLicense?.url]) {
+ if (url === undefined) continue;
+ expect(url, id).toMatch(/^https:\/\//);
+ }
+ }
+ });
+
+ it('gives every license descriptor both a name and a url', () => {
+ for (const [id, spec] of Object.entries(VIDEO_MODEL_DISCLOSURES)) {
+ for (const key of ['weightsLicense', 'runtimeLicense']) {
+ const license = spec.disclosure[key];
+ if (!license) continue;
+ expect(typeof license.name, `${id}.${key}.name`).toBe('string');
+ expect(license.name.length, `${id}.${key}.name`).toBeGreaterThan(0);
+ expect(license.url, `${id}.${key}.url`).toMatch(/^https:\/\//);
+ }
+ }
+ });
+
+ it('omits facts that are not established rather than guessing them', () => {
+ // The notapalindrome LTX-2.3 cards declare no license — no weights license
+ // may be inferred from the repo name or from a sibling model.
+ expect('weightsLicense' in VIDEO_MODEL_DISCLOSURES.ltx23_unified.disclosure).toBe(false);
+ expect('weightsLicense' in VIDEO_MODEL_DISCLOSURES.ltx23_distilled_q4.disclosure).toBe(false);
+ // The Windows entry has no repo, so no model card and no weights license.
+ const windowsEntry = VIDEO_MODEL_DISCLOSURES.ltx_video.disclosure;
+ expect('modelCardUrl' in windowsEntry).toBe(false);
+ expect('weightsLicense' in windowsEntry).toBe(false);
+ expect('estimatedDownloadGb' in windowsEntry).toBe(false);
+ });
+
+ it('positive download estimates only', () => {
+ for (const [id, spec] of Object.entries(VIDEO_MODEL_DISCLOSURES)) {
+ const gb = spec.disclosure.estimatedDownloadGb;
+ if (gb === undefined) continue;
+ expect(typeof gb, id).toBe('number');
+ expect(gb, id).toBeGreaterThan(0);
+ }
+ });
+
+ it('is frozen so a consumer cannot mutate the shared license descriptors', () => {
+ const before = VIDEO_MODEL_DISCLOSURES.wan22_ti2v_5b.disclosure.weightsLicense.name;
+ expect(() => { VIDEO_MODEL_DISCLOSURES.wan22_ti2v_5b.disclosure.weightsLicense.name = 'hacked'; }).toThrow();
+ expect(VIDEO_MODEL_DISCLOSURES.wan22_ti2v_5b.disclosure.weightsLicense.name).toBe(before);
+ });
+});
+
+describe('applyVideoDisclosures', () => {
+ const shipped = (over = {}) => ({
+ id: 'wan22_ti2v_5b',
+ repo: VIDEO_MODEL_DISCLOSURES.wan22_ti2v_5b.shippedRepo,
+ runtime: 'wan22',
+ ...over,
+ });
+
+ it('attaches the shipped disclosure to a matching entry', () => {
+ const [entry] = applyVideoDisclosures([shipped()]);
+ expect(entry.disclosure).toEqual(VIDEO_MODEL_DISCLOSURES.wan22_ti2v_5b.disclosure);
+ });
+
+ it('does not mutate the input entry', () => {
+ const input = shipped();
+ applyVideoDisclosures([input]);
+ expect('disclosure' in input).toBe(false);
+ });
+
+ it('preserves an existing disclosure value, including an intentional clear', () => {
+ expect(applyVideoDisclosures([shipped({ disclosure: null })])[0].disclosure).toBe(null);
+ const custom = { modelCardUrl: 'https://example.com/card' };
+ expect(applyVideoDisclosures([shipped({ disclosure: custom })])[0].disclosure).toBe(custom);
+ });
+
+ it('skips a fork — upstream facts are not attributed to a re-pointed repo', () => {
+ const [entry] = applyVideoDisclosures([shipped({ repo: 'example-org/wan-fork' })]);
+ expect('disclosure' in entry).toBe(false);
+ });
+
+ it('skips custom / unknown ids', () => {
+ const [entry] = applyVideoDisclosures([{ id: 'my_model', repo: 'example-org/mine', source: 'user' }]);
+ expect('disclosure' in entry).toBe(false);
+ });
+
+ it('attaches to the repo-less windows entry (shippedRepo null)', () => {
+ const [entry] = applyVideoDisclosures([{ id: 'ltx_video', runtime: 'mlx_video' }]);
+ expect(entry.disclosure).toEqual(VIDEO_MODEL_DISCLOSURES.ltx_video.disclosure);
+ });
+
+ it('tolerates malformed rows and non-array input', () => {
+ expect(applyVideoDisclosures(null)).toBe(null);
+ expect(applyVideoDisclosures([null, 42, { name: 'no id' }])).toEqual([null, 42, { name: 'no id' }]);
+ });
+});
+
+describe('VIDEO_BACKEND_DISCLOSURES', () => {
+ it('covers the local and grok backends with an execution discriminator', () => {
+ expect(VIDEO_BACKEND_DISCLOSURES.map((b) => b.id)).toEqual(['local', 'grok']);
+ expect(videoBackendDisclosure('local').execution).toBe('local');
+ expect(videoBackendDisclosure('grok').execution).toBe('hosted');
+ expect(videoBackendDisclosure('nope')).toBe(null);
+ });
+
+ it('says the local path adds no PortOS filter AND that licenses still apply', () => {
+ const facts = videoBackendDisclosure('local').facts.join(' ');
+ expect(facts).toMatch(/no model-level prompt filter/i);
+ expect(facts).toMatch(/does not send your prompt/i);
+ expect(facts).toMatch(/license/i);
+ });
+
+ it('says the hosted path leaves the machine and that provider rules apply', () => {
+ const grok = videoBackendDisclosure('grok');
+ expect(grok.provider).toBe('xAI');
+ const facts = grok.facts.join(' ');
+ expect(facts).toMatch(/sent to xAI/i);
+ expect(facts).toMatch(/terms/i);
+ expect(grok.links.length).toBeGreaterThan(0);
+ for (const link of grok.links) expect(link.url).toMatch(/^https:\/\//);
+ });
+
+ it('never ranks a backend by restrictiveness', () => {
+ for (const backend of VIDEO_BACKEND_DISCLOSURES) {
+ const prose = [backend.summary, ...backend.facts].join(' ');
+ // "That is a statement about PortOS, not a guarantee" is the one
+ // sanctioned use of the word "guarantee"; ranking words are banned.
+ expect(prose, backend.id).not.toMatch(RANKING_WORDS);
+ }
+ });
+});
diff --git a/server/routes/videoGen.js b/server/routes/videoGen.js
index f8ff7d6fd9..e4b1b51d77 100644
--- a/server/routes/videoGen.js
+++ b/server/routes/videoGen.js
@@ -16,6 +16,7 @@ import { asyncHandler, ServerError, failValidation } from '../lib/errorHandler.j
import { uploadFields } from '../lib/multipart.js';
import { PATHS } from '../lib/fileUtils.js';
import { grokVideoDurationSchema } from '../lib/validation.js';
+import { VIDEO_BACKEND_DISCLOSURES } from '../lib/videoDisclosure.js';
import { IMAGE_GEN_MODE } from '../services/imageGen/modes.js';
import { getSettings } from '../services/settings.js';
import { checkPackages, isAllowedPython } from '../lib/pythonSetup.js';
@@ -302,8 +303,15 @@ router.get('/status', asyncHandler(async (_req, res) => {
pythonPath: py,
reason,
missingPackages: missing,
+ // Each entry carries its optional `disclosure` block (provenance, weights/
+ // runtime licenses, pinned-snapshot download size) straight off the
+ // registry — absent for custom models, which the UI renders as Unknown.
models: listVideoModels(),
defaultModel: defaultVideoModelId(),
+ // Server-owned execution + policy scope per render backend (#3674). The
+ // client renders these strings verbatim so the wording can't drift between
+ // the two surfaces.
+ backendDisclosures: VIDEO_BACKEND_DISCLOSURES,
// Authoritative list of bring-your-own-venv runtimes — lets the client
// gate the install-banner probe without hardcoding the same Set.
byovRuntimes: Object.keys(BYOV_RUNTIME_INFO),
diff --git a/server/routes/videoGen.test.js b/server/routes/videoGen.test.js
index 479f53bc17..29da6c96cb 100644
--- a/server/routes/videoGen.test.js
+++ b/server/routes/videoGen.test.js
@@ -277,6 +277,44 @@ describe('videoGen routes', () => {
expect(r.body.missingPackages).toEqual(['mflux', 'mlx', 'mlx_video']);
expect(r.body.reason).toMatch(/3 python packages missing/);
});
+
+ // #3674 — the backend policy-scope wording is server-owned so the UI can't
+ // drift into ranking language ("less restrictive", "uncensored", …).
+ it('serializes the local + hosted backend disclosures', async () => {
+ const r = await request(app).get('/api/video-gen/status');
+ expect(r.body.backendDisclosures.map((b) => b.id)).toEqual(['local', 'grok']);
+ const local = r.body.backendDisclosures.find((b) => b.id === 'local');
+ expect(local.execution).toBe('local');
+ expect(local.facts.join(' ')).toMatch(/does not send your prompt/i);
+ expect(local.facts.join(' ')).toMatch(/no model-level prompt filter/i);
+ expect(local.facts.join(' ')).toMatch(/license/i);
+ const grok = r.body.backendDisclosures.find((b) => b.id === 'grok');
+ expect(grok.execution).toBe('hosted');
+ expect(grok.provider).toBe('xAI');
+ expect(grok.facts.join(' ')).toMatch(/sent to xAI/i);
+ for (const link of grok.links) expect(link.url).toMatch(/^https:\/\//);
+ for (const backend of r.body.backendDisclosures) {
+ expect([backend.summary, ...backend.facts].join(' '))
+ .not.toMatch(/uncensored|unrestricted|less restrictive/i);
+ }
+ });
+
+ it('passes each model entry through with its registry disclosure block', async () => {
+ videoGenService.listVideoModels.mockReturnValueOnce([
+ {
+ id: 'ltx2_unified',
+ name: 'LTX-2 Unified',
+ runtime: 'ltx2',
+ disclosure: { modelCardUrl: 'https://huggingface.co/example-org/example-video', reviewedAt: '2026-08-09' },
+ },
+ { id: 'custom', name: 'Custom', runtime: 'ltx2', source: 'user' },
+ ]);
+ const r = await request(app).get('/api/video-gen/status');
+ expect(r.body.models[0].disclosure.modelCardUrl).toBe('https://huggingface.co/example-org/example-video');
+ // Custom models carry no disclosure — the UI renders Unknown rather than
+ // inheriting a shipped model's licensing.
+ expect('disclosure' in r.body.models[1]).toBe(false);
+ });
});
describe('GET /setup/runtime-status', () => {