@nodaro/shared 3.32.0 → 3.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VWGNPMJZ.cjs → chunk-24ZKPE33.cjs} +5 -5
- package/dist/{chunk-VWGNPMJZ.cjs.map → chunk-24ZKPE33.cjs.map} +1 -1
- package/dist/{chunk-CK3GK34R.js → chunk-2HIDE3QV.js} +9 -3
- package/dist/chunk-2HIDE3QV.js.map +1 -0
- package/dist/{chunk-WDIBOWAA.js → chunk-2HVFF5SS.js} +6 -6
- package/dist/chunk-2HVFF5SS.js.map +1 -0
- package/dist/{chunk-KHCBJ7KD.js → chunk-2QWNPYDG.js} +3 -3
- package/dist/{chunk-KHCBJ7KD.js.map → chunk-2QWNPYDG.js.map} +1 -1
- package/dist/{chunk-J6KHW2E5.cjs → chunk-3YG3MYDE.cjs} +153 -24
- package/dist/chunk-3YG3MYDE.cjs.map +1 -0
- package/dist/{chunk-ULXI7A6Q.cjs → chunk-5VNBQ4QK.cjs} +16 -16
- package/dist/{chunk-ULXI7A6Q.cjs.map → chunk-5VNBQ4QK.cjs.map} +1 -1
- package/dist/{chunk-5AUSSJIM.cjs → chunk-5ZCXWA7J.cjs} +232 -15
- package/dist/chunk-5ZCXWA7J.cjs.map +1 -0
- package/dist/{chunk-Z2OL5AJD.cjs → chunk-6F6GGX2W.cjs} +4 -3
- package/dist/chunk-6F6GGX2W.cjs.map +1 -0
- package/dist/{chunk-E2TGXG6X.cjs → chunk-72IFMNJE.cjs} +80 -52
- package/dist/chunk-72IFMNJE.cjs.map +1 -0
- package/dist/{chunk-NB72XWXQ.cjs → chunk-A5Z3IMSJ.cjs} +6 -6
- package/dist/{chunk-NB72XWXQ.cjs.map → chunk-A5Z3IMSJ.cjs.map} +1 -1
- package/dist/{chunk-NT6IJH4L.cjs → chunk-AGEZY4LL.cjs} +66 -47
- package/dist/chunk-AGEZY4LL.cjs.map +1 -0
- package/dist/{chunk-3CUFITU7.js → chunk-ANOQWAMU.js} +88 -54
- package/dist/chunk-ANOQWAMU.js.map +1 -0
- package/dist/{chunk-PRYE7AZQ.cjs → chunk-AWWOQH46.cjs} +7 -7
- package/dist/chunk-AWWOQH46.cjs.map +1 -0
- package/dist/{chunk-QELDJGDK.cjs → chunk-B7WJJHJS.cjs} +7 -4
- package/dist/chunk-B7WJJHJS.cjs.map +1 -0
- package/dist/{chunk-AVQK77G6.cjs → chunk-BBLE4UTG.cjs} +88 -54
- package/dist/chunk-BBLE4UTG.cjs.map +1 -0
- package/dist/{chunk-HGC5JNVA.cjs → chunk-BVVKMQKR.cjs} +9 -2
- package/dist/chunk-BVVKMQKR.cjs.map +1 -0
- package/dist/{chunk-YYV35XOS.js → chunk-C4R7BTBQ.js} +4 -3
- package/dist/chunk-C4R7BTBQ.js.map +1 -0
- package/dist/{chunk-AROWPFO2.js → chunk-ETXUOETU.js} +29 -36
- package/dist/chunk-ETXUOETU.js.map +1 -0
- package/dist/{chunk-S5DMKUWK.cjs → chunk-F4ZT5X2S.cjs} +11 -11
- package/dist/{chunk-S5DMKUWK.cjs.map → chunk-F4ZT5X2S.cjs.map} +1 -1
- package/dist/{chunk-YBPBK5KI.js → chunk-FKQJYMCO.js} +97 -23
- package/dist/chunk-FKQJYMCO.js.map +1 -0
- package/dist/{chunk-ZDFHA2EC.js → chunk-FVKCNAEQ.js} +51 -7
- package/dist/chunk-FVKCNAEQ.js.map +1 -0
- package/dist/{chunk-JSNV5O2F.cjs → chunk-GHBXS5RT.cjs} +4 -4
- package/dist/{chunk-JSNV5O2F.cjs.map → chunk-GHBXS5RT.cjs.map} +1 -1
- package/dist/{chunk-C57NEO3X.js → chunk-GKJRNIP4.js} +230 -16
- package/dist/chunk-GKJRNIP4.js.map +1 -0
- package/dist/{chunk-QNGNOU4Z.js → chunk-GRIMIJJ3.js} +3 -3
- package/dist/{chunk-QNGNOU4Z.js.map → chunk-GRIMIJJ3.js.map} +1 -1
- package/dist/{chunk-IEBZHTPE.js → chunk-GVHBHUFV.js} +34 -16
- package/dist/chunk-GVHBHUFV.js.map +1 -0
- package/dist/chunk-GZH2SIOF.cjs +99 -0
- package/dist/chunk-GZH2SIOF.cjs.map +1 -0
- package/dist/{chunk-YHRG7UOC.js → chunk-IJNQYMN7.js} +4 -4
- package/dist/{chunk-YHRG7UOC.js.map → chunk-IJNQYMN7.js.map} +1 -1
- package/dist/{chunk-JX5YZ4DH.cjs → chunk-IRUPCNW2.cjs} +49 -46
- package/dist/chunk-IRUPCNW2.cjs.map +1 -0
- package/dist/{chunk-JL4C5VJ7.cjs → chunk-J65CAOUV.cjs} +14 -2
- package/dist/chunk-J65CAOUV.cjs.map +1 -0
- package/dist/{chunk-ISJDAFKS.js → chunk-LJMNCSDG.js} +38 -15
- package/dist/chunk-LJMNCSDG.js.map +1 -0
- package/dist/{chunk-ZT77RY6R.js → chunk-MEN7VLQ5.js} +8 -5
- package/dist/chunk-MEN7VLQ5.js.map +1 -0
- package/dist/{chunk-VIWSWVAW.js → chunk-MUA5L25B.js} +125 -12
- package/dist/chunk-MUA5L25B.js.map +1 -0
- package/dist/{chunk-6IJOPRZP.cjs → chunk-NWXB4F6D.cjs} +21 -21
- package/dist/{chunk-6IJOPRZP.cjs.map → chunk-NWXB4F6D.cjs.map} +1 -1
- package/dist/{chunk-PQHS255G.js → chunk-OHSIVNJO.js} +3 -3
- package/dist/chunk-OHSIVNJO.js.map +1 -0
- package/dist/{chunk-LKAIXWK3.js → chunk-PVVO23LZ.js} +3 -3
- package/dist/{chunk-LKAIXWK3.js.map → chunk-PVVO23LZ.js.map} +1 -1
- package/dist/{chunk-XAMC4S53.js → chunk-Q4ZXDDWA.js} +3 -3
- package/dist/{chunk-XAMC4S53.js.map → chunk-Q4ZXDDWA.js.map} +1 -1
- package/dist/{chunk-EK362Q45.cjs → chunk-QIIG2QDP.cjs} +8 -8
- package/dist/{chunk-EK362Q45.cjs.map → chunk-QIIG2QDP.cjs.map} +1 -1
- package/dist/{chunk-Q4CDQ2KO.js → chunk-QXW6O56Z.js} +6 -6
- package/dist/chunk-QXW6O56Z.js.map +1 -0
- package/dist/{chunk-5PC6JBGJ.cjs → chunk-R2VF5NQG.cjs} +3 -3
- package/dist/chunk-R2VF5NQG.cjs.map +1 -0
- package/dist/{chunk-6DKDOWBL.js → chunk-RRI5YBUK.js} +6 -3
- package/dist/{chunk-QELDJGDK.cjs.map → chunk-RRI5YBUK.js.map} +1 -1
- package/dist/{chunk-RJL7RCEM.cjs → chunk-RUKFN3LJ.cjs} +6 -6
- package/dist/chunk-RUKFN3LJ.cjs.map +1 -0
- package/dist/chunk-TCBHVIMD.js +89 -0
- package/dist/chunk-TCBHVIMD.js.map +1 -0
- package/dist/{chunk-SES6GDBQ.cjs → chunk-UJJUX6NW.cjs} +59 -8
- package/dist/chunk-UJJUX6NW.cjs.map +1 -0
- package/dist/{chunk-ZRL2UFTH.cjs → chunk-V3N56Z2S.cjs} +101 -22
- package/dist/chunk-V3N56Z2S.cjs.map +1 -0
- package/dist/{chunk-Z4AZW6FY.js → chunk-W36WCZS2.js} +6 -6
- package/dist/{chunk-Z4AZW6FY.js.map → chunk-W36WCZS2.js.map} +1 -1
- package/dist/{chunk-M36G6SRP.js → chunk-WXNQMJ67.js} +14 -3
- package/dist/chunk-WXNQMJ67.js.map +1 -0
- package/dist/{chunk-O7PUQLJ3.cjs → chunk-XE5PE54B.cjs} +33 -40
- package/dist/chunk-XE5PE54B.cjs.map +1 -0
- package/dist/{chunk-LPW3XNC2.js → chunk-XJOBMAWW.js} +3 -3
- package/dist/{chunk-LPW3XNC2.js.map → chunk-XJOBMAWW.js.map} +1 -1
- package/dist/{chunk-5U7VLG43.js → chunk-XS7FI4JA.js} +3 -3
- package/dist/chunk-XS7FI4JA.js.map +1 -0
- package/dist/{chunk-O5MP52U2.cjs → chunk-YD3JA36S.cjs} +4 -4
- package/dist/{chunk-O5MP52U2.cjs.map → chunk-YD3JA36S.cjs.map} +1 -1
- package/dist/chunk-YYODFQEU.cjs +25 -0
- package/dist/chunk-YYODFQEU.cjs.map +1 -0
- package/dist/{chunk-RN3RMBJZ.js → chunk-ZXBSARZX.js} +4 -4
- package/dist/{chunk-RN3RMBJZ.js.map → chunk-ZXBSARZX.js.map} +1 -1
- package/dist/entries/apps.cjs +43 -42
- package/dist/entries/apps.d.cts +11 -2
- package/dist/entries/apps.d.ts +11 -2
- package/dist/entries/apps.js +8 -7
- package/dist/entries/catalogs.d.cts +1 -1
- package/dist/entries/catalogs.d.ts +1 -1
- package/dist/entries/credits.cjs +156 -152
- package/dist/entries/credits.d.cts +41 -10
- package/dist/entries/credits.d.ts +41 -10
- package/dist/entries/credits.js +8 -8
- package/dist/entries/edl.cjs +130 -102
- package/dist/entries/edl.d.cts +74 -3
- package/dist/entries/edl.d.ts +74 -3
- package/dist/entries/edl.js +2 -2
- package/dist/entries/entities.cjs +126 -122
- package/dist/entries/entities.d.cts +2 -2
- package/dist/entries/entities.d.ts +2 -2
- package/dist/entries/entities.js +1 -1
- package/dist/entries/i18n.cjs +11 -11
- package/dist/entries/i18n.d.cts +2 -2
- package/dist/entries/i18n.d.ts +2 -2
- package/dist/entries/i18n.js +1 -1
- package/dist/entries/llm-models.cjs +63 -43
- package/dist/entries/llm-models.d.cts +71 -4
- package/dist/entries/llm-models.d.ts +71 -4
- package/dist/entries/llm-models.js +1 -1
- package/dist/entries/media.cjs +45 -41
- package/dist/entries/media.d.cts +39 -1
- package/dist/entries/media.d.ts +39 -1
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +75 -63
- package/dist/entries/model-catalog.d.cts +2 -2
- package/dist/entries/model-catalog.d.ts +2 -2
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +274 -210
- package/dist/entries/models.d.cts +3 -3
- package/dist/entries/models.d.ts +3 -3
- package/dist/entries/models.js +5 -5
- package/dist/entries/nodes.cjs +222 -201
- package/dist/entries/nodes.d.cts +48 -8
- package/dist/entries/nodes.d.ts +48 -8
- package/dist/entries/nodes.js +10 -9
- package/dist/entries/pipeline.cjs +149 -149
- package/dist/entries/pipeline.d.cts +12 -8
- package/dist/entries/pipeline.d.ts +12 -8
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +174 -174
- package/dist/entries/social.d.cts +13 -5
- package/dist/entries/social.d.ts +13 -5
- package/dist/entries/social.js +2 -2
- package/dist/entries/types.d.cts +1 -1
- package/dist/entries/types.d.ts +1 -1
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +115 -115
- package/dist/entries/video.d.cts +4 -3
- package/dist/entries/video.d.ts +4 -3
- package/dist/entries/video.js +4 -4
- package/dist/entries/workflow.cjs +96 -95
- package/dist/entries/workflow.d.cts +19 -20
- package/dist/entries/workflow.d.ts +19 -20
- package/dist/entries/workflow.js +2 -1
- package/dist/index.cjs +1720 -1563
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +26 -25
- package/dist/{model-catalog-flJYaa-g.d.ts → model-catalog-VIHGmQL2.d.cts} +113 -1
- package/dist/{model-catalog-flJYaa-g.d.cts → model-catalog-VIHGmQL2.d.ts} +113 -1
- package/dist/{presentation-utils-BIqiCzSA.d.cts → presentation-utils-A4i92SYo.d.cts} +3 -1
- package/dist/{presentation-utils-BdiObtwq.d.ts → presentation-utils-DjdPtM9k.d.ts} +3 -1
- package/dist/{scene-node-types-DjenYFLO.d.ts → scene-node-types-Cvbtf-0a.d.cts} +147 -6
- package/dist/{scene-node-types-DjenYFLO.d.cts → scene-node-types-Cvbtf-0a.d.ts} +147 -6
- package/dist/{types-DffyGSy5.d.ts → types-CU6SQnMS.d.cts} +0 -5
- package/dist/{types-DffyGSy5.d.cts → types-CU6SQnMS.d.ts} +0 -5
- package/dist/{types-BRlFPEru.d.cts → types-DzUBR7yr.d.cts} +8 -1
- package/dist/{types-BRlFPEru.d.ts → types-DzUBR7yr.d.ts} +8 -1
- package/package.json +1 -1
- package/src/__tests__/camera-switch-contract.test.ts +33 -1
- package/src/__tests__/character-mention-slug.test.ts +0 -8
- package/src/__tests__/effective-tier.test.ts +3 -14
- package/src/__tests__/fixtures/camera-switch-speaker-map-parity.json +178 -0
- package/src/__tests__/fixtures/root-exports.baseline.json +21 -0
- package/src/__tests__/fixtures/speaker-map-camera-ids.json +26 -0
- package/src/__tests__/gvp-supported-providers.test.ts +1 -0
- package/src/__tests__/i18n-locale-completeness.test.ts +38 -3
- package/src/__tests__/llm-models.test.ts +200 -20
- package/src/__tests__/model-makers.test.ts +76 -0
- package/src/__tests__/node-preset-extract.test.ts +10 -0
- package/src/__tests__/presentation-utils.test.ts +15 -0
- package/src/__tests__/preview-gate-use-case.test.ts +16 -1
- package/src/__tests__/private-host.test.ts +53 -0
- package/src/__tests__/producer-types.test.ts +19 -0
- package/src/__tests__/run-continuation.test.ts +4 -1
- package/src/__tests__/speaker-map-contract.test.ts +48 -0
- package/src/__tests__/unit-contract-compose.test.ts +129 -0
- package/src/__tests__/unit-contracts.test.ts +134 -0
- package/src/__tests__/use-case-types.test.ts +33 -0
- package/src/__tests__/video-collapse-parity.test.ts +10 -0
- package/src/__tests__/video-frame-slot.test.ts +85 -0
- package/src/__tests__/video-mode-aliases.test.ts +1 -0
- package/src/__tests__/video-reference-only.test.ts +117 -0
- package/src/__tests__/vidu-q4-catalog.test.ts +230 -0
- package/src/camera-switch-contract.ts +36 -2
- package/src/component-types.ts +9 -0
- package/src/credit-identifiers.ts +81 -23
- package/src/entity-asset-types.ts +13 -0
- package/src/entries/credits.ts +1 -0
- package/src/entries/edl.ts +2 -0
- package/src/entries/llm-models.ts +5 -0
- package/src/entries/media.ts +1 -0
- package/src/entries/model-catalog.ts +6 -0
- package/src/entries/models.ts +25 -0
- package/src/entries/nodes.ts +5 -1
- package/src/fan-out-rows.ts +36 -3
- package/src/generate-mask.ts +40 -0
- package/src/generated/unit-contracts.ts +58 -0
- package/src/i18n/types.ts +13 -2
- package/src/json-kinds.ts +24 -4
- package/src/llm-models.ts +184 -31
- package/src/meta-ads-scrape.ts +16 -8
- package/src/model-catalog.ts +285 -13
- package/src/model-constants.ts +260 -5
- package/src/node-default-mappings.ts +3 -0
- package/src/node-preset-extract.ts +8 -0
- package/src/pipeline-types.ts +3 -0
- package/src/presentation-utils.ts +19 -12
- package/src/preview-gate.ts +4 -2
- package/src/private-host.ts +89 -59
- package/src/producer-types.ts +19 -19
- package/src/run-continuation.ts +26 -4
- package/src/speaker-layouts.ts +8 -3
- package/src/speaker-map-contract.ts +77 -0
- package/src/unit-contract-compose.ts +55 -0
- package/src/use-case-types.ts +19 -0
- package/src/video-ui-defaults.ts +7 -5
- package/dist/chunk-3CUFITU7.js.map +0 -1
- package/dist/chunk-5AUSSJIM.cjs.map +0 -1
- package/dist/chunk-5PC6JBGJ.cjs.map +0 -1
- package/dist/chunk-5U7VLG43.js.map +0 -1
- package/dist/chunk-6DKDOWBL.js.map +0 -1
- package/dist/chunk-AROWPFO2.js.map +0 -1
- package/dist/chunk-AVQK77G6.cjs.map +0 -1
- package/dist/chunk-C57NEO3X.js.map +0 -1
- package/dist/chunk-CK3GK34R.js.map +0 -1
- package/dist/chunk-E2TGXG6X.cjs.map +0 -1
- package/dist/chunk-HGC5JNVA.cjs.map +0 -1
- package/dist/chunk-IEBZHTPE.js.map +0 -1
- package/dist/chunk-ISJDAFKS.js.map +0 -1
- package/dist/chunk-J6KHW2E5.cjs.map +0 -1
- package/dist/chunk-JL4C5VJ7.cjs.map +0 -1
- package/dist/chunk-JX5YZ4DH.cjs.map +0 -1
- package/dist/chunk-M36G6SRP.js.map +0 -1
- package/dist/chunk-NT6IJH4L.cjs.map +0 -1
- package/dist/chunk-O7PUQLJ3.cjs.map +0 -1
- package/dist/chunk-PQHS255G.js.map +0 -1
- package/dist/chunk-PRYE7AZQ.cjs.map +0 -1
- package/dist/chunk-Q4CDQ2KO.js.map +0 -1
- package/dist/chunk-RJL7RCEM.cjs.map +0 -1
- package/dist/chunk-SES6GDBQ.cjs.map +0 -1
- package/dist/chunk-VIWSWVAW.js.map +0 -1
- package/dist/chunk-WDIBOWAA.js.map +0 -1
- package/dist/chunk-WNG7HRVA.cjs +0 -25
- package/dist/chunk-WNG7HRVA.cjs.map +0 -1
- package/dist/chunk-YBPBK5KI.js.map +0 -1
- package/dist/chunk-YYV35XOS.js.map +0 -1
- package/dist/chunk-Z2OL5AJD.cjs.map +0 -1
- package/dist/chunk-ZDFHA2EC.js.map +0 -1
- package/dist/chunk-ZRL2UFTH.cjs.map +0 -1
- package/dist/chunk-ZT77RY6R.js.map +0 -1
- package/src/__tests__/__snapshots__/prompt-builder-segments.test.ts.snap +0 -65
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
LLM_MODELS,
|
|
3
3
|
LLM_MODEL_IDS,
|
|
4
4
|
LLM_FEATURE_DEFAULTS,
|
|
5
|
+
DESCRIBE_TO_PICKER_FALLBACK_MODEL,
|
|
5
6
|
LLM_FEATURE_DEFAULT_EFFORTS,
|
|
6
7
|
defaultReasoningEffort,
|
|
7
8
|
STRUCTURED_VISION_MODELS,
|
|
@@ -20,6 +21,9 @@ import {
|
|
|
20
21
|
LLM_VENDOR_LABELS,
|
|
21
22
|
groupLlmModelsByVendor,
|
|
22
23
|
orderedLlmModels,
|
|
24
|
+
PICKABLE_LLM_MODELS,
|
|
25
|
+
pickableLlmModels,
|
|
26
|
+
isLlmModelRetired,
|
|
23
27
|
REASONING_OUTPUT_FLOOR,
|
|
24
28
|
reasoningOutputFloor,
|
|
25
29
|
llmServesDirect,
|
|
@@ -48,6 +52,7 @@ const EXPECTED_MODEL_IDS = [
|
|
|
48
52
|
"claude-sonnet-4.6",
|
|
49
53
|
"gpt-5.2",
|
|
50
54
|
"gemini-3.1-pro",
|
|
55
|
+
"gemini-4-argon",
|
|
51
56
|
"claude-opus-4.7",
|
|
52
57
|
"gpt-5.4",
|
|
53
58
|
"gpt-5.5",
|
|
@@ -112,14 +117,14 @@ describe("LLM_MODELS data integrity", () => {
|
|
|
112
117
|
expect(new Set(ids).size).toBe(ids.length)
|
|
113
118
|
})
|
|
114
119
|
|
|
115
|
-
it("has
|
|
120
|
+
it("has 9 economy, 7 standard, 14 premium models", () => {
|
|
116
121
|
const tierCounts: Record<LlmTier, number> = { economy: 0, standard: 0, premium: 0 }
|
|
117
122
|
for (const model of LLM_MODELS) {
|
|
118
123
|
tierCounts[model.tier]++
|
|
119
124
|
}
|
|
120
125
|
expect(tierCounts.economy).toBe(9)
|
|
121
126
|
expect(tierCounts.standard).toBe(7)
|
|
122
|
-
expect(tierCounts.premium).toBe(
|
|
127
|
+
expect(tierCounts.premium).toBe(14)
|
|
123
128
|
})
|
|
124
129
|
|
|
125
130
|
it("all three kieFormats are represented", () => {
|
|
@@ -452,11 +457,24 @@ describe("LLM_FEATURE_DEFAULTS", () => {
|
|
|
452
457
|
expect(getLlmTier(LLM_FEATURE_DEFAULTS["prompt-helper"])).toBe("economy")
|
|
453
458
|
})
|
|
454
459
|
|
|
455
|
-
it('"ai-writer" defaults to "claude-sonnet-
|
|
456
|
-
expect(LLM_FEATURE_DEFAULTS["ai-writer"]).toBe("claude-sonnet-
|
|
460
|
+
it('"ai-writer" defaults to "claude-sonnet-5.5" (standard)', () => {
|
|
461
|
+
expect(LLM_FEATURE_DEFAULTS["ai-writer"]).toBe("claude-sonnet-5.5")
|
|
457
462
|
expect(getLlmTier(LLM_FEATURE_DEFAULTS["ai-writer"])).toBe("standard")
|
|
458
463
|
})
|
|
459
464
|
|
|
465
|
+
// Decided 2026-10-16: no feature defaults to Sonnet 4.6 any more (it stays
|
|
466
|
+
// pickable). The move keeps the standard tier, so no feature's credit rung
|
|
467
|
+
// changed: a default call with no effort still bills the bare feature id.
|
|
468
|
+
it("no feature defaults to claude-sonnet-4.6; the Sonnet 5.5 defaults bill the same rung", () => {
|
|
469
|
+
expect(Object.values(LLM_FEATURE_DEFAULTS)).not.toContain("claude-sonnet-4.6")
|
|
470
|
+
expect(getLlmModel("claude-sonnet-4.6")).toBeDefined()
|
|
471
|
+
for (const [feature, model] of Object.entries(LLM_FEATURE_DEFAULTS)) {
|
|
472
|
+
if (model !== "claude-sonnet-5.5") continue
|
|
473
|
+
expect(buildLlmCreditIdentifier(feature, model), feature).toBe(buildLlmCreditIdentifier(feature, "claude-sonnet-4.6"))
|
|
474
|
+
expect(buildLlmCreditIdentifier(feature, model), feature).toBe(feature)
|
|
475
|
+
}
|
|
476
|
+
})
|
|
477
|
+
|
|
460
478
|
it('"describe-to-picker" defaults to "claude-opus-5.5" (premium vision)', () => {
|
|
461
479
|
expect(LLM_FEATURE_DEFAULTS["describe-to-picker"]).toBe("claude-opus-5.5")
|
|
462
480
|
expect(getLlmTier(LLM_FEATURE_DEFAULTS["describe-to-picker"])).toBe("premium")
|
|
@@ -464,6 +482,13 @@ describe("LLM_FEATURE_DEFAULTS", () => {
|
|
|
464
482
|
expect(STRUCTURED_VISION_MODELS.map((m) => m.id)).toContain("claude-opus-5.5")
|
|
465
483
|
})
|
|
466
484
|
|
|
485
|
+
it("the describe-to-picker fallback is an accepted analyzer from another vendor, billed on the cheapest rung", () => {
|
|
486
|
+
expect(DESCRIBE_TO_PICKER_FALLBACK_MODEL).toBe("gemini-3.8-flash")
|
|
487
|
+
expect(STRUCTURED_VISION_MODELS.map((m) => m.id)).toContain(DESCRIBE_TO_PICKER_FALLBACK_MODEL)
|
|
488
|
+
expect(getLlmModel(DESCRIBE_TO_PICKER_FALLBACK_MODEL)?.vendor).not.toBe("anthropic")
|
|
489
|
+
expect(buildLlmCreditIdentifier("describe-to-picker", DESCRIBE_TO_PICKER_FALLBACK_MODEL)).toBe("describe-to-picker:economy")
|
|
490
|
+
})
|
|
491
|
+
|
|
467
492
|
it('"generate-script" defaults to "gemini-3.6-flash" (economy)', () => {
|
|
468
493
|
expect(LLM_FEATURE_DEFAULTS["generate-script"]).toBe("gemini-3.6-flash")
|
|
469
494
|
})
|
|
@@ -477,7 +502,7 @@ describe("LLM_FEATURE_DEFAULTS", () => {
|
|
|
477
502
|
expect(LLM_FEATURE_DEFAULTS["translate"]).toBe("gemini-3.6-flash")
|
|
478
503
|
})
|
|
479
504
|
|
|
480
|
-
it("composition features default to claude-sonnet-
|
|
505
|
+
it("composition features default to claude-sonnet-5.5", () => {
|
|
481
506
|
const compositionFeatures: LlmFeature[] = [
|
|
482
507
|
"scene-graph-ai",
|
|
483
508
|
"after-effects",
|
|
@@ -487,7 +512,7 @@ describe("LLM_FEATURE_DEFAULTS", () => {
|
|
|
487
512
|
"3d-title",
|
|
488
513
|
]
|
|
489
514
|
for (const feature of compositionFeatures) {
|
|
490
|
-
expect(LLM_FEATURE_DEFAULTS[feature]).toBe("claude-sonnet-
|
|
515
|
+
expect(LLM_FEATURE_DEFAULTS[feature]).toBe("claude-sonnet-5.5")
|
|
491
516
|
}
|
|
492
517
|
})
|
|
493
518
|
})
|
|
@@ -597,6 +622,8 @@ describe("STRUCTURED_VISION_MODELS", () => {
|
|
|
597
622
|
"claude-opus-5.5",
|
|
598
623
|
"kimi-k3",
|
|
599
624
|
"deepseek-v4.1-flash",
|
|
625
|
+
// directOnly; the direct lane enforced responseJsonSchema (2026-10-17).
|
|
626
|
+
"gemini-4-argon",
|
|
600
627
|
].sort(),
|
|
601
628
|
)
|
|
602
629
|
})
|
|
@@ -642,6 +669,7 @@ describe("reasoning effort registry", () => {
|
|
|
642
669
|
expect(getLlmTier("gpt-5.6-sol")).toBe("premium")
|
|
643
670
|
expect(getLlmTier("gpt-6-astra")).toBe("premium")
|
|
644
671
|
expect(getLlmTier("gemini-3.8-flash")).toBe("economy")
|
|
672
|
+
expect(getLlmTier("gemini-4-argon")).toBe("premium")
|
|
645
673
|
expect(getLlmTier("grok-4.6")).toBe("standard")
|
|
646
674
|
expect(getLlmTier("claude-sonnet-5")).toBe("standard")
|
|
647
675
|
expect(getLlmTier("claude-opus-4.8")).toBe("premium")
|
|
@@ -777,7 +805,8 @@ describe("gemini-3.7-flash exposure", () => {
|
|
|
777
805
|
expect(m?.tier).toBe("economy")
|
|
778
806
|
expect(m?.vendor).toBe("google")
|
|
779
807
|
expect(m?.kieFormat).toBe("chat-completions")
|
|
780
|
-
|
|
808
|
+
// Its KIE lane is served by 3.8's endpoint (see the retirement block below).
|
|
809
|
+
expect(m?.kieSlugOrModel).toBe("gemini-3-8-flash-openai")
|
|
781
810
|
// KIE-first on purpose (no preferDirect): the cheap lane serves Generate
|
|
782
811
|
// Text; the direct lane is Advanced mode + the reliability fallback.
|
|
783
812
|
expect(m?.preferDirect).toBeUndefined()
|
|
@@ -799,6 +828,81 @@ describe("gemini-3.7-flash exposure", () => {
|
|
|
799
828
|
})
|
|
800
829
|
})
|
|
801
830
|
|
|
831
|
+
// ---------------------------------------------------------------------------
|
|
832
|
+
// gemini-3.7-flash retirement (2026-10-19): the aggregator answers 3.7's own
|
|
833
|
+
// endpoint with 3.8, so the KIE lane says so explicitly, and the id leaves the
|
|
834
|
+
// pickers while every saved node / API call that names it keeps running.
|
|
835
|
+
// ---------------------------------------------------------------------------
|
|
836
|
+
describe("gemini-3.7-flash retirement", () => {
|
|
837
|
+
it("its KIE lane sends 3.8's slug and declares that 3.8 answers it", () => {
|
|
838
|
+
const m37 = getLlmModel("gemini-3.7-flash")
|
|
839
|
+
const m38 = getLlmModel("gemini-3.8-flash")
|
|
840
|
+
expect(m37?.kieSlugOrModel).toBe(m38?.kieSlugOrModel)
|
|
841
|
+
expect(m37?.kieServedAs).toBe("gemini-3.8-flash")
|
|
842
|
+
})
|
|
843
|
+
|
|
844
|
+
it("the direct Google lane is unchanged — real 3.7, Advanced mode included", () => {
|
|
845
|
+
const m = getLlmModel("gemini-3.7-flash")
|
|
846
|
+
expect(m?.directGeminiModel).toBe("gemini-3.7-flash")
|
|
847
|
+
expect(supportsAdvancedMode("gemini-3.7-flash")).toBe(true)
|
|
848
|
+
expect(llmServesDirect("gemini-3.7-flash", undefined, true)).toBe(true)
|
|
849
|
+
expect(availableReasoningEfforts("gemini-3.7-flash", true)).toEqual(["none", "low", "medium", "high"])
|
|
850
|
+
})
|
|
851
|
+
|
|
852
|
+
it("a lookup by 3.8's KIE slug resolves to 3.8, never to the retired id registered before it", () => {
|
|
853
|
+
expect(getLlmModel("gemini-3-8-flash-openai")?.id).toBe("gemini-3.8-flash")
|
|
854
|
+
})
|
|
855
|
+
|
|
856
|
+
it("3.7's old KIE slug still resolves to 3.7 (stored configs and job rows carry it)", () => {
|
|
857
|
+
expect(getLlmModel("gemini-3-7-flash-openai")?.id).toBe("gemini-3.7-flash")
|
|
858
|
+
})
|
|
859
|
+
|
|
860
|
+
it("is retired: still registered, accepted and resolvable, but never offered", () => {
|
|
861
|
+
expect(isLlmModelRetired("gemini-3.7-flash")).toBe(true)
|
|
862
|
+
expect(isLlmModelRetired("gemini-3.8-flash")).toBe(false)
|
|
863
|
+
expect(LLM_MODEL_IDS).toContain("gemini-3.7-flash")
|
|
864
|
+
// The structured-vision list doubles as a backend route gate.
|
|
865
|
+
expect(STRUCTURED_VISION_MODELS.map((m) => m.id)).toContain("gemini-3.7-flash")
|
|
866
|
+
expect(getLlmModel("gemini-3.7-flash")?.id).toBe("gemini-3.7-flash")
|
|
867
|
+
expect(PICKABLE_LLM_MODELS.map((m) => m.id)).not.toContain("gemini-3.7-flash")
|
|
868
|
+
expect(orderedLlmModels().map((m) => m.id)).not.toContain("gemini-3.7-flash")
|
|
869
|
+
expect(orderedLlmModels(STRUCTURED_VISION_MODELS).map((m) => m.id)).not.toContain("gemini-3.7-flash")
|
|
870
|
+
expect(groupLlmModelsByVendor(LLM_MODELS).flatMap((g) => g.models.map((m) => m.id))).not.toContain("gemini-3.7-flash")
|
|
871
|
+
})
|
|
872
|
+
|
|
873
|
+
it("bills exactly as before — same rung as 3.8, no credit-id change", () => {
|
|
874
|
+
expect(buildLlmCreditIdentifier("llm-chat", "gemini-3.7-flash")).toBe(buildLlmCreditIdentifier("llm-chat", "gemini-3.8-flash"))
|
|
875
|
+
})
|
|
876
|
+
|
|
877
|
+
it("a stored value keeps its slot in a picker that must show it selected", () => {
|
|
878
|
+
expect(pickableLlmModels("gemini-3.7-flash").map((m) => m.id)).toContain("gemini-3.7-flash")
|
|
879
|
+
expect(pickableLlmModels("gemini-3.8-flash").map((m) => m.id)).not.toContain("gemini-3.7-flash")
|
|
880
|
+
expect(pickableLlmModels().map((m) => m.id)).toEqual(PICKABLE_LLM_MODELS.map((m) => m.id))
|
|
881
|
+
})
|
|
882
|
+
})
|
|
883
|
+
|
|
884
|
+
describe("retired / KIE-redirect invariants", () => {
|
|
885
|
+
it("a KIE redirect names a registered, live model that owns the slug it borrows", () => {
|
|
886
|
+
for (const m of LLM_MODELS.filter((x) => x.kieServedAs)) {
|
|
887
|
+
const target = LLM_MODELS.find((x) => x.id === m.kieServedAs)
|
|
888
|
+
expect(target, `${m.id} → ${m.kieServedAs}`).toBeDefined()
|
|
889
|
+
expect(target!.kieSlugOrModel, m.id).toBe(m.kieSlugOrModel)
|
|
890
|
+
expect(target!.kieServedAs, m.id).toBeUndefined()
|
|
891
|
+
expect(target!.retired, m.id).toBeUndefined()
|
|
892
|
+
// Every lookup by the borrowed slug lands on its owner.
|
|
893
|
+
expect(getLlmModel(m.kieSlugOrModel)?.id, m.id).toBe(target!.id)
|
|
894
|
+
}
|
|
895
|
+
})
|
|
896
|
+
|
|
897
|
+
it("no default points at a retired model", () => {
|
|
898
|
+
const retired = new Set(LLM_MODELS.filter((m) => m.retired).map((m) => m.id))
|
|
899
|
+
for (const [feature, id] of Object.entries(LLM_FEATURE_DEFAULTS)) {
|
|
900
|
+
expect(retired.has(id), `LLM_FEATURE_DEFAULTS["${feature}"]`).toBe(false)
|
|
901
|
+
}
|
|
902
|
+
expect(retired.has(DESCRIBE_TO_PICKER_FALLBACK_MODEL)).toBe(false)
|
|
903
|
+
})
|
|
904
|
+
})
|
|
905
|
+
|
|
802
906
|
// ---------------------------------------------------------------------------
|
|
803
907
|
// gemini-3.8-flash exposure (KIE lane live-verified 2026-09-06: enforced
|
|
804
908
|
// response_format json_schema, reasoning_tokens in usage, and a 20k max_tokens
|
|
@@ -847,6 +951,59 @@ describe("gemini-3.8-flash exposure", () => {
|
|
|
847
951
|
})
|
|
848
952
|
})
|
|
849
953
|
|
|
954
|
+
// ---------------------------------------------------------------------------
|
|
955
|
+
// gemini-4-argon exposure (2026-10-17: DIRECT-ONLY — its KIE lane failed the
|
|
956
|
+
// probe; the direct lane enforced responseJsonSchema and rejected MINIMAL)
|
|
957
|
+
// ---------------------------------------------------------------------------
|
|
958
|
+
describe("gemini-4-argon exposure", () => {
|
|
959
|
+
it("premium Gemini served only on Google's own API — no KIE lane, no lane preference", () => {
|
|
960
|
+
const m = getLlmModel("gemini-4-argon")
|
|
961
|
+
expect(m?.tier).toBe("premium")
|
|
962
|
+
expect(m?.vendor).toBe("google")
|
|
963
|
+
expect(m?.directGeminiModel).toBe("gemini-4-argon")
|
|
964
|
+
expect(m?.directOnly).toBe(true)
|
|
965
|
+
expect(m?.preferDirect).toBeUndefined()
|
|
966
|
+
// Kept for the record and a re-enable after a re-probe; nothing sends to it.
|
|
967
|
+
expect(m?.kieSlugOrModel).toBe("gemini-4-argon-openai")
|
|
968
|
+
expect(m?.structuredOutputMode).toBe("kie-response-format")
|
|
969
|
+
expect(m?.thinkingDefaultOn).toBe(true)
|
|
970
|
+
expect(supportsAdvancedMode("gemini-4-argon")).toBe(true)
|
|
971
|
+
})
|
|
972
|
+
|
|
973
|
+
it("offers the direct ladder on every call — never `none`, which Google 400s on this model", () => {
|
|
974
|
+
// Every call runs direct, so the ladder is the direct one with or without
|
|
975
|
+
// Advanced mode; `none` maps to MINIMAL in the direct client.
|
|
976
|
+
expect(availableReasoningEfforts("gemini-4-argon")).toEqual(["low", "medium", "high"])
|
|
977
|
+
expect(availableReasoningEfforts("gemini-4-argon", true)).toEqual(["low", "medium", "high"])
|
|
978
|
+
expect(getLlmModel("gemini-4-argon")?.directReasoningEfforts).toBeUndefined()
|
|
979
|
+
})
|
|
980
|
+
|
|
981
|
+
it("floors reasoning calls at the default 32768 — its one lane is Google's, whose cap that is", () => {
|
|
982
|
+
const m = getLlmModel("gemini-4-argon")!
|
|
983
|
+
expect(m.reasoningOutputFloor).toBeUndefined()
|
|
984
|
+
expect(reasoningOutputFloor(m)).toBe(REASONING_OUTPUT_FLOOR)
|
|
985
|
+
expect(m.maxOutputTokens).toBe(16384)
|
|
986
|
+
})
|
|
987
|
+
|
|
988
|
+
it("resolves by canonical id and by its KIE slug", () => {
|
|
989
|
+
expect(getLlmModel("gemini-4-argon")?.id).toBe("gemini-4-argon")
|
|
990
|
+
expect(getLlmModel("gemini-4-argon-openai")?.id).toBe("gemini-4-argon")
|
|
991
|
+
})
|
|
992
|
+
|
|
993
|
+
it("is the default of no feature (decided 2026-10-17)", () => {
|
|
994
|
+
expect(Object.values(LLM_FEATURE_DEFAULTS)).not.toContain("gemini-4-argon")
|
|
995
|
+
})
|
|
996
|
+
|
|
997
|
+
it("stays OUT of video-analysis — image-only modality caps by decision, not omission", () => {
|
|
998
|
+
// The model reads video and audio; full caps here would auto-enroll it in
|
|
999
|
+
// VIDEO_ANALYSIS_LLM_MODELS and force a VA tier + pricing decision that
|
|
1000
|
+
// waits on a Video Analysis bake-off. If this goes red, someone flipped the
|
|
1001
|
+
// caps — only valid TOGETHER with that decision.
|
|
1002
|
+
expect(getLlmModalityCaps("gemini-4-argon")).toEqual({ image: true, video: false, audio: false })
|
|
1003
|
+
expect(VIDEO_ANALYSIS_LLM_MODELS).not.toContain("gemini-4-argon")
|
|
1004
|
+
})
|
|
1005
|
+
})
|
|
1006
|
+
|
|
850
1007
|
// ---------------------------------------------------------------------------
|
|
851
1008
|
// gpt-6-astra exposure (KIE responses lane live-verified 2026-09-06 on the
|
|
852
1009
|
// streaming path: enforced text.format json_schema with strict:true, the
|
|
@@ -961,7 +1118,9 @@ describe("buildLlmCreditIdentifier effort bump (xhigh/max only)", () => {
|
|
|
961
1118
|
expect(buildLlmCreditIdentifier("llm-chat", "gemini-3.6-flash", "max")).toBe("llm-chat:economy")
|
|
962
1119
|
})
|
|
963
1120
|
it("back-compat: no effort arg → identical to today for every model", () => {
|
|
964
|
-
|
|
1121
|
+
// A directOnly model runs direct on every call, so it bills its direct
|
|
1122
|
+
// rung even with no effort (pinned in "direct-vendor lane declarations").
|
|
1123
|
+
for (const m of LLM_MODELS.filter((x) => !x.directOnly)) {
|
|
965
1124
|
const before = m.tier === "standard" ? "x" : `x:${m.tier}`
|
|
966
1125
|
expect(buildLlmCreditIdentifier("x", m.id)).toBe(before)
|
|
967
1126
|
}
|
|
@@ -972,6 +1131,27 @@ describe("buildLlmCreditIdentifier effort bump (xhigh/max only)", () => {
|
|
|
972
1131
|
})
|
|
973
1132
|
|
|
974
1133
|
describe("direct-vendor lane declarations", () => {
|
|
1134
|
+
it("directOnly sits on a Gemini direct lane, alone — never with preferDirect or preferKie", () => {
|
|
1135
|
+
// The router serves a directOnly model from `directGeminiModel` and builds
|
|
1136
|
+
// no KIE leg; a lane preference beside it would be dead config that reads
|
|
1137
|
+
// like a live fallback.
|
|
1138
|
+
const bad = LLM_MODELS.filter((m) => m.directOnly && (!m.directGeminiModel || m.preferDirect || m.preferKie)).map((m) => m.id)
|
|
1139
|
+
expect(bad).toEqual([])
|
|
1140
|
+
})
|
|
1141
|
+
|
|
1142
|
+
it("a directOnly model is served direct on every call — the bill follows (llmServesDirect)", () => {
|
|
1143
|
+
for (const m of LLM_MODELS.filter((x) => x.directOnly)) {
|
|
1144
|
+
for (const effort of [undefined, ...LLM_REASONING_EFFORTS]) {
|
|
1145
|
+
expect(llmServesDirect(m.id, effort, false), `${m.id} ${effort}`).toBe(true)
|
|
1146
|
+
}
|
|
1147
|
+
// A premium model's direct rung is premium-direct, Advanced or not.
|
|
1148
|
+
if (m.tier === "premium") {
|
|
1149
|
+
expect(buildLlmCreditIdentifier("llm-chat", m.id)).toBe("llm-chat:premium-direct")
|
|
1150
|
+
expect(buildLlmCreditIdentifier("llm-chat", m.id, "high", true)).toBe("llm-chat:premium-direct")
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
})
|
|
1154
|
+
|
|
975
1155
|
it("no model declares BOTH preferKie and preferDirect", () => {
|
|
976
1156
|
// They are the two halves of one idea (which lane goes first). Declaring
|
|
977
1157
|
// both is meaningless and would make routing depend on branch order in
|
|
@@ -1146,10 +1326,10 @@ describe("groupLlmModelsByVendor / orderedLlmModels", () => {
|
|
|
1146
1326
|
}
|
|
1147
1327
|
})
|
|
1148
1328
|
|
|
1149
|
-
it("covers every model exactly once, in vendor order", () => {
|
|
1329
|
+
it("covers every model a picker may offer exactly once, in vendor order — retired ones never", () => {
|
|
1150
1330
|
const groups = groupLlmModelsByVendor()
|
|
1151
1331
|
const flattened = groups.flatMap((g) => g.models.map((m) => m.id))
|
|
1152
|
-
expect(flattened.sort()).toEqual(LLM_MODELS.map((m) => m.id).sort())
|
|
1332
|
+
expect(flattened.sort()).toEqual(LLM_MODELS.filter((m) => !m.retired).map((m) => m.id).sort())
|
|
1153
1333
|
expect(new Set(flattened).size).toBe(flattened.length)
|
|
1154
1334
|
const groupVendors = groups.map((g) => g.vendor)
|
|
1155
1335
|
expect(groupVendors).toEqual(LLM_VENDOR_ORDER.filter((v) => groupVendors.includes(v)))
|
|
@@ -1214,14 +1394,14 @@ describe("supportsForcedToolChoice / conversationBoundThinking", () => {
|
|
|
1214
1394
|
expect(getLlmModel("grok-4.7")?.reasoningEfforts).not.toContain("none")
|
|
1215
1395
|
})
|
|
1216
1396
|
|
|
1217
|
-
// The film pipeline's callLLM (backend/src/ee/pipelines/llms/call-llm.ts)
|
|
1218
|
-
//
|
|
1219
|
-
//
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
}
|
|
1397
|
+
// The film pipeline's callLLM (backend/src/ee/pipelines/llms/call-llm.ts)
|
|
1398
|
+
// reads `supportsForcedToolChoice` and asks such a model with tool_choice auto
|
|
1399
|
+
// (pinned in call-llm.test.ts), so a model that 400s on forcing may be a pin.
|
|
1400
|
+
it("Claude Sonnet 5.5 is an offered Script LLM pin, though it refuses a forced tool choice", () => {
|
|
1401
|
+
expect(PIPELINE_PINNABLE_SCRIPT_LLMS).toContain("claude-sonnet-5-5")
|
|
1402
|
+
expect(getLlmModel("claude-sonnet-5-5")?.supportsForcedToolChoice).toBe(false)
|
|
1403
|
+
expect(PipelineConfigSchema.safeParse({ script_llm: "claude-sonnet-5-5" }).success).toBe(true)
|
|
1404
|
+
expect(PipelineConfigSchema.safeParse({ stage_models: { script_llm: "claude-sonnet-5-5" } }).success).toBe(true)
|
|
1225
1405
|
})
|
|
1226
1406
|
|
|
1227
1407
|
it("resolves the KIE / Anthropic dash-form ids of the new models", () => {
|
|
@@ -1249,8 +1429,8 @@ describe("llmServesDirect (decided 2026-10-08: priced on the lane it runs on)",
|
|
|
1249
1429
|
// Haiku 5.5 has one, and KIE ignores it like every other Claude effort.
|
|
1250
1430
|
expect(llmServesDirect("claude-haiku-5.5", "low")).toBe(true)
|
|
1251
1431
|
})
|
|
1252
|
-
it("no effort and no Advanced: every model runs on the aggregator", () => {
|
|
1253
|
-
for (const m of LLM_MODELS) expect(llmServesDirect(m.id), m.id).toBe(
|
|
1432
|
+
it("no effort and no Advanced: every model runs on the aggregator — except one served nowhere else", () => {
|
|
1433
|
+
for (const m of LLM_MODELS) expect(llmServesDirect(m.id), m.id).toBe(m.directOnly === true)
|
|
1254
1434
|
})
|
|
1255
1435
|
it("every Claude model with an effort ladder declares effortRequiresDirect, and is KIE-first", () => {
|
|
1256
1436
|
for (const m of LLM_MODELS.filter((x) => x.vendor === "anthropic")) {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { MODEL_CATALOG, MODEL_MAKERS, isModelMakerId, modelMakerOf } from "../model-catalog.js"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Every catalog model names the company that made it (`maker`), served on
|
|
6
|
+
* `GET /v1/models` as `maker: { id, name }` and used to pick the maker's mark
|
|
7
|
+
* (`logoUrl`). The field is required on `ModelCatalogEntry`, so a new model
|
|
8
|
+
* without one does not compile; these cases also cover entries built at run
|
|
9
|
+
* time and keep the registry and the catalog in step.
|
|
10
|
+
*/
|
|
11
|
+
describe("model makers", () => {
|
|
12
|
+
it("every catalog model names a maker from the registry", () => {
|
|
13
|
+
const unknown = Object.values(MODEL_CATALOG)
|
|
14
|
+
.filter((m) => !isModelMakerId(m.maker))
|
|
15
|
+
.map((m) => `${m.id}: ${String(m.maker)}`)
|
|
16
|
+
expect(unknown).toEqual([])
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it("every registered maker makes at least one catalog model", () => {
|
|
20
|
+
const used = new Set<string>(Object.values(MODEL_CATALOG).map((m) => m.maker))
|
|
21
|
+
expect(Object.keys(MODEL_MAKERS).filter((id) => !used.has(id))).toEqual([])
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it("maker ids are lowercase slugs, and every maker has a name", () => {
|
|
25
|
+
for (const [id, maker] of Object.entries(MODEL_MAKERS)) {
|
|
26
|
+
expect(id).toMatch(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
27
|
+
expect(maker.name.trim().length, id).toBeGreaterThan(0)
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it("all the models of one family come from one maker", () => {
|
|
32
|
+
// `family` is the vendor / lab grouping clients filter on; a family whose
|
|
33
|
+
// models name two makers is almost always a copied entry that kept the
|
|
34
|
+
// other company's maker.
|
|
35
|
+
const makersByFamily = new Map<string, Set<string>>()
|
|
36
|
+
for (const m of Object.values(MODEL_CATALOG)) {
|
|
37
|
+
const makers = makersByFamily.get(m.family) ?? new Set<string>()
|
|
38
|
+
makers.add(m.maker)
|
|
39
|
+
makersByFamily.set(m.family, makers)
|
|
40
|
+
}
|
|
41
|
+
const split = [...makersByFamily]
|
|
42
|
+
.filter(([, makers]) => makers.size > 1)
|
|
43
|
+
.map(([family, makers]) => `${family}: ${[...makers].join(", ")}`)
|
|
44
|
+
expect(split).toEqual([])
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it("a family named after a lab, a product line or a cloud brand resolves to the company behind it", () => {
|
|
48
|
+
expect(MODEL_CATALOG["z-image"]!.maker).toBe("alibaba") // Tongyi-MAI (Alibaba's Tongyi Lab)
|
|
49
|
+
expect(MODEL_CATALOG["happyhorse"]!.maker).toBe("alibaba")
|
|
50
|
+
expect(MODEL_CATALOG["video-depth-anything"]!.maker).toBe("bytedance")
|
|
51
|
+
expect(MODEL_CATALOG["depth-anything-frames"]!.maker).toBe("bytedance")
|
|
52
|
+
expect(MODEL_CATALOG["volcengine-lipsync"]!.maker).toBe("bytedance") // Volcano Engine
|
|
53
|
+
expect(MODEL_CATALOG["infinitalk"]!.maker).toBe("meituan") // MeiGen-AI
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
it("modelMakerOf serves the maker's id and the company's name", () => {
|
|
57
|
+
expect(modelMakerOf(MODEL_CATALOG["veo3"]!)).toEqual({ id: "google", name: "Google" })
|
|
58
|
+
expect(modelMakerOf(MODEL_CATALOG["flux"]!)).toEqual({ id: "black-forest-labs", name: "Black Forest Labs" })
|
|
59
|
+
expect(modelMakerOf(MODEL_CATALOG["seedance-2"]!)).toEqual({ id: "bytedance", name: "ByteDance" })
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
it("modelMakerOf never throws: an entry built at run time without a known maker has none", () => {
|
|
63
|
+
expect(modelMakerOf({ maker: "acme" as never })).toBeUndefined()
|
|
64
|
+
expect(modelMakerOf({ maker: undefined as never })).toBeUndefined()
|
|
65
|
+
expect(modelMakerOf({ maker: "toString" as never })).toBeUndefined()
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
it("isModelMakerId accepts only the registry's own ids", () => {
|
|
69
|
+
expect(isModelMakerId("google")).toBe(true)
|
|
70
|
+
expect(isModelMakerId("Google")).toBe(false)
|
|
71
|
+
expect(isModelMakerId("toString")).toBe(false)
|
|
72
|
+
expect(isModelMakerId("")).toBe(false)
|
|
73
|
+
expect(isModelMakerId(42)).toBe(false)
|
|
74
|
+
expect(isModelMakerId(undefined)).toBe(false)
|
|
75
|
+
})
|
|
76
|
+
})
|
|
@@ -132,6 +132,16 @@ describe("extractPresetData", () => {
|
|
|
132
132
|
})
|
|
133
133
|
})
|
|
134
134
|
|
|
135
|
+
describe("an audio-locked use-case node's memory is never a preset setting", () => {
|
|
136
|
+
it("a preset saved from an audio-locked Clip Pack or Tighten Episode carries no settingsBeforeAudio", () => {
|
|
137
|
+
const clipPack = extractPresetData({ label: "Clip Pack", count: 6, framing: null, captions: false, settingsBeforeAudio: { framing: { aspect: "16:9", layout: "grid" }, captions: true } }, "clip-pack")
|
|
138
|
+
expect(clipPack).toEqual({ count: 6, framing: null, captions: false })
|
|
139
|
+
const tighten = extractPresetData({ label: "T", output: "audio", captions: false, settingsBeforeAudio: { output: "video", captions: true } }, "tighten-episode")
|
|
140
|
+
expect(tighten).not.toHaveProperty("settingsBeforeAudio")
|
|
141
|
+
expect(PRESET_EXCLUDED_KEYS.has("settingsBeforeAudio")).toBe(true)
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
|
|
135
145
|
describe("PRESET_EXCLUDED_KEYS ⊇ PRESET_APPLY_CLEAR_KEYS", () => {
|
|
136
146
|
it("every clear-on-apply key is also capture-excluded (one source covers save + import + override)", () => {
|
|
137
147
|
for (const k of PRESET_APPLY_CLEAR_KEYS) {
|
|
@@ -1314,3 +1314,18 @@ describe("mergeNodeInputOverrides", () => {
|
|
|
1314
1314
|
expect(overrides).toEqual({ extractedAudioUrl: "https://cdn/new.mp3" })
|
|
1315
1315
|
})
|
|
1316
1316
|
})
|
|
1317
|
+
|
|
1318
|
+
describe("mergeNodeInputOverrides — a null override clears the field", () => {
|
|
1319
|
+
// JSON cannot carry `undefined`, so an app card that clears a lever (a resolution the new model has no
|
|
1320
|
+
// such lever for, Draft turned off) sends null. The run must then have NO value there — neither null nor
|
|
1321
|
+
// the publisher's saved one.
|
|
1322
|
+
it("removes the key from the merged data", () => {
|
|
1323
|
+
const merged = mergeNodeInputOverrides("video-to-video", { provider: "wan", v2vResolution: "720p", draft: true }, { provider: "runway-aleph", v2vResolution: null, draft: null })
|
|
1324
|
+
expect(merged).toEqual({ provider: "runway-aleph" })
|
|
1325
|
+
expect(Object.hasOwn(merged, "v2vResolution")).toBe(false)
|
|
1326
|
+
})
|
|
1327
|
+
|
|
1328
|
+
it("leaves every other override as it was", () => {
|
|
1329
|
+
expect(mergeNodeInputOverrides("text-to-speech", { stability: 0.5 }, { stability: 0 })).toEqual({ stability: 0 })
|
|
1330
|
+
})
|
|
1331
|
+
})
|
|
@@ -28,8 +28,11 @@ const edges = [
|
|
|
28
28
|
|
|
29
29
|
describe("a review-on use-case node holds what follows it until its Render final", () => {
|
|
30
30
|
it("is a preview-holding type without joining the render set", () => {
|
|
31
|
-
expect(
|
|
31
|
+
expect(REVIEW_HOLDING_USE_CASE_TYPES.has("tighten-episode")).toBe(true)
|
|
32
32
|
expect(isPreviewHoldingType("tighten-episode")).toBe(true)
|
|
33
|
+
expect(isPreviewHoldingType("episode-trailer")).toBe(true)
|
|
34
|
+
expect(isPreviewHoldingType("clip-pack")).toBe(true)
|
|
35
|
+
expect(PREVIEW_RENDER_NODE_TYPES.has("clip-pack")).toBe(false)
|
|
33
36
|
expect(isPreviewHoldingType("apply-edl")).toBe(true)
|
|
34
37
|
expect(isPreviewHoldingType("speaker-view")).toBe(true)
|
|
35
38
|
expect(isPreviewHoldingType("social-media-format")).toBe(false)
|
|
@@ -60,6 +63,18 @@ describe("a review-on use-case node holds what follows it until its Render final
|
|
|
60
63
|
expect(previewStops([rec, node, fmt, post], edges).gatedNodeIds.size).toBe(0)
|
|
61
64
|
})
|
|
62
65
|
|
|
66
|
+
it("a review-on Trailer holds what follows it; its Render final override releases it", () => {
|
|
67
|
+
const tr = (data: Record<string, unknown>) => ({ id: "t1", type: "episode-trailer", data })
|
|
68
|
+
const held = previewStops([rec, tr({ reviewBeforeRender: true }), fmt, post], edges)
|
|
69
|
+
expect(held.previewRenderIds).toEqual(["t1"])
|
|
70
|
+
expect([...held.gatedNodeIds].sort()).toEqual(["fmt", "post"])
|
|
71
|
+
expect(previewStops([rec, tr({}), fmt, post], edges).gatedNodeIds.size).toBe(0)
|
|
72
|
+
const released = withRunOverrides([rec, tr({ reviewBeforeRender: true }), fmt, post], {
|
|
73
|
+
t1: { useCaseContinue: { mode: "render-final", jobId: "00000000-0000-4000-8000-000000000007" } },
|
|
74
|
+
})
|
|
75
|
+
expect(previewStops(released, edges).gatedNodeIds.size).toBe(0)
|
|
76
|
+
})
|
|
77
|
+
|
|
63
78
|
it("the continuation set as a run override releases them too", () => {
|
|
64
79
|
const graph = withRunOverrides([rec, t1({ reviewBeforeRender: true }), fmt, post], {
|
|
65
80
|
t1: { useCaseContinue: { mode: "render-final", jobId: "job-1" } },
|
|
@@ -10,6 +10,59 @@ describe("isPrivateOrReservedIP", () => {
|
|
|
10
10
|
it("passes public addresses", () => {
|
|
11
11
|
for (const ip of ["8.8.8.8", "93.184.216.34", "172.32.0.1", "2606:4700::1"]) expect(isPrivateOrReservedIP(ip), ip).toBe(false)
|
|
12
12
|
})
|
|
13
|
+
|
|
14
|
+
it("refuses the whole of link-local fe80::/10 (fe80:: to febf::) and the old site-local fec0::/10", () => {
|
|
15
|
+
for (const ip of ["fe80::1", "fe90::1", "fea0::abcd", "febf:ffff::1", "FE85::1", "fe80::1%eth0", "fec0::1", "feff::1"]) {
|
|
16
|
+
expect(isPrivateOrReservedIP(ip), ip).toBe(true)
|
|
17
|
+
}
|
|
18
|
+
expect(isPrivateOrReservedIP("fe7f::1")).toBe(false) // just below fe80::/10
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
it("judges an IPv6 address that carries an IPv4 one by the IPv4 it reaches (NAT64, 6to4, mapped, compatible)", () => {
|
|
22
|
+
for (const ip of [
|
|
23
|
+
"64:ff9b::a9fe:a9fe", // NAT64 → 169.254.169.254
|
|
24
|
+
"64:ff9b::7f00:1", // NAT64 → 127.0.0.1
|
|
25
|
+
"64:ff9b::10.0.0.1", // NAT64, dotted tail
|
|
26
|
+
"2002:a9fe:a9fe::1", // 6to4 → 169.254.169.254
|
|
27
|
+
"2002:c0a8:0101::", // 6to4 → 192.168.1.1
|
|
28
|
+
"::ffff:a9fe:a9fe",
|
|
29
|
+
"0:0:0:0:0:ffff:127.0.0.1",
|
|
30
|
+
"::2", // IPv4-compatible 0.0.0.2
|
|
31
|
+
]) {
|
|
32
|
+
expect(isPrivateOrReservedIP(ip), ip).toBe(true)
|
|
33
|
+
}
|
|
34
|
+
for (const ip of ["64:ff9b::808:808", "64:ff9b::8.8.8.8", "2002:808:808::1", "::ffff:808:808"]) {
|
|
35
|
+
expect(isPrivateOrReservedIP(ip), ip).toBe(false)
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it("refuses local-use NAT64 and Teredo", () => {
|
|
40
|
+
for (const ip of ["64:ff9b:1::1", "2001:0:4136:e378:8000:63bf:3fff:fdd2", "2001::1"]) {
|
|
41
|
+
expect(isPrivateOrReservedIP(ip), ip).toBe(true)
|
|
42
|
+
}
|
|
43
|
+
expect(isPrivateOrReservedIP("2001:4860:4860::8888")).toBe(false) // a public 2001: address
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
it("refuses the IETF protocol block of IPv4", () => {
|
|
47
|
+
expect(isPrivateOrReservedIP("192.0.0.170")).toBe(true)
|
|
48
|
+
expect(isPrivateOrReservedIP("192.0.1.1")).toBe(false)
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
// Unroutable, so no SSRF target — and the same rule decides which client
|
|
52
|
+
// addresses the server trusts and keys rate limits on, where these stand in
|
|
53
|
+
// for public addresses (client-address.ts). Refusing them would make a
|
|
54
|
+
// documentation address an "unknown" client.
|
|
55
|
+
it("does not refuse the documentation blocks", () => {
|
|
56
|
+
for (const ip of ["192.0.2.1", "198.51.100.7", "203.0.113.9", "2001:db8::1", "2001:db8:abcd:12::1"]) {
|
|
57
|
+
expect(isPrivateOrReservedIP(ip), ip).toBe(false)
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it("fails closed on something with a colon that is not an IPv6 address", () => {
|
|
62
|
+
for (const ip of ["::ffff:zzzz", "1:2:3", "1::2::3", "::ffff:300.1.1.1", "1:2:3:4:5:6:7:8:9"]) {
|
|
63
|
+
expect(isPrivateOrReservedIP(ip), ip).toBe(true)
|
|
64
|
+
}
|
|
65
|
+
})
|
|
13
66
|
})
|
|
14
67
|
|
|
15
68
|
describe("isLocalOrPrivateHostname", () => {
|
|
@@ -138,6 +138,25 @@ describe("defaultEdgeOutputMode / listResultsServeHandle", () => {
|
|
|
138
138
|
expect(defaultEdgeOutputMode("ugc-clips", "transcript")).toBe("last")
|
|
139
139
|
expect(listResultsServeHandle("ugc-clips", "plan-out")).toBe(false)
|
|
140
140
|
})
|
|
141
|
+
it("Trailer: its deliveries (media, and no handle) are each; its plan is one value; a video producer", () => {
|
|
142
|
+
expect(FAN_OUT_EACH_HANDLES["episode-trailer"]).toEqual({ each: ["media"], primary: "media" })
|
|
143
|
+
expect(defaultEdgeOutputMode("episode-trailer", "media")).toBe("each")
|
|
144
|
+
expect(defaultEdgeOutputMode("episode-trailer", undefined)).toBe("each")
|
|
145
|
+
expect(defaultEdgeOutputMode("episode-trailer", "json")).toBe("last")
|
|
146
|
+
expect(listResultsServeHandle("episode-trailer", "media")).toBe(true)
|
|
147
|
+
expect(listResultsServeHandle("episode-trailer", "json")).toBe(false)
|
|
148
|
+
expect(VIDEO_PRODUCER_TYPES.has("episode-trailer")).toBe(true)
|
|
149
|
+
})
|
|
150
|
+
it("Clip Pack: its clips (clips, and no handle) are each; its plan is one value; video or audio, decided at run time", () => {
|
|
151
|
+
expect(FAN_OUT_EACH_HANDLES["clip-pack"]).toEqual({ each: ["clips"], primary: "clips" })
|
|
152
|
+
expect(defaultEdgeOutputMode("clip-pack", "clips")).toBe("each")
|
|
153
|
+
expect(defaultEdgeOutputMode("clip-pack", undefined)).toBe("each")
|
|
154
|
+
expect(defaultEdgeOutputMode("clip-pack", "json")).toBe("last")
|
|
155
|
+
expect(listResultsServeHandle("clip-pack", "clips")).toBe(true)
|
|
156
|
+
expect(listResultsServeHandle("clip-pack", "json")).toBe(false)
|
|
157
|
+
expect(DYNAMIC_PRODUCER_TYPES.has("clip-pack")).toBe(true)
|
|
158
|
+
expect(VIDEO_PRODUCER_TYPES.has("clip-pack")).toBe(false)
|
|
159
|
+
})
|
|
141
160
|
it("only the each handles read the per-iteration results", () => {
|
|
142
161
|
expect(listResultsServeHandle("camera-switch", "edl")).toBe(true)
|
|
143
162
|
expect(listResultsServeHandle("camera-switch", undefined)).toBe(true)
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
CONTINUATION_NOT_COMPLETED,
|
|
4
4
|
CONTINUATION_NOT_FAILED,
|
|
5
5
|
CONTINUATION_NOT_FOUND,
|
|
6
|
+
CONTINUATION_PREVIEW_PENDING,
|
|
6
7
|
CONTINUATION_SUBSET_REQUIRED,
|
|
7
8
|
CONTINUATION_SUPERSEDED,
|
|
8
9
|
CONTINUATION_VERSION_MISMATCH,
|
|
@@ -19,15 +20,17 @@ describe("run continuation refusal codes", () => {
|
|
|
19
20
|
expect(CONTINUATION_SUBSET_REQUIRED).toBe("continuation_subset_required")
|
|
20
21
|
expect(CONTINUATION_NOT_FAILED).toBe("continuation_not_failed")
|
|
21
22
|
expect(CONTINUATION_SUPERSEDED).toBe("continuation_superseded")
|
|
23
|
+
expect(CONTINUATION_PREVIEW_PENDING).toBe("continuation_preview_pending")
|
|
22
24
|
})
|
|
23
25
|
|
|
24
26
|
it("lists every code once", () => {
|
|
25
|
-
expect(new Set(RUN_CONTINUATION_CODES).size).toBe(
|
|
27
|
+
expect(new Set(RUN_CONTINUATION_CODES).size).toBe(8)
|
|
26
28
|
expect([...RUN_CONTINUATION_CODES].sort()).toEqual(
|
|
27
29
|
[
|
|
28
30
|
CONTINUATION_NOT_COMPLETED,
|
|
29
31
|
CONTINUATION_NOT_FAILED,
|
|
30
32
|
CONTINUATION_NOT_FOUND,
|
|
33
|
+
CONTINUATION_PREVIEW_PENDING,
|
|
31
34
|
CONTINUATION_SUBSET_REQUIRED,
|
|
32
35
|
CONTINUATION_SUPERSEDED,
|
|
33
36
|
CONTINUATION_VERSION_MISMATCH,
|