Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

feat(katalog): die sechs offenen Videomodelle vom 10.09. nachgezogen

purple8bf93646ae5a
diff --git a/src/lib/render/__tests__/katalog-paritaet-web.test.ts b/src/lib/render/__tests__/katalog-paritaet-web.test.ts
new file mode 100644
index 00000000..7d54a083
--- /dev/null
+++ b/src/lib/render/__tests__/katalog-paritaet-web.test.ts
@@ -0,0 +1,166 @@
+/**
+ * Der Notvorrat des Desktops gegen den Katalog des Webs.
+ *
+ * Zur Laufzeit ist /api/jobs/catalog die Wahrheit, CLOUD_MODEL_SEED ist nur
+ * die Liste ohne Netz. Genau deshalb faellt ein Rueckstand hier nicht auf:
+ * der Seed lag zehn Videomodelle hinter dem Web, ohne dass irgendetwas rot
+ * wurde. Dieser Waechter haelt die Zeilen, die beide Seiten fuehren, Wort fuer
+ * Wort und Zahl fuer Zahl gegeneinander.
+ *
+ * Verglichen wird die klassische Liste (ohne `ops`), denn nur die steht in den
+ * Waehlern: Ids und Beschriftungen bei Bild und Video, dazu bei den offenen
+ * Videomodellen die Flags und der Preis aus MEDIA_MODEL_USD des Webs. Die
+ * fuenf alten Videomodelle fuehren im Seed bis heute keinen Preis, das ist
+ * Altbestand und nicht Gegenstand dieses Laufs.
+ *
+ * Ohne Web-Checkout wird uebersprungen statt falsch gruen zu sein. Wo er
+ * liegt, sagt LU_WEB_REPO; daneben werden die ueblichen Nachbarpfade probiert.
+ *
+ * Run: LU_WEB_REPO=/pfad/zum/web npx vitest run \
+ * src/lib/render/__tests__/katalog-paritaet-web.test.ts
+ */
+import { describe, expect, it } from 'vitest'
+import { existsSync, readFileSync } from 'node:fs'
+import { resolve } from 'node:path'
+import { CLOUD_MODEL_SEED } from '../cloud-models'
+
+const KANDIDATEN = [
+ ...(process.env.LU_WEB_REPO?.trim() ? [resolve(process.env.LU_WEB_REPO.trim())] : []),
+ resolve(process.cwd(), '../lu-300-web-katalog'),
+ resolve(process.cwd(), '../lu-300-web'),
+]
+const WEB = KANDIDATEN.find((p) => existsSync(resolve(p, 'apps/web/lib/render/cloud-models.ts')))
+if (!WEB) {
+ process.stderr.write(
+ '[katalog-paritaet] uebersprungen: kein Web-Checkout gefunden. Gesucht in: ' +
+ KANDIDATEN.join(' | ') +
+ '. Setze LU_WEB_REPO, damit der Paritaetswaechter laeuft.\n',
+ )
+}
+
+/** Ein Credit kostet uns 0,00001 Dollar (Web: CREDIT_USD). */
+const CREDIT_USD = 1e-5
+
+/** Kommentare raus, Zeilenumbrueche weg: danach ist jede Zeile ein Objekt. */
+function ohneKommentare(text: string): string {
+ return text
+ .split('\n')
+ .map((z) => z.replace(/\/\/.*$/, ''))
+ .join('\n')
+ .replace(/\s+/g, ' ')
+}
+
+interface WebZeile {
+ id: string
+ label: string
+ kind: string
+ t2v?: boolean
+ i2v?: boolean
+ adult?: boolean
+ ops?: boolean
+}
+
+/** Die Eintraege aus CLOUD_MODELS des Webs, ohne TypeScript zu laden. */
+function webKatalog(): WebZeile[] {
+ const datei = readFileSync(resolve(WEB!, 'apps/web/lib/render/cloud-models.ts'), 'utf8')
+ const start = datei.indexOf('export const CLOUD_MODELS')
+ const ende = datei.indexOf('\n]', start)
+ const rumpf = ohneKommentare(datei.slice(start, ende))
+ const out: WebZeile[] = []
+ for (const treffer of rumpf.matchAll(/\{[^{}]*\}/g)) {
+ const roh = treffer[0]
+ const id = /id: '([^']+)'/.exec(roh)?.[1]
+ const label = /label: '([^']+)'/.exec(roh)?.[1]
+ const kind = /kind: '([^']+)'/.exec(roh)?.[1]
+ if (!id || !label || !kind) continue
+ out.push({
+ id,
+ label,
+ kind,
+ t2v: /t2v: (true|false)/.exec(roh)?.[1] === 'true' ? true : /t2v: false/.test(roh) ? false : undefined,
+ i2v: /i2v: (true|false)/.exec(roh)?.[1] === 'true' ? true : /i2v: false/.test(roh) ? false : undefined,
+ adult: /adult: true/.test(roh),
+ ops: /ops: \[/.test(roh),
+ })
+ }
+ return out
+}
+
+/** MEDIA_MODEL_USD des Webs: der Einkaufspreis je Lauf, in Dollar. */
+function webPreise(): Record<string, { base: number; long?: number; lora?: number }> {
+ const datei = readFileSync(resolve(WEB!, 'apps/web/lib/billing/credits.ts'), 'utf8')
+ const start = datei.indexOf('export const MEDIA_MODEL_USD')
+ const ende = datei.indexOf('\n}', start)
+ const rumpf = ohneKommentare(datei.slice(start, ende))
+ const out: Record<string, { base: number; long?: number; lora?: number }> = {}
+ for (const treffer of rumpf.matchAll(/'([^']+)': \{([^}]*)\}/g)) {
+ const zahl = (feld: string) => {
+ const m = new RegExp(`${feld}: ([0-9.]+)`).exec(treffer[2])
+ return m ? Number(m[1]) : undefined
+ }
+ const base = zahl('base')
+ if (base === undefined) continue
+ out[treffer[1]] = { base, long: zahl('long'), lora: zahl('lora') }
+ }
+ return out
+}
+
+const credits = (usd: number) => Math.ceil(usd / CREDIT_USD)
+
+describe.skipIf(!WEB)('Katalogparitaet Desktop gegen Web', () => {
+ const klassischWeb = () => webKatalog().filter((m) => !m.ops)
+ const klassischSeed = CLOUD_MODEL_SEED.filter((m) => !m.ops)
+
+ it('liest den Web-Katalog ueberhaupt', () => {
+ // Positivkontrolle: ginge der Ausdruck ins Leere, waere jeder Vergleich
+ // unten ein Vergleich zweier leerer Listen.
+ expect(webKatalog().length).toBeGreaterThan(40)
+ expect(Object.keys(webPreise()).length).toBeGreaterThan(30)
+ })
+
+ it('fuehrt dieselben Bildmodelle, in derselben Reihenfolge und mit denselben Namen', () => {
+ const web = klassischWeb().filter((m) => m.kind === 'image')
+ const seed = klassischSeed.filter((m) => m.kind === 'image')
+ expect(seed.map((m) => m.id)).toEqual(web.map((m) => m.id))
+ expect(seed.map((m) => m.label)).toEqual(web.map((m) => m.label))
+ })
+
+ it('fuehrt dieselben Videomodelle, in derselben Reihenfolge und mit denselben Namen', () => {
+ const web = klassischWeb().filter((m) => m.kind === 'video')
+ const seed = klassischSeed.filter((m) => m.kind === 'video')
+ expect(seed.map((m) => m.id)).toEqual(web.map((m) => m.id))
+ expect(seed.map((m) => m.label)).toEqual(web.map((m) => m.label))
+ })
+
+ it('gibt den offenen Videomodellen dieselben Faehigkeiten und denselben Preis', () => {
+ const preise = webPreise()
+ const offenWeb = klassischWeb().filter((m) => m.kind === 'video' && m.adult)
+ expect(offenWeb.length).toBeGreaterThan(0)
+ for (const w of offenWeb) {
+ const s = CLOUD_MODEL_SEED.find((m) => m.id === w.id)
+ expect(s, w.id).toBeDefined()
+ expect(s!.t2v, w.id).toBe(false)
+ expect(s!.i2v, w.id).toBe(true)
+ expect(preise[w.id], w.id).toBeDefined()
+ expect(s!.credits?.base, w.id).toBe(credits(preise[w.id].base))
+ // Kein 8-Sekunden-Satz im Web, also auch keiner hier.
+ expect(preise[w.id].long, w.id).toBeUndefined()
+ expect(s!.credits?.long, w.id).toBeUndefined()
+ expect(s!.clip, w.id).toEqual({ short: 5 })
+ }
+ })
+
+ it('kennt dieselben offenen Bildmodelle wie das Web', () => {
+ // Der Desktop traegt die Marke nicht selbst (die Katalogroute liefert das
+ // Feld nicht). Welche Bildmodelle offen sind, sagt also das Web, und der
+ // Seed muss sie als klassische Bildmodelle fuehren.
+ const offenBild = klassischWeb().filter((m) => m.kind === 'image' && m.adult)
+ expect(offenBild.length).toBeGreaterThan(0)
+ for (const w of offenBild) {
+ const s = CLOUD_MODEL_SEED.find((m) => m.id === w.id)
+ expect(s, w.id).toBeDefined()
+ expect(s!.kind, w.id).toBe('image')
+ expect(s!.ops, w.id).toBeUndefined()
+ }
+ })
+})
diff --git a/src/lib/render/cloud-models.ts b/src/lib/render/cloud-models.ts
index 5a29185f..ec0e747c 100644
--- a/src/lib/render/cloud-models.ts
+++ b/src/lib/render/cloud-models.ts
@@ -65,10 +65,18 @@ export const CLOUD_MODEL_SEED: CloudModel[] = [
{ id: 'ltx-2.3', label: 'LTX 2.3', kind: 'video', t2v: true, i2v: true, clip: CLIP },
// Image-to-video endpoints the provider ships with its own filter off
- // (2026-09-13, mirroring uselu apps/web/lib/render/cloud-models.ts). None of
- // them has a text-to-video twin at the provider, hence t2v: false — the path
- // is an image first, then one of these. CLIP does not fit here: the provider
- // quotes only a 5 s rate for them, so there is no 8s button to offer.
+ // (mirroring uselu apps/web/lib/render/cloud-models.ts). None of them has a
+ // text-to-video twin at the provider, hence t2v: false: the path is an image
+ // first, then one of these. CLIP does not fit here, the provider quotes only
+ // a 5 s rate for them, so there is no 8s button to offer.
+ // 2026-09-10:
+ { id: 'wan-2.2-spicy', label: 'Wan 2.2 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 15000 } },
+ { id: 'ltx-2.3-spicy', label: 'LTX 2.3 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 10000 } },
+ { id: 'wan-2.6-spicy', label: 'Wan 2.6 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 50000 } },
+ { id: 'wan-2.7-spicy', label: 'Wan 2.7 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 50000 } },
+ { id: 'minimax-h3-spicy', label: 'MiniMax H3 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 20000 } },
+ { id: 'seedance-1.5-pro-spicy', label: 'Seedance 1.5 Pro Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 26000 } },
+ // 2026-09-13:
{ id: 'seedance-2.5-spicy', label: 'Seedance 2.5 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 90000 } },
{ id: 'seedance-2.0-spicy', label: 'Seedance 2.0 Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 60000 } },
{ id: 'seedance-2.0-fast-spicy', label: 'Seedance 2.0 Fast Open', kind: 'video', t2v: false, i2v: true, clip: { short: 5 }, credits: { base: 50000 } },