@nodaro/shared 3.31.0 → 3.33.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/README.md +17 -0
- package/dist/chunk-23FJQTEA.js +1604 -0
- package/dist/chunk-23FJQTEA.js.map +1 -0
- package/dist/chunk-2NIQO2J3.cjs +54 -0
- package/dist/chunk-2NIQO2J3.cjs.map +1 -0
- package/dist/chunk-2NQLSLSN.cjs +19 -0
- package/dist/chunk-2NQLSLSN.cjs.map +1 -0
- package/dist/chunk-2OJIVO7R.cjs +32 -0
- package/dist/chunk-2OJIVO7R.cjs.map +1 -0
- package/dist/chunk-2RF4Z7KG.cjs +803 -0
- package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
- package/dist/chunk-3RYKIUAE.js +86 -0
- package/dist/chunk-3RYKIUAE.js.map +1 -0
- package/dist/chunk-44I73CQS.cjs +194 -0
- package/dist/chunk-44I73CQS.cjs.map +1 -0
- package/dist/chunk-5PC6JBGJ.cjs +1419 -0
- package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
- package/dist/chunk-5RU2HCW2.js +30 -0
- package/dist/chunk-5RU2HCW2.js.map +1 -0
- package/dist/chunk-5RYLK3MQ.js +267 -0
- package/dist/chunk-5RYLK3MQ.js.map +1 -0
- package/dist/chunk-5THUHJ3E.js +46 -0
- package/dist/chunk-5THUHJ3E.js.map +1 -0
- package/dist/chunk-6DAWSVX2.cjs +103 -0
- package/dist/chunk-6DAWSVX2.cjs.map +1 -0
- package/dist/chunk-6WZ2VN7V.js +920 -0
- package/dist/chunk-6WZ2VN7V.js.map +1 -0
- package/dist/chunk-7G7G42KS.js +86 -0
- package/dist/chunk-7G7G42KS.js.map +1 -0
- package/dist/chunk-7Z5LUTGU.js +1567 -0
- package/dist/chunk-7Z5LUTGU.js.map +1 -0
- package/dist/chunk-AINCI23X.js +2171 -0
- package/dist/chunk-AINCI23X.js.map +1 -0
- package/dist/chunk-BG5D5CZ6.js +1922 -0
- package/dist/chunk-BG5D5CZ6.js.map +1 -0
- package/dist/chunk-CK3GK34R.js +1381 -0
- package/dist/chunk-CK3GK34R.js.map +1 -0
- package/dist/chunk-CUH22J4D.js +17 -0
- package/dist/chunk-CUH22J4D.js.map +1 -0
- package/dist/chunk-D26ENTN2.cjs +1770 -0
- package/dist/chunk-D26ENTN2.cjs.map +1 -0
- package/dist/chunk-D6GNRSCV.cjs +2017 -0
- package/dist/chunk-D6GNRSCV.cjs.map +1 -0
- package/dist/chunk-FBV5DF6D.js +95 -0
- package/dist/chunk-FBV5DF6D.js.map +1 -0
- package/dist/chunk-FG4E7MTG.cjs +4 -0
- package/dist/chunk-FG4E7MTG.cjs.map +1 -0
- package/dist/chunk-FT5CF6IA.js +42 -0
- package/dist/chunk-FT5CF6IA.js.map +1 -0
- package/dist/chunk-G6IIVKMO.js +26 -0
- package/dist/chunk-G6IIVKMO.js.map +1 -0
- package/dist/chunk-HC7VKIV5.cjs +430 -0
- package/dist/chunk-HC7VKIV5.cjs.map +1 -0
- package/dist/chunk-HGC5JNVA.cjs +1503 -0
- package/dist/chunk-HGC5JNVA.cjs.map +1 -0
- package/dist/chunk-HKFMXNVQ.cjs +1273 -0
- package/dist/chunk-HKFMXNVQ.cjs.map +1 -0
- package/dist/chunk-HRXEZ3SX.cjs +526 -0
- package/dist/chunk-HRXEZ3SX.cjs.map +1 -0
- package/dist/chunk-HSHCCBIV.js +255 -0
- package/dist/chunk-HSHCCBIV.js.map +1 -0
- package/dist/chunk-HUR6ZJ7S.cjs +159 -0
- package/dist/chunk-HUR6ZJ7S.cjs.map +1 -0
- package/dist/chunk-J7BMO73N.cjs +114 -0
- package/dist/chunk-J7BMO73N.cjs.map +1 -0
- package/dist/chunk-JFS3NWZ5.cjs +1714 -0
- package/dist/chunk-JFS3NWZ5.cjs.map +1 -0
- package/dist/chunk-JL4C5VJ7.cjs +488 -0
- package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
- package/dist/chunk-JSGIEF6Z.cjs +1087 -0
- package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
- package/dist/chunk-JWA5SGCS.js +203 -0
- package/dist/chunk-JWA5SGCS.js.map +1 -0
- package/dist/chunk-K3LLGRK7.cjs +3545 -0
- package/dist/chunk-K3LLGRK7.cjs.map +1 -0
- package/dist/chunk-KU6S7IYV.cjs +210 -0
- package/dist/chunk-KU6S7IYV.cjs.map +1 -0
- package/dist/chunk-M36G6SRP.js +447 -0
- package/dist/chunk-M36G6SRP.js.map +1 -0
- package/dist/chunk-M7GQBRZU.cjs +1963 -0
- package/dist/chunk-M7GQBRZU.cjs.map +1 -0
- package/dist/chunk-MRXGWL42.cjs +4 -0
- package/dist/chunk-MRXGWL42.cjs.map +1 -0
- package/dist/chunk-NEJ2PV4C.cjs +211 -0
- package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
- package/dist/chunk-OTATNBMD.js +141 -0
- package/dist/chunk-OTATNBMD.js.map +1 -0
- package/dist/chunk-OZSACQ2V.js +471 -0
- package/dist/chunk-OZSACQ2V.js.map +1 -0
- package/dist/chunk-PHZ23DP3.js +1782 -0
- package/dist/chunk-PHZ23DP3.js.map +1 -0
- package/dist/chunk-PQHS255G.js +1369 -0
- package/dist/chunk-PQHS255G.js.map +1 -0
- package/dist/chunk-PRYE7AZQ.cjs +1227 -0
- package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
- package/dist/chunk-PVJBAPYJ.js +404 -0
- package/dist/chunk-PVJBAPYJ.js.map +1 -0
- package/dist/chunk-PXFQVLBX.js +776 -0
- package/dist/chunk-PXFQVLBX.js.map +1 -0
- package/dist/chunk-QA3MVQ32.js +21 -0
- package/dist/chunk-QA3MVQ32.js.map +1 -0
- package/dist/chunk-QJRP44ZO.js +769 -0
- package/dist/chunk-QJRP44ZO.js.map +1 -0
- package/dist/chunk-SAW5OK36.cjs +54 -0
- package/dist/chunk-SAW5OK36.cjs.map +1 -0
- package/dist/chunk-SES6GDBQ.cjs +624 -0
- package/dist/chunk-SES6GDBQ.cjs.map +1 -0
- package/dist/chunk-SFW3UB2P.js +31 -0
- package/dist/chunk-SFW3UB2P.js.map +1 -0
- package/dist/chunk-TNPDV7I4.cjs +2346 -0
- package/dist/chunk-TNPDV7I4.cjs.map +1 -0
- package/dist/chunk-TU33KYKW.cjs +25 -0
- package/dist/chunk-TU33KYKW.cjs.map +1 -0
- package/dist/chunk-TZBIY5C3.js +187 -0
- package/dist/chunk-TZBIY5C3.js.map +1 -0
- package/dist/chunk-TZE673G6.js +3 -0
- package/dist/chunk-TZE673G6.js.map +1 -0
- package/dist/chunk-UCFWI6D4.js +29 -0
- package/dist/chunk-UCFWI6D4.js.map +1 -0
- package/dist/chunk-UTQSSKSG.js +1164 -0
- package/dist/chunk-UTQSSKSG.js.map +1 -0
- package/dist/chunk-VA42637J.cjs +287 -0
- package/dist/chunk-VA42637J.cjs.map +1 -0
- package/dist/chunk-VNQRI2RO.cjs +1047 -0
- package/dist/chunk-VNQRI2RO.cjs.map +1 -0
- package/dist/chunk-VXPLKQWY.cjs +821 -0
- package/dist/chunk-VXPLKQWY.cjs.map +1 -0
- package/dist/chunk-WD6HJRBG.cjs +197 -0
- package/dist/chunk-WD6HJRBG.cjs.map +1 -0
- package/dist/chunk-WDIBOWAA.js +1054 -0
- package/dist/chunk-WDIBOWAA.js.map +1 -0
- package/dist/chunk-WKOIGLQX.cjs +38 -0
- package/dist/chunk-WKOIGLQX.cjs.map +1 -0
- package/dist/chunk-WNVQ3SMB.cjs +96 -0
- package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
- package/dist/chunk-WRSWH7US.cjs +285 -0
- package/dist/chunk-WRSWH7US.cjs.map +1 -0
- package/dist/chunk-XGFTL5XY.js +181 -0
- package/dist/chunk-XGFTL5XY.js.map +1 -0
- package/dist/chunk-XNISPHTZ.js +1039 -0
- package/dist/chunk-XNISPHTZ.js.map +1 -0
- package/dist/chunk-Y2PM3FFL.js +3 -0
- package/dist/chunk-Y2PM3FFL.js.map +1 -0
- package/dist/chunk-YBPBK5KI.js +1030 -0
- package/dist/chunk-YBPBK5KI.js.map +1 -0
- package/dist/chunk-YWNYGYI7.cjs +31 -0
- package/dist/chunk-YWNYGYI7.cjs.map +1 -0
- package/dist/chunk-YYV35XOS.js +122 -0
- package/dist/chunk-YYV35XOS.js.map +1 -0
- package/dist/chunk-Z2OL5AJD.cjs +133 -0
- package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
- package/dist/chunk-ZDFHA2EC.js +572 -0
- package/dist/chunk-ZDFHA2EC.js.map +1 -0
- package/dist/chunk-ZL7UM6PU.cjs +34 -0
- package/dist/chunk-ZL7UM6PU.cjs.map +1 -0
- package/dist/chunk-ZNZDQAXN.js +175 -0
- package/dist/chunk-ZNZDQAXN.js.map +1 -0
- package/dist/chunk-ZO5PBBFX.js +3497 -0
- package/dist/chunk-ZO5PBBFX.js.map +1 -0
- package/dist/chunk-ZRL2UFTH.cjs +1073 -0
- package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
- package/dist/entries/apps.cjs +155 -0
- package/dist/entries/apps.cjs.map +1 -0
- package/dist/entries/apps.d.cts +292 -0
- package/dist/entries/apps.d.ts +292 -0
- package/dist/entries/apps.js +10 -0
- package/dist/entries/apps.js.map +1 -0
- package/dist/entries/captions.cjs +124 -0
- package/dist/entries/captions.cjs.map +1 -0
- package/dist/entries/captions.d.cts +354 -0
- package/dist/entries/captions.d.ts +354 -0
- package/dist/entries/captions.js +3 -0
- package/dist/entries/captions.js.map +1 -0
- package/dist/entries/catalogs.cjs +165 -0
- package/dist/entries/catalogs.cjs.map +1 -0
- package/dist/entries/catalogs.d.cts +385 -0
- package/dist/entries/catalogs.d.ts +385 -0
- package/dist/entries/catalogs.js +4 -0
- package/dist/entries/catalogs.js.map +1 -0
- package/dist/entries/credits.cjs +596 -0
- package/dist/entries/credits.cjs.map +1 -0
- package/dist/entries/credits.d.cts +1460 -0
- package/dist/entries/credits.d.ts +1460 -0
- package/dist/entries/credits.js +11 -0
- package/dist/entries/credits.js.map +1 -0
- package/dist/entries/edl.cjs +409 -0
- package/dist/entries/edl.cjs.map +1 -0
- package/dist/entries/edl.d.cts +1199 -0
- package/dist/entries/edl.d.ts +1199 -0
- package/dist/entries/edl.js +4 -0
- package/dist/entries/edl.js.map +1 -0
- package/dist/entries/entities.cjs +530 -0
- package/dist/entries/entities.cjs.map +1 -0
- package/dist/entries/entities.d.cts +1371 -0
- package/dist/entries/entities.d.ts +1371 -0
- package/dist/entries/entities.js +5 -0
- package/dist/entries/entities.js.map +1 -0
- package/dist/entries/i18n.cjs +48 -0
- package/dist/entries/i18n.cjs.map +1 -0
- package/dist/entries/i18n.d.cts +69 -0
- package/dist/entries/i18n.d.ts +69 -0
- package/dist/entries/i18n.js +3 -0
- package/dist/entries/i18n.js.map +1 -0
- package/dist/entries/llm-models.cjs +177 -0
- package/dist/entries/llm-models.cjs.map +1 -0
- package/dist/entries/llm-models.d.cts +435 -0
- package/dist/entries/llm-models.d.ts +435 -0
- package/dist/entries/llm-models.js +4 -0
- package/dist/entries/llm-models.js.map +1 -0
- package/dist/entries/media.cjs +335 -0
- package/dist/entries/media.cjs.map +1 -0
- package/dist/entries/media.d.cts +518 -0
- package/dist/entries/media.d.ts +518 -0
- package/dist/entries/media.js +6 -0
- package/dist/entries/media.js.map +1 -0
- package/dist/entries/model-catalog.cjs +259 -0
- package/dist/entries/model-catalog.cjs.map +1 -0
- package/dist/entries/model-catalog.d.cts +202 -0
- package/dist/entries/model-catalog.d.ts +202 -0
- package/dist/entries/model-catalog.js +6 -0
- package/dist/entries/model-catalog.js.map +1 -0
- package/dist/entries/models.cjs +833 -0
- package/dist/entries/models.cjs.map +1 -0
- package/dist/entries/models.d.cts +287 -0
- package/dist/entries/models.d.ts +287 -0
- package/dist/entries/models.js +8 -0
- package/dist/entries/models.js.map +1 -0
- package/dist/entries/nodes.cjs +789 -0
- package/dist/entries/nodes.cjs.map +1 -0
- package/dist/entries/nodes.d.cts +1600 -0
- package/dist/entries/nodes.d.ts +1600 -0
- package/dist/entries/nodes.js +16 -0
- package/dist/entries/nodes.js.map +1 -0
- package/dist/entries/organizations.cjs +80 -0
- package/dist/entries/organizations.cjs.map +1 -0
- package/dist/entries/organizations.d.cts +466 -0
- package/dist/entries/organizations.d.ts +466 -0
- package/dist/entries/organizations.js +3 -0
- package/dist/entries/organizations.js.map +1 -0
- package/dist/entries/pipeline.cjs +594 -0
- package/dist/entries/pipeline.cjs.map +1 -0
- package/dist/entries/pipeline.d.cts +2617 -0
- package/dist/entries/pipeline.d.ts +2617 -0
- package/dist/entries/pipeline.js +5 -0
- package/dist/entries/pipeline.js.map +1 -0
- package/dist/entries/scene3d.cjs +704 -0
- package/dist/entries/scene3d.cjs.map +1 -0
- package/dist/entries/scene3d.d.cts +4284 -0
- package/dist/entries/scene3d.d.ts +4284 -0
- package/dist/entries/scene3d.js +3 -0
- package/dist/entries/scene3d.js.map +1 -0
- package/dist/entries/social.cjs +714 -0
- package/dist/entries/social.cjs.map +1 -0
- package/dist/entries/social.d.cts +1366 -0
- package/dist/entries/social.d.ts +1366 -0
- package/dist/entries/social.js +5 -0
- package/dist/entries/social.js.map +1 -0
- package/dist/entries/types.cjs +13 -0
- package/dist/entries/types.cjs.map +1 -0
- package/dist/entries/types.d.cts +162 -0
- package/dist/entries/types.d.ts +162 -0
- package/dist/entries/types.js +4 -0
- package/dist/entries/types.js.map +1 -0
- package/dist/entries/ugc.cjs +279 -0
- package/dist/entries/ugc.cjs.map +1 -0
- package/dist/entries/ugc.d.cts +575 -0
- package/dist/entries/ugc.d.ts +575 -0
- package/dist/entries/ugc.js +6 -0
- package/dist/entries/ugc.js.map +1 -0
- package/dist/entries/video.cjs +549 -0
- package/dist/entries/video.cjs.map +1 -0
- package/dist/entries/video.d.cts +1791 -0
- package/dist/entries/video.d.ts +1791 -0
- package/dist/entries/video.js +8 -0
- package/dist/entries/video.js.map +1 -0
- package/dist/entries/workflow.cjs +574 -0
- package/dist/entries/workflow.cjs.map +1 -0
- package/dist/entries/workflow.d.cts +1743 -0
- package/dist/entries/workflow.d.ts +1743 -0
- package/dist/entries/workflow.js +5 -0
- package/dist/entries/workflow.js.map +1 -0
- package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
- package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
- package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
- package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
- package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
- package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
- package/dist/index.cjs +7747 -27084
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -24198
- package/dist/index.d.ts +32 -24198
- package/dist/index.js +40 -25220
- package/dist/index.js.map +1 -1
- package/dist/model-catalog-V-ZNzRSd.d.cts +651 -0
- package/dist/model-catalog-V-ZNzRSd.d.ts +651 -0
- package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
- package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
- package/dist/presentation-utils-D0kxsWf9.d.cts +92 -0
- package/dist/presentation-utils-pZwlEAzo.d.ts +92 -0
- package/dist/scene-node-types-C3kl_zyK.d.cts +1949 -0
- package/dist/scene-node-types-C3kl_zyK.d.ts +1949 -0
- package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
- package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
- package/dist/types-BRlFPEru.d.cts +511 -0
- package/dist/types-BRlFPEru.d.ts +511 -0
- package/dist/types-DffyGSy5.d.cts +67 -0
- package/dist/types-DffyGSy5.d.ts +67 -0
- package/package.json +102 -1
- package/src/__tests__/add-captions-plan.test.ts +6 -2
- package/src/__tests__/caption-edge-dash.test.ts +23 -0
- package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
- package/src/__tests__/input-field-extra-keys.test.ts +1 -0
- package/src/__tests__/model-makers.test.ts +76 -0
- package/src/__tests__/no-internal-imports.test.ts +1 -1
- package/src/__tests__/node-aspect-ratio.test.ts +25 -0
- package/src/__tests__/node-runtime-keys.test.ts +9 -0
- package/src/__tests__/package-entries.test.ts +50 -0
- package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
- package/src/__tests__/presentation-utils.test.ts +15 -0
- package/src/__tests__/preview-gate-use-case.test.ts +151 -0
- package/src/__tests__/private-host.test.ts +53 -0
- package/src/__tests__/run-continuation.test.ts +7 -1
- package/src/__tests__/site-capture-node.test.ts +58 -0
- package/src/__tests__/ugc-lane-wires.test.ts +228 -0
- package/src/__tests__/ugc-node-wires.test.ts +9 -3
- package/src/__tests__/ugc-run-state.test.ts +5 -4
- package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
- package/src/__tests__/video-analysis-pricing.test.ts +6 -6
- package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
- package/src/add-captions-plan.ts +9 -3
- package/src/caption-edge-dash.ts +33 -0
- package/src/component-types.ts +9 -0
- package/src/credit-estimators/index.ts +22 -1
- package/src/credit-estimators/pitch-tempo.ts +15 -1
- package/src/credit-estimators/speech.ts +72 -4
- package/src/credit-estimators/unit-quote.ts +52 -0
- package/src/credit-estimators/video-sfx.ts +15 -0
- package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
- package/src/credit-identifiers.ts +62 -17
- package/src/entity-image-handle.ts +2 -0
- package/src/entries/apps.ts +63 -0
- package/src/entries/captions.ts +34 -0
- package/src/entries/catalogs.ts +65 -0
- package/src/entries/credits.ts +105 -0
- package/src/entries/edl.ts +42 -0
- package/src/entries/entities.ts +144 -0
- package/src/entries/i18n.ts +31 -0
- package/src/entries/llm-models.ts +63 -0
- package/src/entries/media.ts +36 -0
- package/src/entries/model-catalog.ts +95 -0
- package/src/entries/models.ts +266 -0
- package/src/entries/nodes.ts +245 -0
- package/src/entries/organizations.ts +9 -0
- package/src/entries/pipeline.ts +43 -0
- package/src/entries/scene3d.ts +27 -0
- package/src/entries/social.ts +297 -0
- package/src/entries/types.ts +26 -0
- package/src/entries/ugc.ts +14 -0
- package/src/entries/video.ts +59 -0
- package/src/entries/workflow.ts +172 -0
- package/src/fan-out-rows.ts +2 -0
- package/src/index.ts +25 -1845
- package/src/json-kinds.ts +4 -0
- package/src/model-catalog.ts +243 -34
- package/src/node-mappable-fields.ts +1 -0
- package/src/node-run-routes.ts +2 -0
- package/src/node-runtime-keys.ts +8 -0
- package/src/normalize-node-params.ts +30 -0
- package/src/presentation-utils.ts +12 -0
- package/src/preview-gate.ts +92 -14
- package/src/private-host.ts +89 -59
- package/src/producer-types.ts +16 -2
- package/src/run-continuation.ts +21 -0
- package/src/site-capture-node.ts +82 -0
- package/src/ugc-lane-wires.ts +246 -0
- package/src/ugc-node-wires.ts +37 -7
- package/src/ugc-run-state.ts +5 -3
- package/src/video-analysis-pricing.ts +31 -29
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Model Registry — shared between frontend and backend.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for available chat/LLM models routed through KIE.ai,
|
|
5
|
+
* with direct Anthropic SDK fallback for Claude models. This is the
|
|
6
|
+
* NON-monetary side of the registry (model ids, capabilities, tiers,
|
|
7
|
+
* feature defaults). The provider-$ per-token rate table and the
|
|
8
|
+
* `calculateLlmCost` formula derived from it live in
|
|
9
|
+
* `backend/src/lib/pricing/llm-cost.ts` (core, not ee/ — internal LLM cost
|
|
10
|
+
* logging needs them regardless of edition). They were moved out of this
|
|
11
|
+
* package (published Apache-2.0 on npm — an irrevocable grant) per the
|
|
12
|
+
* 2026-07-06 public-flip IP audit, S5: "Keep the model-id enum; strip prices
|
|
13
|
+
* + measurement notes."
|
|
14
|
+
*/
|
|
15
|
+
type LlmTier = "economy" | "standard" | "premium";
|
|
16
|
+
type KieApiFormat = "chat-completions" | "messages" | "responses";
|
|
17
|
+
type LlmVendor = "anthropic" | "deepseek" | "google" | "moonshot" | "openai" | "xai";
|
|
18
|
+
declare const LLM_REASONING_EFFORTS: readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
19
|
+
type LlmReasoningEffort = (typeof LLM_REASONING_EFFORTS)[number];
|
|
20
|
+
/** Levels that bill one tier up. `high` is the Claude-family server default — it never bumps. */
|
|
21
|
+
declare const EFFORT_TIER_BUMP: ReadonlySet<LlmReasoningEffort>;
|
|
22
|
+
interface LlmModelDef {
|
|
23
|
+
id: string;
|
|
24
|
+
displayName: string;
|
|
25
|
+
desc: string;
|
|
26
|
+
tier: LlmTier;
|
|
27
|
+
kieFormat: KieApiFormat;
|
|
28
|
+
/** For chat-completions: the slug prefix (e.g. "gemini-3-flash").
|
|
29
|
+
* For messages: the model id sent in the body (e.g. "claude-haiku-4-5-v1messages").
|
|
30
|
+
* For responses: the model id sent in the body (e.g. "gpt-5-4"). */
|
|
31
|
+
kieSlugOrModel: string;
|
|
32
|
+
vendor: LlmVendor;
|
|
33
|
+
supportsImages: boolean;
|
|
34
|
+
maxOutputTokens: number;
|
|
35
|
+
/**
|
|
36
|
+
* How this model can be forced into schema-valid structured output.
|
|
37
|
+
* - "anthropic-tool" → forced tool_choice on the Claude wire (direct SDK
|
|
38
|
+
* guaranteed; KIE's proxy re-serializes the tool call
|
|
39
|
+
* as a `<tool_calls>` text tag — decoded in llm-client).
|
|
40
|
+
* - "kie-response-format" → KIE chat-completions `response_format: json_schema`
|
|
41
|
+
* (verified enforced for Gemini via KIE).
|
|
42
|
+
* - "responses-json-schema" → KIE codex/v1/responses `text.format: json_schema`
|
|
43
|
+
* (live-verified 2026-07-14 for gpt-5.4/5.5 and the
|
|
44
|
+
* whole GPT-5.6 family, text AND vision inputs).
|
|
45
|
+
* - undefined → no native mode; callers fall back to parse + retry.
|
|
46
|
+
* Capability-driven so `llmCompleteStructured` never hardcodes provider ids.
|
|
47
|
+
*/
|
|
48
|
+
structuredOutputMode?: "anthropic-tool" | "kie-response-format" | "responses-json-schema";
|
|
49
|
+
/** If set, fallback to direct Anthropic SDK with this model ID when KIE.ai fails */
|
|
50
|
+
directFallbackModel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Google Gemini API model id for the DIRECT lane (generativelanguage, keyed
|
|
53
|
+
* by `GEMINI_API_KEY`) — the Google-side twin of `directFallbackModel`.
|
|
54
|
+
* Presence declares "this model CAN be served straight from Google"; absence
|
|
55
|
+
* pins it to KIE forever. Stated, never derived: Google carries `-preview`
|
|
56
|
+
* suffixes on unreleased models, so the id routinely differs from both `id`
|
|
57
|
+
* and `kieSlugOrModel` (`gemini-3.1-pro` → `gemini-3.1-pro-preview`).
|
|
58
|
+
*/
|
|
59
|
+
directGeminiModel?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Try the direct-vendor lane FIRST for this model, with KIE as the failure
|
|
62
|
+
* fallback. Absent (while `directGeminiModel` is set) = KIE first, direct
|
|
63
|
+
* only when KIE fails.
|
|
64
|
+
*
|
|
65
|
+
* This is a per-model COST decision, not just a routing one: the two lanes
|
|
66
|
+
* bill the same model at materially different unit rates, so a model that
|
|
67
|
+
* backs a high-volume default (see `LLM_FEATURE_DEFAULTS`) is usually better
|
|
68
|
+
* left on whichever lane is cheaper. The rate tables for both lanes live in
|
|
69
|
+
* `backend/src/lib/pricing/llm-cost.ts` — deliberately not in this package,
|
|
70
|
+
* which is published to npm.
|
|
71
|
+
*
|
|
72
|
+
* Mutually exclusive with `preferKie` — the Claude-side half of the same
|
|
73
|
+
* idea. Guarded by a registry test so the two can't both be set.
|
|
74
|
+
*/
|
|
75
|
+
preferDirect?: true;
|
|
76
|
+
/** Effort levels this model accepts (ascending). Absent/empty = no effort lever, picker hidden. */
|
|
77
|
+
reasoningEfforts?: readonly LlmReasoningEffort[];
|
|
78
|
+
/**
|
|
79
|
+
* Effort levels available on the DIRECT lane, when the vendor's own API
|
|
80
|
+
* accepts more than the aggregator does. Absent = the direct lane offers the
|
|
81
|
+
* same set as `reasoningEfforts`.
|
|
82
|
+
*
|
|
83
|
+
* This exists because `reasoningEfforts` has to stay at the KIE-safe
|
|
84
|
+
* intersection — sending a level KIE rejects is a hard failure — while the
|
|
85
|
+
* vendor API accepts the full ladder. Unlocking those extra levels is one of
|
|
86
|
+
* the concrete things Advanced mode buys.
|
|
87
|
+
*/
|
|
88
|
+
directReasoningEfforts?: readonly LlmReasoningEffort[];
|
|
89
|
+
/** false = model rejects `temperature` (Claude 5-era, GPT-5.6). Absent = accepts. */
|
|
90
|
+
supportsTemperature?: false;
|
|
91
|
+
/**
|
|
92
|
+
* false = the model 400s on a FORCED `tool_choice` (`{ type: "tool" }` /
|
|
93
|
+
* `{ type: "any" }`) — Claude Sonnet 5.5 and Opus 5.5 (vendor docs: "not
|
|
94
|
+
* supported for this model"). Absent = forcing is accepted.
|
|
95
|
+
*
|
|
96
|
+
* Only meaningful with `structuredOutputMode: "anthropic-tool"`: such a model
|
|
97
|
+
* is asked with `tool_choice: auto` plus an instruction naming the tool, and
|
|
98
|
+
* the tool carries `strict: true` whenever its schema is expressible in the
|
|
99
|
+
* vendor's strict subset (`anthropicStrictToolSchema` in llm-client). The
|
|
100
|
+
* caller's Zod still validates every answer, so nothing the wire withholds is
|
|
101
|
+
* lost. Declared per model, never matched on a model name.
|
|
102
|
+
*/
|
|
103
|
+
supportsForcedToolChoice?: false;
|
|
104
|
+
/**
|
|
105
|
+
* true = the model binds each thinking block to the exact conversation prefix
|
|
106
|
+
* that produced it ("preserved thinking" — Claude Sonnet 5.5 / Opus 5.5 /
|
|
107
|
+
* Haiku 5.5):
|
|
108
|
+
* replaying a block after an earlier turn was edited, dropped or rebuilt is a
|
|
109
|
+
* 400 on accounts the vendor enforces. A caller that trims or rebuilds stored
|
|
110
|
+
* history between requests (the Workflow Copilot keeps a token budget by
|
|
111
|
+
* dropping its oldest turns) must strip thinking blocks from the turns it
|
|
112
|
+
* replays. Within one request's own tool loop the history only grows, so
|
|
113
|
+
* blocks produced there stay valid.
|
|
114
|
+
*/
|
|
115
|
+
conversationBoundThinking?: true;
|
|
116
|
+
/**
|
|
117
|
+
* true = this model's reasoning effort takes effect ONLY on the vendor's own
|
|
118
|
+
* API: the aggregator accepts the field and silently ignores it. Measured
|
|
119
|
+
* 2026-10-08 for the Claude family on KIE — `low`, `max` and no effort gave
|
|
120
|
+
* the same output length on a reasoning-heavy prompt, and no thinking block
|
|
121
|
+
* ever came back, even on Sonnet 4.6 at `max`.
|
|
122
|
+
*
|
|
123
|
+
* So an effort-bearing call on such a model is SERVED direct, and it bills
|
|
124
|
+
* as Advanced mode does — one rung up (decided 2026-10-08: "effort =
|
|
125
|
+
* Advanced"). {@link llmServesDirect} is the one place that decides it, for
|
|
126
|
+
* the credit identifier and the routing alike.
|
|
127
|
+
*/
|
|
128
|
+
effortRequiresDirect?: true;
|
|
129
|
+
/** Claude-only: KIE is the preferred routing, direct Anthropic the fallback. */
|
|
130
|
+
preferKie?: true;
|
|
131
|
+
/**
|
|
132
|
+
* KIE's NON-streaming endpoint for this model is unreliable (measured);
|
|
133
|
+
* `llmComplete` serves it by opening the streaming wire and collapsing it to
|
|
134
|
+
* one response. Streaming responses do not reliably carry
|
|
135
|
+
* `credits_consumed`, so provider cost on this path comes from the rate
|
|
136
|
+
* table (`backend/src/lib/pricing/llm-cost.ts`) rather than the real charge.
|
|
137
|
+
*
|
|
138
|
+
* Declared per model — a per-model condition on KIE's side, like the
|
|
139
|
+
* Claude-lane one behind `callKieMessagesCollapsed`. The flag says WHICH
|
|
140
|
+
* model is affected, and `llm-client` reads it instead of matching model
|
|
141
|
+
* names. Today only the `responses` dispatcher in `callKie` honours it (the
|
|
142
|
+
* one format where the condition has been measured); a chat-completions or
|
|
143
|
+
* messages model that needs the same treatment must also teach its `callKie`
|
|
144
|
+
* case to read the flag — declaring it alone changes nothing there.
|
|
145
|
+
*/
|
|
146
|
+
kieCollapseStream?: true;
|
|
147
|
+
/**
|
|
148
|
+
* true = the model reasons even when NO thinking parameter is sent, so its
|
|
149
|
+
* reasoning tokens share the `max_tokens` budget on EVERY call — not just
|
|
150
|
+
* effort-bearing ones. Claude Opus 5 flipped this default (on Opus 4.8/4.7
|
|
151
|
+
* and Sonnet 5, omitting `thinking` means no thinking at all).
|
|
152
|
+
*
|
|
153
|
+
* Consumers MUST give such a model output headroom regardless of the
|
|
154
|
+
* requested effort, or reasoning silently eats a small legacy cap and the
|
|
155
|
+
* answer truncates with `stop_reason: max_tokens` — a paid-for empty reply
|
|
156
|
+
* (since #1588 the client fails such a call rather than return the
|
|
157
|
+
* fragment, but the floor is what keeps it from happening). `deriveParams`
|
|
158
|
+
* (llm-client.ts) floors to {@link reasoningOutputFloor}; the film
|
|
159
|
+
* pipeline's `callLLM` — Anthropic SDK only, so only its Claude members
|
|
160
|
+
* matter — floors at the default. Keep the flag in sync with the vendor's
|
|
161
|
+
* documented default rather than inferring it from the model name.
|
|
162
|
+
*/
|
|
163
|
+
thinkingDefaultOn?: true;
|
|
164
|
+
/**
|
|
165
|
+
* The output-token cap a REASONING call on this model is floored to — the
|
|
166
|
+
* room its thinking shares with the answer (`thinkingDefaultOn`, or an
|
|
167
|
+
* xhigh/max effort). Absent = {@link REASONING_OUTPUT_FLOOR}; read it through
|
|
168
|
+
* {@link reasoningOutputFloor}, never directly.
|
|
169
|
+
*
|
|
170
|
+
* Declare it ONLY where a lane serving this model is not known to accept the
|
|
171
|
+
* default: the floor rides every lane the model can be served on (KIE AND its
|
|
172
|
+
* direct fallback), so it has to sit at the intersection of what they take —
|
|
173
|
+
* the rule `maxOutputTokens` already follows for the Gemini flash entries.
|
|
174
|
+
* Never below `maxOutputTokens` (a floor under the default cap is not a
|
|
175
|
+
* floor — guarded by a registry test).
|
|
176
|
+
*/
|
|
177
|
+
reasoningOutputFloor?: number;
|
|
178
|
+
}
|
|
179
|
+
/** The reasoning floor for a model that declares no lane limit of its own. */
|
|
180
|
+
declare const REASONING_OUTPUT_FLOOR = 32768;
|
|
181
|
+
/** The output cap a reasoning call on `model` is floored to (see `LlmModelDef.reasoningOutputFloor`). */
|
|
182
|
+
declare function reasoningOutputFloor(model: LlmModelDef): number;
|
|
183
|
+
declare const LLM_MODELS: readonly LlmModelDef[];
|
|
184
|
+
declare const LLM_MODEL_IDS: string[];
|
|
185
|
+
/** Vision models that can return GUARANTEED structured output — the
|
|
186
|
+
* describe-to-picker analyzer forces a schema over an image, so its model
|
|
187
|
+
* pickers AND the backend route gate offer exactly these: Anthropic (forced
|
|
188
|
+
* tool), Gemini (KIE `response_format`), and GPT responses-format models
|
|
189
|
+
* (KIE `text.format` json_schema — vision+schema live-verified 2026-07-14).
|
|
190
|
+
* Single source of truth so the picker, the config panel, and the route gate
|
|
191
|
+
* can't drift. */
|
|
192
|
+
declare const STRUCTURED_VISION_MODELS: LlmModelDef[];
|
|
193
|
+
/**
|
|
194
|
+
* Vendor presentation order + labels for model pickers. Every LlmVendor MUST
|
|
195
|
+
* appear in the order list (guarded by a registry test) so a new vendor can't
|
|
196
|
+
* ship with its models silently sorted to the end of every menu unlabeled.
|
|
197
|
+
* Alphabetical on purpose: stable, and no vendor-preference fights.
|
|
198
|
+
*/
|
|
199
|
+
declare const LLM_VENDOR_ORDER: readonly LlmVendor[];
|
|
200
|
+
declare const LLM_VENDOR_LABELS: Record<LlmVendor, string>;
|
|
201
|
+
interface LlmModelGroup {
|
|
202
|
+
vendor: LlmVendor;
|
|
203
|
+
/** Display heading for the group (LLM_VENDOR_LABELS[vendor]). */
|
|
204
|
+
label: string;
|
|
205
|
+
models: LlmModelDef[];
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The ONE ordering every LLM model menu renders: grouped by vendor (in
|
|
209
|
+
* LLM_VENDOR_ORDER), and inside each group sorted economy → standard → premium
|
|
210
|
+
* (registry order breaks ties, which keeps family generations adjacent).
|
|
211
|
+
* A flat registry-order dump was genuinely hard to scan at 17 models — every
|
|
212
|
+
* picker (config panel, quick strips, quick toolbar) derives from this so the
|
|
213
|
+
* menus can't drift apart. Groups with no models (after `filter`) are omitted.
|
|
214
|
+
*/
|
|
215
|
+
declare function groupLlmModelsByVendor(models?: readonly LlmModelDef[]): LlmModelGroup[];
|
|
216
|
+
/** {@link groupLlmModelsByVendor} flattened — for menus that can't render
|
|
217
|
+
* group headers (e.g. the compact node quick strips) but should still read
|
|
218
|
+
* vendor-clustered and tier-ordered. */
|
|
219
|
+
declare function orderedLlmModels(models?: readonly LlmModelDef[]): LlmModelDef[];
|
|
220
|
+
type LlmFeature = "ai-writer" | "llm-chat" | "prompt-helper" | "scene-graph-ai" | "after-effects" | "motion-graphics" | "motion-graphics-lottie" | "lottie-overlay" | "3d-title" | "3d-scene" | "image-to-text" | "meta-ads-analysis" | "describe-to-picker" | "qa-check" | "generate-script" | "translate" | "image-critic" | "pick-best-llm" | "workflow-copilot" | "content-recipe" | "content-ideas";
|
|
221
|
+
/** Engine-dependent LlmFeature for the motion-graphics node (design §8: every credit-id site must branch on engine). */
|
|
222
|
+
declare function motionGraphicsFeature(engine?: string): LlmFeature;
|
|
223
|
+
/** Feature → default model when user hasn't selected one */
|
|
224
|
+
declare const LLM_FEATURE_DEFAULTS: Record<LlmFeature, string>;
|
|
225
|
+
/**
|
|
226
|
+
* Feature → the reasoning effort its DEFAULT model runs at when the caller
|
|
227
|
+
* sends none. Read it through {@link defaultReasoningEffort}, never directly:
|
|
228
|
+
* the effort belongs to the default model, so a call on any other model must
|
|
229
|
+
* not pick it up.
|
|
230
|
+
*/
|
|
231
|
+
declare const LLM_FEATURE_DEFAULT_EFFORTS: Partial<Record<LlmFeature, LlmReasoningEffort>>;
|
|
232
|
+
/**
|
|
233
|
+
* The reasoning effort a `feature` call runs at when the caller sends none:
|
|
234
|
+
* the feature's default effort ({@link LLM_FEATURE_DEFAULT_EFFORTS}), but ONLY
|
|
235
|
+
* while the call runs on the feature's default model — named, or omitted
|
|
236
|
+
* (`undefined` / `""`) so the default model applies. A caller who picked
|
|
237
|
+
* another model and no effort gets `undefined`: that model's Auto, as before.
|
|
238
|
+
*
|
|
239
|
+
* WHY only on the default model: the default effort is part of the default
|
|
240
|
+
* model's recipe, not a global policy. Forcing `high` on a Gemini or GPT call
|
|
241
|
+
* that never asked for it would change the timing of every existing workflow
|
|
242
|
+
* that picked one (and, on a Claude model, its lane and its bill).
|
|
243
|
+
*
|
|
244
|
+
* The one place the route, the node's credit badge and its effort pickers
|
|
245
|
+
* read, so what runs, what is billed and what is shown cannot disagree.
|
|
246
|
+
*/
|
|
247
|
+
declare function defaultReasoningEffort(feature: string, modelId?: string): LlmReasoningEffort | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* Per-model multimodal input capabilities. Drives both frontend UI gating
|
|
250
|
+
* and backend route-level filtering for the LLM Chat node references.
|
|
251
|
+
*
|
|
252
|
+
* As of 2026-05: Claude Messages API supports text + image only (no audio,
|
|
253
|
+
* no video). Gemini 2/3 family supports image + video + audio natively.
|
|
254
|
+
* GPT-5.x via KIE chat-completions / responses supports image only — audio
|
|
255
|
+
* input requires a separate audio-capable model we don't route to today.
|
|
256
|
+
*/
|
|
257
|
+
declare const LLM_MODALITY_CAPS: Record<string, {
|
|
258
|
+
image: boolean;
|
|
259
|
+
video: boolean;
|
|
260
|
+
audio: boolean;
|
|
261
|
+
}>;
|
|
262
|
+
/** Capability lookup with safe default — unknown models get image-only. */
|
|
263
|
+
declare function getLlmModalityCaps(modelId: string | undefined): {
|
|
264
|
+
image: boolean;
|
|
265
|
+
video: boolean;
|
|
266
|
+
audio: boolean;
|
|
267
|
+
};
|
|
268
|
+
declare function getLlmModel(id: string): LlmModelDef | undefined;
|
|
269
|
+
declare function getLlmTier(id: string): LlmTier;
|
|
270
|
+
/**
|
|
271
|
+
* Effort levels this model actually accepts on the lane it will be served on.
|
|
272
|
+
*
|
|
273
|
+
* The two lanes do NOT offer the same ladder: the aggregator accepts a narrower
|
|
274
|
+
* set than the vendor's own API does, which is one of the concrete things
|
|
275
|
+
* Advanced mode buys. Kept as one lookup so the UI picker and the wire-side
|
|
276
|
+
* clamp can never disagree about what's selectable.
|
|
277
|
+
*/
|
|
278
|
+
declare function availableReasoningEfforts(modelId: string | undefined, advanced?: boolean): readonly LlmReasoningEffort[];
|
|
279
|
+
/** Highest level the model supports that is ≤ the requested level; undefined = treat as Auto. */
|
|
280
|
+
declare function effectiveReasoningEffort(modelId: string | undefined, requested?: string, advanced?: boolean): LlmReasoningEffort | undefined;
|
|
281
|
+
/**
|
|
282
|
+
* Build a composite credit identifier for an LLM feature.
|
|
283
|
+
* - economy tier → "ai-writer:economy"
|
|
284
|
+
* - standard tier → "ai-writer" (no suffix — backward compatible)
|
|
285
|
+
* - premium tier → "ai-writer:premium"
|
|
286
|
+
* A reasoning effort of "xhigh" or "max" (after clamping to what the model
|
|
287
|
+
* actually supports) bills one tier up (economy→standard, standard→premium;
|
|
288
|
+
* premium stays premium). `high` is the Claude-family server default and
|
|
289
|
+
* never bumps.
|
|
290
|
+
*/
|
|
291
|
+
/**
|
|
292
|
+
* The sampling defaults each LLM feature's route sends when Advanced mode is
|
|
293
|
+
* OFF — and therefore the values its Advanced panel must seed the sliders with.
|
|
294
|
+
*
|
|
295
|
+
* SINGLE SOURCE because the two used to disagree: the routes hardcoded their
|
|
296
|
+
* own literals while the toggle fell back to 0.7/2048, so the panel displayed
|
|
297
|
+
* a temperature the run never used, and one arrow-key press on 3D Title's Max
|
|
298
|
+
* Tokens silently cut its budget from 3072 to 2048 on a node that emits
|
|
299
|
+
* structured JSON.
|
|
300
|
+
*
|
|
301
|
+
* `structuredOutput` marks the features whose prompt asks the model for JSON —
|
|
302
|
+
* a high temperature measurably degrades schema adherence there, so the panel
|
|
303
|
+
* warns. Absent `temperature` means the route sends none (vendor default).
|
|
304
|
+
*/
|
|
305
|
+
interface LlmRouteDefaults {
|
|
306
|
+
temperature?: number;
|
|
307
|
+
maxTokens?: number;
|
|
308
|
+
structuredOutput?: true;
|
|
309
|
+
}
|
|
310
|
+
declare const LLM_ROUTE_DEFAULTS: Record<string, LlmRouteDefaults>;
|
|
311
|
+
/** Route defaults for a feature; `{}` for an unknown one. */
|
|
312
|
+
declare function llmRouteDefaults(feature: string | undefined): LlmRouteDefaults;
|
|
313
|
+
/**
|
|
314
|
+
* Can this model be run in Advanced mode?
|
|
315
|
+
*
|
|
316
|
+
* Advanced mode pins the call to the vendor's own API, which is the only lane
|
|
317
|
+
* where sampling levers (`temperature`, `maxTokens`) and the full effort range
|
|
318
|
+
* actually take effect. Capability-derived from the registry — a model without
|
|
319
|
+
* a direct lane simply cannot offer it, so UI and routes both gate on this
|
|
320
|
+
* rather than on a hand-maintained model list.
|
|
321
|
+
*/
|
|
322
|
+
declare function supportsAdvancedMode(modelId: string | undefined): boolean;
|
|
323
|
+
/** User-facing reason a model can't offer Advanced mode. Single-sourced so the
|
|
324
|
+
* config panel's disabled hint and the route's 400 say the same thing. */
|
|
325
|
+
declare const ADVANCED_MODE_UNAVAILABLE_REASON = "Advanced mode is available on Gemini and Claude models \u2014 switch the model to enable it.";
|
|
326
|
+
/**
|
|
327
|
+
* Is this call served on the vendor's own API — and therefore billed as such?
|
|
328
|
+
*
|
|
329
|
+
* The rule (decided 2026-10-08): a call is priced on the lane it runs on.
|
|
330
|
+
* It runs direct when Advanced mode is on, or when it carries a reasoning
|
|
331
|
+
* effort on a model whose effort only works there (`effortRequiresDirect` —
|
|
332
|
+
* the Claude family). Everything else runs on the aggregator at its price,
|
|
333
|
+
* falling back to the vendor's API only if the aggregator fails (at no extra
|
|
334
|
+
* charge).
|
|
335
|
+
*
|
|
336
|
+
* The SINGLE decision both the credit identifier and the LLM client's routing
|
|
337
|
+
* read, so what is billed and where it runs cannot disagree. Ignores a stale
|
|
338
|
+
* `advancedMode` on a model with no direct lane, like the bump always has.
|
|
339
|
+
*/
|
|
340
|
+
declare function llmServesDirect(modelId: string | undefined, reasoningEffort?: string, advancedMode?: boolean): boolean;
|
|
341
|
+
/**
|
|
342
|
+
* The credit rungs an LLM feature bills on, cheapest first. `premium-direct` is
|
|
343
|
+
* reached only by a premium model served direct (decided 2026-10-08): the bump
|
|
344
|
+
* for running direct moves one rung on THIS ladder, so a premium model has
|
|
345
|
+
* somewhere to go. The effort bump keeps the three-rung ladder.
|
|
346
|
+
*/
|
|
347
|
+
declare const LLM_CREDIT_RUNGS: readonly ["economy", "standard", "premium", "premium-direct"];
|
|
348
|
+
type LlmCreditRung = (typeof LLM_CREDIT_RUNGS)[number];
|
|
349
|
+
/** The credit identifier for `feature` on one rung — the standard rung is the bare feature id. */
|
|
350
|
+
declare function llmCreditIdForRung(feature: string, rung: LlmCreditRung): string;
|
|
351
|
+
/** Every credit identifier a tier-priced LLM feature can bill under, in rung order. */
|
|
352
|
+
declare function llmTierCreditIds(feature: string): string[];
|
|
353
|
+
declare function buildLlmCreditIdentifier(feature: string, modelId?: string, reasoningEffort?: string, advancedMode?: boolean): string;
|
|
354
|
+
/**
|
|
355
|
+
* Resolve llmModel (+ reasoningEffort, advancedMode) from raw body for the
|
|
356
|
+
* creditGuard preHandler (before Zod parsing). Returns the credit identifier
|
|
357
|
+
* for the given feature.
|
|
358
|
+
*/
|
|
359
|
+
declare function resolveLlmCreditId(feature: string, body: unknown): string;
|
|
360
|
+
/** Models capable of video-analysis: capability-derived, never hand-listed (route-enum-sync convention). */
|
|
361
|
+
declare const VIDEO_ANALYSIS_LLM_MODELS: string[];
|
|
362
|
+
/**
|
|
363
|
+
* Video-analysis quality TIERS — the ONLY analyzer identifiers exposed to users
|
|
364
|
+
* (API, UI, docs). Each maps to an internal analysis model; the underlying
|
|
365
|
+
* vendor/model name is never surfaced. Default is `pro`. The guard test
|
|
366
|
+
* (video-analysis-pricing.test.ts) asserts every tier target is a real
|
|
367
|
+
* VIDEO_ANALYSIS_LLM_MODELS member AND every such model is reachable by a tier,
|
|
368
|
+
* so adding a video model forces a tier decision instead of silently leaking.
|
|
369
|
+
*/
|
|
370
|
+
declare const VIDEO_ANALYSIS_TIERS: {
|
|
371
|
+
readonly fast: "gemini-3-flash";
|
|
372
|
+
readonly pro: "gemini-3.1-pro";
|
|
373
|
+
};
|
|
374
|
+
type VideoAnalysisModelTier = keyof typeof VIDEO_ANALYSIS_TIERS;
|
|
375
|
+
/**
|
|
376
|
+
* Models that PREVIOUSLY backed a tier, mapped to the tier they backed.
|
|
377
|
+
* They stay video+audio-capable (so they remain in VIDEO_ANALYSIS_LLM_MODELS):
|
|
378
|
+
* stored raw `llmModel` values keep resolving via the passthrough in
|
|
379
|
+
* `resolveVideoAnalysisModel` and keep pricing under their own credit family —
|
|
380
|
+
* but no tier reaches them for NEW runs. UIs use this map to reverse a stored
|
|
381
|
+
* raw id to the tier the user originally chose (video-configs fail-safe).
|
|
382
|
+
* The tier guard test requires every video-capable model to be a tier target
|
|
383
|
+
* OR a key here, so replacing a tier's backing model stays an explicit,
|
|
384
|
+
* two-sided decision.
|
|
385
|
+
*/
|
|
386
|
+
declare const VIDEO_ANALYSIS_LEGACY_MODELS: Record<string, VideoAnalysisModelTier>;
|
|
387
|
+
/**
|
|
388
|
+
* MIXED tiers — advanced multi-engine analysis plans whose identifier resolves
|
|
389
|
+
* to an engine-plan SENTINEL consumed by the analysis engine, never to a single
|
|
390
|
+
* model id. Two variants, same price (one shared `video-analysis:mixed:*`
|
|
391
|
+
* credit family): `mixed` targets maximum result quality; `mixed-fast` targets
|
|
392
|
+
* run-to-run output consistency. What each plan does internally is deliberately
|
|
393
|
+
* NOT published here (Apache irrevocability; only the wire vocabulary below is
|
|
394
|
+
* contract — the engine lives in the private analysis plugin).
|
|
395
|
+
*/
|
|
396
|
+
declare const VIDEO_ANALYSIS_MIXED_TIERS: readonly ["mixed", "mixed-fast", "smart"];
|
|
397
|
+
type VideoAnalysisMixedTier = (typeof VIDEO_ANALYSIS_MIXED_TIERS)[number];
|
|
398
|
+
/**
|
|
399
|
+
* `smart` is an ENGINE-PLAN sentinel like the mixed tiers — it names a plan, not a
|
|
400
|
+
* model — but it is a different SHAPE of plan, and the distinction is the whole
|
|
401
|
+
* reason it exists as a separate tier rather than a repricing of the others.
|
|
402
|
+
*
|
|
403
|
+
* The economy tiers (`fast`, `pro`, `mixed`, `mixed-fast`) run several passes on
|
|
404
|
+
* the cheaper proxied transport and vote. That transport is cheaper per token and
|
|
405
|
+
* additionally does no deep reasoning, which is why they cost less — and also why
|
|
406
|
+
* they are less accurate. `smart` is a HYBRID plan (2026-08-03 re-plan): one
|
|
407
|
+
* native-transport skeleton pass with everything turned up, blended with several
|
|
408
|
+
* economy-transport donor rolls, and the merged result is always refined —
|
|
409
|
+
* `selectionMode` (the `choose`/`combine` toggle the other tiers expose) does not
|
|
410
|
+
* apply to `smart`; it always applies the equivalent of `combine`.
|
|
411
|
+
*
|
|
412
|
+
* As with the mixed sentinels, what the plan does internally is deliberately not
|
|
413
|
+
* published here; only the wire vocabulary is contract.
|
|
414
|
+
*/
|
|
415
|
+
/** UI/listing order — recommended (smart) first. */
|
|
416
|
+
declare const VIDEO_ANALYSIS_TIER_ORDER: readonly ["smart", "pro", "fast", "mixed", "mixed-fast"];
|
|
417
|
+
type VideoAnalysisTier = (typeof VIDEO_ANALYSIS_TIER_ORDER)[number];
|
|
418
|
+
declare const DEFAULT_VIDEO_ANALYSIS_TIER: VideoAnalysisTier;
|
|
419
|
+
declare const DEFAULT_VIDEO_ANALYSIS_MODEL: string;
|
|
420
|
+
/** Neutral, vendor-free display labels for the UI. */
|
|
421
|
+
declare const VIDEO_ANALYSIS_TIER_LABELS: Record<VideoAnalysisTier, string>;
|
|
422
|
+
declare function isVideoAnalysisTier(v: string): v is VideoAnalysisTier;
|
|
423
|
+
declare function isVideoAnalysisMixedTier(v: string): v is VideoAnalysisMixedTier;
|
|
424
|
+
/**
|
|
425
|
+
* Resolve a user-supplied tier OR a raw internal model id to the analysis
|
|
426
|
+
* ENGINE IDENTIFIER carried in the worker payload:
|
|
427
|
+
* - model-backed tiers ("fast"/"pro") → the internal model id;
|
|
428
|
+
* - mixed tiers ("mixed"/"mixed-fast") → the sentinel ITSELF (the engine
|
|
429
|
+
* expands it to a multi-model roll plan);
|
|
430
|
+
* - raw model ids pass through (back-compat for stored `llmModel` values);
|
|
431
|
+
* - empty/unknown → the default tier's model (never an error).
|
|
432
|
+
*/
|
|
433
|
+
declare function resolveVideoAnalysisModel(input?: string | null): string;
|
|
434
|
+
|
|
435
|
+
export { ADVANCED_MODE_UNAVAILABLE_REASON, DEFAULT_VIDEO_ANALYSIS_MODEL, DEFAULT_VIDEO_ANALYSIS_TIER, EFFORT_TIER_BUMP, type KieApiFormat, LLM_CREDIT_RUNGS, LLM_FEATURE_DEFAULTS, LLM_FEATURE_DEFAULT_EFFORTS, LLM_MODALITY_CAPS, LLM_MODELS, LLM_MODEL_IDS, LLM_REASONING_EFFORTS, LLM_ROUTE_DEFAULTS, LLM_VENDOR_LABELS, LLM_VENDOR_ORDER, type LlmCreditRung, type LlmFeature, type LlmModelDef, type LlmModelGroup, type LlmReasoningEffort, type LlmRouteDefaults, type LlmTier, type LlmVendor, REASONING_OUTPUT_FLOOR, STRUCTURED_VISION_MODELS, VIDEO_ANALYSIS_LEGACY_MODELS, VIDEO_ANALYSIS_LLM_MODELS, VIDEO_ANALYSIS_MIXED_TIERS, VIDEO_ANALYSIS_TIERS, VIDEO_ANALYSIS_TIER_LABELS, VIDEO_ANALYSIS_TIER_ORDER, type VideoAnalysisMixedTier, type VideoAnalysisModelTier, type VideoAnalysisTier, availableReasoningEfforts, buildLlmCreditIdentifier, defaultReasoningEffort, effectiveReasoningEffort, getLlmModalityCaps, getLlmModel, getLlmTier, groupLlmModelsByVendor, isVideoAnalysisMixedTier, isVideoAnalysisTier, llmCreditIdForRung, llmRouteDefaults, llmServesDirect, llmTierCreditIds, motionGraphicsFeature, orderedLlmModels, reasoningOutputFloor, resolveLlmCreditId, resolveVideoAnalysisModel, supportsAdvancedMode };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../chunk-TZE673G6.js';
|
|
2
|
+
export { ADVANCED_MODE_UNAVAILABLE_REASON, DEFAULT_VIDEO_ANALYSIS_MODEL, DEFAULT_VIDEO_ANALYSIS_TIER, EFFORT_TIER_BUMP, LLM_CREDIT_RUNGS, LLM_FEATURE_DEFAULTS, LLM_FEATURE_DEFAULT_EFFORTS, LLM_MODALITY_CAPS, LLM_MODELS, LLM_MODEL_IDS, LLM_REASONING_EFFORTS, LLM_ROUTE_DEFAULTS, LLM_VENDOR_LABELS, LLM_VENDOR_ORDER, REASONING_OUTPUT_FLOOR, STRUCTURED_VISION_MODELS, VIDEO_ANALYSIS_LEGACY_MODELS, VIDEO_ANALYSIS_LLM_MODELS, VIDEO_ANALYSIS_MIXED_TIERS, VIDEO_ANALYSIS_TIERS, VIDEO_ANALYSIS_TIER_LABELS, VIDEO_ANALYSIS_TIER_ORDER, availableReasoningEfforts, buildLlmCreditIdentifier, defaultReasoningEffort, effectiveReasoningEffort, getLlmModalityCaps, getLlmModel, getLlmTier, groupLlmModelsByVendor, isVideoAnalysisMixedTier, isVideoAnalysisTier, llmCreditIdForRung, llmRouteDefaults, llmServesDirect, llmTierCreditIds, motionGraphicsFeature, orderedLlmModels, reasoningOutputFloor, resolveLlmCreditId, resolveVideoAnalysisModel, supportsAdvancedMode } from '../chunk-YBPBK5KI.js';
|
|
3
|
+
//# sourceMappingURL=llm-models.js.map
|
|
4
|
+
//# sourceMappingURL=llm-models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"llm-models.js"}
|