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.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
feat(create-3d): hide four unmeasured cloud 3D models
purpled38f1f4d7049
diff --git a/src/api/cloud/catalog.ts b/src/api/cloud/catalog.tsindex 84cca424..0aaadd2d 100644--- a/src/api/cloud/catalog.ts+++ b/src/api/cloud/catalog.ts@@ -4,6 +4,7 @@import { cloudFetch, jsonOrError } from './client'import type { CloudModel } from '../../lib/render/cloud-models'+import { unmeasuredHidden } from '../../lib/render/studio-contract'export interface CatalogOps {removebg: number@@ -42,7 +43,9 @@ type WireModel = CloudModel & { native_label?: unknown }export function desktopCatalog(wire: Omit<CloudCatalog, 'models'> & { models: WireModel[] }): CloudCatalog {return {...wire,- models: wire.models.map(({ native_label, ...m }) =>+ // A model not measured yet stays out unless the server marks it as open+ // for the measurement (studio-contract.ts, unmeasuredHidden).+ models: wire.models.filter((m) => !unmeasuredHidden(m)).map(({ native_label, ...m }) =>typeof native_label === 'string' && native_label.trim() ? { ...m, label: native_label } : m,),}diff --git a/src/lib/render/__tests__/preset-models.test.ts b/src/lib/render/__tests__/preset-models.test.tsindex f4a61839..c42ec153 100644--- a/src/lib/render/__tests__/preset-models.test.ts+++ b/src/lib/render/__tests__/preset-models.test.ts@@ -136,7 +136,12 @@ describe('jedes waehlbare Modell faehrt seinen Schritt', () => {})it('jedes Studio-Modell gehoert zu genau einer Rolle', () => {- for (const id of Object.keys(STUDIO_MODELS)) {+ // Ein noch nicht gemessenes Modell (studio-contract.ts, unmeasuredHidden)+ // gehoert zu keiner, solange der Server es nicht fuer die Messung freigibt.+ for (const id of Object.keys(STUDIO_MODELS).filter((id) => STUDIO_MODELS[id].unmeasured)) {+ expect(ALL_ROLES.filter((r) => presetModels(r).some((m) => m.id === id)), id).toEqual([])+ }+ for (const id of Object.keys(STUDIO_MODELS).filter((id) => !STUDIO_MODELS[id].unmeasured)) {const roles = ALL_ROLES.filter((r) => presetModels(r).some((m) => m.id === id))expect(roles, id).toHaveLength(1)expect(roleForModel(id), id).toBe(roles[0])diff --git a/src/lib/render/cloud-models.ts b/src/lib/render/cloud-models.tsindex b9d7d476..8c1fcde9 100644--- a/src/lib/render/cloud-models.ts+++ b/src/lib/render/cloud-models.ts@@ -50,6 +50,9 @@ export interface CloudModel {* presence of this field on at least one entry is what unlocks the preset* shelf. A model carrying it must never be priced from a client formula. */quote_required?: boolean+ /** 3.1.0: the server lists this not yet measured studio model only because+ * its switch for the measurement is on (studio-contract.ts, unmeasuredHidden). */+ unmeasured?: boolean/** Supports the masked img2img 'edit' op (flux-dev only today). */edit?: boolean/** R5-66: an instruction-based edit endpoint that takes prompt + image anddiff --git a/src/lib/render/studio-contract.ts b/src/lib/render/studio-contract.tsindex 53c8e8d7..760f657e 100644--- a/src/lib/render/studio-contract.ts+++ b/src/lib/render/studio-contract.ts@@ -14,6 +14,8 @@ export interface StudioModel {label: string; endpoint: string; kind: 'image' | 'video' | 'audio' | '3d'; adult: boolean/** The usual run time in seconds (3D, shown while the cloud builds). */typical_s?: number+ /** 14.11.2026 (3.1.0): in the catalogue, not measured yet. See unmeasuredHidden. */+ unmeasured?: booleantier: ModelTier; weights: ModelWeightsinputs: Record<string, string>; defaults: Record<string, unknown>// `resolutionField` / `durationField`: nicht jeder Endpunkt nennt die beiden@@ -30,6 +32,15 @@ export interface StudioModel {extraViews?: number }}export const STUDIO_MODELS = definitions as Record<string, StudioModel>+/** A studio model the catalogue marks `unmeasured` (14.11.2026, 3.1.0): its+ * price and filter are not checked by a paid run yet, so no picker, role or+ * list shows it. Unless the live catalogue entry carries `unmeasured: true`:+ * the server sends that only while its switch for the paid measurement+ * (NEXT_PUBLIC_SHOW_UNMEASURED_MODELS on the web) is on. An older server that+ * lists such a model without the mark does not put it in front of anyone. */+export function unmeasuredHidden(entry: { id: string; unmeasured?: boolean }): boolean {+ return STUDIO_MODELS[entry.id]?.unmeasured === true && entry.unmeasured !== true+}export function studioSchema(id: string): Schema {const model = STUDIO_MODELS[id]if (!model) throw new Error('Unknown studio model')diff --git a/src/lib/render/studio-models.json b/src/lib/render/studio-models.jsonindex 0bfee4de..b1d195d2 100644--- a/src/lib/render/studio-models.json+++ b/src/lib/render/studio-models.json@@ -1597,6 +1597,7 @@"endpoint": "meshy/v7.1/multi-image-to-3d","kind": "3d","adult": false,+ "unmeasured": true,"tier": "best","weights": "closed","price": {@@ -1735,6 +1736,7 @@"endpoint": "tripo3d/p2/multiview-to-3d","kind": "3d","adult": false,+ "unmeasured": true,"tier": "best","weights": "closed","price": {@@ -1759,6 +1761,7 @@"endpoint": "hitem3d/hi3d-v3.0/image-to-3d","kind": "3d","adult": false,+ "unmeasured": true,"tier": "best","weights": "closed","price": {@@ -1779,6 +1782,7 @@"endpoint": "hitem3d/hi3d-v3.0/multi-view-to-3d","kind": "3d","adult": false,+ "unmeasured": true,"tier": "best","weights": "closed","price": {diff --git a/src/lib/three/__tests__/three-d-wave2.test.ts b/src/lib/three/__tests__/three-d-wave2.test.tsindex 0241cc91..6592b74a 100644--- a/src/lib/three/__tests__/three-d-wave2.test.ts+++ b/src/lib/three/__tests__/three-d-wave2.test.ts@@ -8,9 +8,12 @@ import { cloudDetailOf, threeDControlFacts, threeDDetailField, threeDMaxViews }import { useCloudCatalogStore } from '../../../stores/cloudCatalogStore'import { neuerServer } from '../../render/__tests__/fixtures/test-catalogs'-// A server that lists every studio model, the second wave included.+// A server that lists every studio model, the second wave included, with its+// switch for the measurement on: the four not measured yet carry the mark that+// lets the app show them (studio-contract.ts, unmeasuredHidden). Hidden+// without it: unmeasured-hidden.test.ts.beforeEach(() => {- useCloudCatalogStore.setState({ models: neuerServer() })+ useCloudCatalogStore.setState({ models: neuerServer().map((m) => (STUDIO_MODELS[m.id]?.unmeasured ? { ...m, unmeasured: true } : m)) })})const WAVE2 = [diff --git a/src/lib/three/__tests__/unmeasured-hidden.test.ts b/src/lib/three/__tests__/unmeasured-hidden.test.tsnew file mode 100644index 00000000..86bf7d0f--- /dev/null+++ b/src/lib/three/__tests__/unmeasured-hidden.test.ts@@ -0,0 +1,76 @@+// Four 3D models of the second cloud wave are in the catalogue but not+// measured yet (14.11.2026, 3.1.0). The app hides them everywhere, also when+// an older server still lists them, and shows them only where the server+// marks the entry `unmeasured: true` (its switch for the paid measurement).+import { beforeEach, describe, expect, it } from 'vitest'+import { STUDIO_MODELS, unmeasuredHidden } from '../../render/studio-contract'+import { ALL_ROLES, presetModels } from '../../render/preset-models'+import { intentPickerModels } from '../../render/create-studio'+import { desktopCatalog } from '../../../api/cloud/catalog'+import { studioEntries, useCloudCatalogStore } from '../../../stores/cloudCatalogStore'+import { toolProbe } from '../../../mobile/screens/create/parts/catalog'+import { neuerServer } from '../../render/__tests__/fixtures/test-catalogs'+import type { CloudModel } from '../../render/cloud-models'++const UNMEASURED = ['hi3d-3.0-image', 'hi3d-3.0-multiview', 'meshy-7.1-multi', 'tripo-p2-multiview']+const WAYS = ['3d-text', '3d-image', '3d-video'] as const++/** A server that lists every studio model without the mark, as one before+ * 3.1.0's switch would. */+const oldServer = (): CloudModel[] => neuerServer()+/** The same server with its switch for the measurement on. */+const measuringServer = (): CloudModel[] =>+ neuerServer().map((m) => (STUDIO_MODELS[m.id]?.unmeasured ? { ...m, unmeasured: true } : m))++const shown = (): string[] => [+ ...ALL_ROLES.flatMap((r) => presetModels(r).map((m) => m.id)),+ ...WAYS.flatMap((w) => intentPickerModels(w).map((m) => m.id)),+ ...studioEntries(Object.keys(STUDIO_MODELS)).map((m) => m.id),+]++beforeEach(() => {+ useCloudCatalogStore.setState({ models: oldServer() })+})++describe('3D models not measured yet', () => {+ it('exactly these four carry the mark in the snapshot', () => {+ expect(Object.keys(STUDIO_MODELS).filter((id) => STUDIO_MODELS[id].unmeasured).sort()).toEqual(UNMEASURED)+ })++ it('no role, picker or studio list shows them, even where the server lists them', () => {+ const ids = shown()+ for (const id of UNMEASURED) expect(ids, id).not.toContain(id)+ // Their measured siblings stay.+ for (const id of ['meshy-7.1-image', 'tripo-p2-image', 'tripo-p1-multiview']) expect(ids, id).toContain(id)+ // The phone still has 3D.+ expect(toolProbe()['3d']).toBe(true)+ })++ it('the catalogue the app keeps leaves them out unless the server marks them', () => {+ const kept = desktopCatalog({ models: oldServer() } as Parameters<typeof desktopCatalog>[0]).models.map((m) => m.id)+ for (const id of UNMEASURED) expect(kept, id).not.toContain(id)+ expect(kept).toContain('tripo-p2-image')+ const open = desktopCatalog({ models: measuringServer() } as Parameters<typeof desktopCatalog>[0]).models+ expect(open.filter((m) => m.unmeasured).map((m) => m.id).sort()).toEqual(UNMEASURED)+ })++ it('a copy saved from an older server loses them when it loads', () => {+ const merge = useCloudCatalogStore.persist.getOptions().merge!+ const merged = merge({ models: oldServer() }, useCloudCatalogStore.getState()) as { models: CloudModel[] }+ for (const id of UNMEASURED) expect(merged.models.map((m) => m.id), id).not.toContain(id)+ expect(merged.models.map((m) => m.id)).toContain('tripo-p2-image')+ })++ it('a server with its measurement switch on gets them shown', () => {+ useCloudCatalogStore.setState({ models: measuringServer() })+ const ids = shown()+ for (const id of UNMEASURED) expect(ids, id).toContain(id)+ })++ it('the rule itself', () => {+ expect(unmeasuredHidden({ id: 'hi3d-3.0-image' })).toBe(true)+ expect(unmeasuredHidden({ id: 'hi3d-3.0-image', unmeasured: true })).toBe(false)+ expect(unmeasuredHidden({ id: 'tripo-p2-image' })).toBe(false)+ expect(unmeasuredHidden({ id: 'flux-schnell' })).toBe(false)+ })+})diff --git a/src/stores/cloudCatalogStore.ts b/src/stores/cloudCatalogStore.tsindex 0e95a904..6b8c9a12 100644--- a/src/stores/cloudCatalogStore.ts+++ b/src/stores/cloudCatalogStore.ts@@ -8,7 +8,7 @@ import { create } from 'zustand'import { persist } from 'zustand/middleware'import { safeJSONStorage } from '../lib/storage-quota'import { CLOUD_MODEL_SEED, DEFAULT_MODEL_IDS, type CloudLengthPrice, type CloudModel } from '../lib/render/cloud-models'-import { STUDIO_MODELS } from '../lib/render/studio-contract'+import { STUDIO_MODELS, unmeasuredHidden } from '../lib/render/studio-contract'import {STUDIO_EDIT_MODELS, studioImageToVideo, studioReferenceVideo, studioTextToImage,studioTextToVideo,@@ -53,6 +53,13 @@ export const useCloudCatalogStore = create<CloudCatalogState>()({name: 'lu-cloud-catalog',storage: safeJSONStorage(),+ // A copy saved from an older server may still hold a model that is not+ // measured yet (studio-contract.ts, unmeasuredHidden): it stays out.+ merge: (persisted, current) => {+ const saved = (persisted ?? {}) as Partial<CloudCatalogState>+ const models = Array.isArray(saved.models) ? saved.models.filter((m) => !unmeasuredHidden(m)) : current.models+ return { ...current, ...saved, models }+ },},),)@@ -190,7 +197,7 @@ export function studioEntries(ids: readonly string[]): CloudModel[] {const { models } = useCloudCatalogStore.getState()return ids.map((id) => models.find((m) => m.id === id))- .filter((m): m is CloudModel => m !== undefined && m.quote_required === true && STUDIO_MODELS[m.id] !== undefined)+ .filter((m): m is CloudModel => m !== undefined && m.quote_required === true && STUDIO_MODELS[m.id] !== undefined && !unmeasuredHidden(m))}/** Models that can run the 'edit' op: the masked img2img editors (`edit` flag,