@nodaro/shared 3.63.0 → 3.65.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-3K24DWOH.js → chunk-222QM7CO.js} +3 -3
- package/dist/{chunk-3K24DWOH.js.map → chunk-222QM7CO.js.map} +1 -1
- package/dist/chunk-27HA6YOL.cjs +377 -0
- package/dist/chunk-27HA6YOL.cjs.map +1 -0
- package/dist/{chunk-4DVWXEB6.js → chunk-2NKF476Z.js} +3 -3
- package/dist/{chunk-4DVWXEB6.js.map → chunk-2NKF476Z.js.map} +1 -1
- package/dist/chunk-3AU52TSW.js +143 -0
- package/dist/chunk-3AU52TSW.js.map +1 -0
- package/dist/{chunk-F6WGGYQW.cjs → chunk-5NVGKXJV.cjs} +68 -29
- package/dist/chunk-5NVGKXJV.cjs.map +1 -0
- package/dist/{chunk-HWQ2SYNA.js → chunk-5SSMPYE5.js} +99 -9
- package/dist/chunk-5SSMPYE5.js.map +1 -0
- package/dist/{chunk-WRSWH7US.cjs → chunk-6BRWPJPP.cjs} +17 -2
- package/dist/chunk-6BRWPJPP.cjs.map +1 -0
- package/dist/{chunk-KHH54GRP.cjs → chunk-6ET3KDO4.cjs} +15 -338
- package/dist/chunk-6ET3KDO4.cjs.map +1 -0
- package/dist/{chunk-TM5JYSJF.cjs → chunk-6OSIOVF7.cjs} +98 -37
- package/dist/chunk-6OSIOVF7.cjs.map +1 -0
- package/dist/{chunk-YUER7TJG.js → chunk-6X5PBAC4.js} +13 -4
- package/dist/chunk-6X5PBAC4.js.map +1 -0
- package/dist/chunk-7BN4EDIC.cjs +185 -0
- package/dist/chunk-7BN4EDIC.cjs.map +1 -0
- package/dist/{chunk-6M563QE6.js → chunk-7OWXHW7Z.js} +78 -28
- package/dist/chunk-7OWXHW7Z.js.map +1 -0
- package/dist/{chunk-FXGNRYQQ.js → chunk-AT53ZQUC.js} +3 -3
- package/dist/{chunk-FXGNRYQQ.js.map → chunk-AT53ZQUC.js.map} +1 -1
- package/dist/{chunk-HSHCCBIV.js → chunk-BQYCZLMF.js} +16 -3
- package/dist/chunk-BQYCZLMF.js.map +1 -0
- package/dist/{chunk-34QLPTSA.js → chunk-BSTAAGLY.js} +3 -3
- package/dist/{chunk-34QLPTSA.js.map → chunk-BSTAAGLY.js.map} +1 -1
- package/dist/{chunk-PSKZKLDG.js → chunk-CW6MMQNO.js} +562 -26
- package/dist/chunk-CW6MMQNO.js.map +1 -0
- package/dist/{chunk-EPXGG27L.js → chunk-D5Y3EYRM.js} +5 -5
- package/dist/{chunk-EPXGG27L.js.map → chunk-D5Y3EYRM.js.map} +1 -1
- package/dist/{chunk-XGVJGNZW.cjs → chunk-DQ2PARNH.cjs} +15 -5
- package/dist/chunk-DQ2PARNH.cjs.map +1 -0
- package/dist/{chunk-6BZC2ZHC.cjs → chunk-E66HSC2E.cjs} +9 -9
- package/dist/{chunk-6BZC2ZHC.cjs.map → chunk-E66HSC2E.cjs.map} +1 -1
- package/dist/{chunk-NIAFR5EE.js → chunk-FGBGKBML.js} +32 -3
- package/dist/chunk-FGBGKBML.js.map +1 -0
- package/dist/{chunk-M5OCFGHF.cjs → chunk-FI3HJZWM.cjs} +588 -25
- package/dist/chunk-FI3HJZWM.cjs.map +1 -0
- package/dist/{chunk-L2TVY6XN.cjs → chunk-FJZTQTF4.cjs} +4 -4
- package/dist/{chunk-L2TVY6XN.cjs.map → chunk-FJZTQTF4.cjs.map} +1 -1
- package/dist/{chunk-XGGZWA4A.cjs → chunk-GJ3D5X4X.cjs} +52 -49
- package/dist/chunk-GJ3D5X4X.cjs.map +1 -0
- package/dist/{chunk-Q6IES3U2.js → chunk-H5KHWTAE.js} +5 -2
- package/dist/chunk-H5KHWTAE.js.map +1 -0
- package/dist/{chunk-MD4XHED4.js → chunk-H745DQ6V.js} +3 -3
- package/dist/{chunk-MD4XHED4.js.map → chunk-H745DQ6V.js.map} +1 -1
- package/dist/{chunk-KCZHQH2O.js → chunk-HAH2F7LT.js} +4 -4
- package/dist/{chunk-KCZHQH2O.js.map → chunk-HAH2F7LT.js.map} +1 -1
- package/dist/{chunk-V5EEQR2U.cjs → chunk-JQMFJAYU.cjs} +21 -21
- package/dist/{chunk-V5EEQR2U.cjs.map → chunk-JQMFJAYU.cjs.map} +1 -1
- package/dist/{chunk-WZVIBAKN.cjs → chunk-JYU5EIRM.cjs} +12 -12
- package/dist/{chunk-WZVIBAKN.cjs.map → chunk-JYU5EIRM.cjs.map} +1 -1
- package/dist/{chunk-Y35JQPT6.cjs → chunk-K6RIN3LW.cjs} +142 -45
- package/dist/chunk-K6RIN3LW.cjs.map +1 -0
- package/dist/{chunk-BLJUCPMV.cjs → chunk-KSHAAPQF.cjs} +5 -2
- package/dist/chunk-KSHAAPQF.cjs.map +1 -0
- package/dist/{chunk-2PU3AGGS.cjs → chunk-KTCEKGBJ.cjs} +7 -7
- package/dist/{chunk-2PU3AGGS.cjs.map → chunk-KTCEKGBJ.cjs.map} +1 -1
- package/dist/{chunk-LH72PQO2.cjs → chunk-KWYS4IIM.cjs} +165 -50
- package/dist/chunk-KWYS4IIM.cjs.map +1 -0
- package/dist/{chunk-GSKLPI3J.cjs → chunk-MIT2USTS.cjs} +118 -61
- package/dist/chunk-MIT2USTS.cjs.map +1 -0
- package/dist/{chunk-Y4GCJJPF.cjs → chunk-NYZQOIXJ.cjs} +35 -2
- package/dist/chunk-NYZQOIXJ.cjs.map +1 -0
- package/dist/{chunk-A2PX5IRC.cjs → chunk-PERUFUVH.cjs} +13 -13
- package/dist/{chunk-A2PX5IRC.cjs.map → chunk-PERUFUVH.cjs.map} +1 -1
- package/dist/{chunk-X5BAFW3Q.cjs → chunk-PGDR7CO3.cjs} +8 -8
- package/dist/{chunk-X5BAFW3Q.cjs.map → chunk-PGDR7CO3.cjs.map} +1 -1
- package/dist/{chunk-OV3JTKBY.js → chunk-PL7AQQV7.js} +123 -22
- package/dist/chunk-PL7AQQV7.js.map +1 -0
- package/dist/chunk-Q4YOLT4M.js +164 -0
- package/dist/chunk-Q4YOLT4M.js.map +1 -0
- package/dist/{chunk-GMBDLNLD.cjs → chunk-R5ILCNCC.cjs} +197 -60
- package/dist/chunk-R5ILCNCC.cjs.map +1 -0
- package/dist/chunk-RP4KQUNU.cjs +168 -0
- package/dist/chunk-RP4KQUNU.cjs.map +1 -0
- package/dist/{chunk-77WU3V3J.cjs → chunk-SPU7MUWE.cjs} +6 -6
- package/dist/{chunk-77WU3V3J.cjs.map → chunk-SPU7MUWE.cjs.map} +1 -1
- package/dist/{chunk-XBTYGQ6Z.js → chunk-ST7OBB5J.js} +8 -5
- package/dist/chunk-ST7OBB5J.js.map +1 -0
- package/dist/{chunk-2QKF7M2Z.js → chunk-TAPBDT47.js} +3 -3
- package/dist/{chunk-2QKF7M2Z.js.map → chunk-TAPBDT47.js.map} +1 -1
- package/dist/{chunk-BMJVKYVB.js → chunk-V5NLQ4L5.js} +123 -7
- package/dist/chunk-V5NLQ4L5.js.map +1 -0
- package/dist/{chunk-KMGCHV6O.js → chunk-V6OXSXIX.js} +63 -30
- package/dist/chunk-V6OXSXIX.js.map +1 -0
- package/dist/{chunk-LMAQUR55.cjs → chunk-WQMPIURW.cjs} +6 -6
- package/dist/{chunk-LMAQUR55.cjs.map → chunk-WQMPIURW.cjs.map} +1 -1
- package/dist/{chunk-ZPE2ZTJ4.cjs → chunk-WZG6GZIL.cjs} +4 -4
- package/dist/{chunk-ZPE2ZTJ4.cjs.map → chunk-WZG6GZIL.cjs.map} +1 -1
- package/dist/{chunk-AE3AAJ4O.js → chunk-XJANKTIL.js} +3 -3
- package/dist/{chunk-AE3AAJ4O.js.map → chunk-XJANKTIL.js.map} +1 -1
- package/dist/{chunk-O7RZRUMZ.js → chunk-XJWED257.js} +14 -309
- package/dist/chunk-XJWED257.js.map +1 -0
- package/dist/chunk-XSSLNINL.js +346 -0
- package/dist/chunk-XSSLNINL.js.map +1 -0
- package/dist/{chunk-6TGB7ECA.cjs → chunk-YD4XY74W.cjs} +12 -8
- package/dist/chunk-YD4XY74W.cjs.map +1 -0
- package/dist/{chunk-YX6TFX7H.js → chunk-YMZUE2IX.js} +66 -11
- package/dist/chunk-YMZUE2IX.js.map +1 -0
- package/dist/{chunk-4MMZD63H.js → chunk-Z77M7Q2R.js} +3 -3
- package/dist/{chunk-4MMZD63H.js.map → chunk-Z77M7Q2R.js.map} +1 -1
- package/dist/{chunk-CZ5IQB3L.js → chunk-ZSRXY5YT.js} +8 -5
- package/dist/chunk-ZSRXY5YT.js.map +1 -0
- package/dist/entries/apps.cjs +43 -42
- package/dist/entries/apps.js +8 -7
- package/dist/entries/captions.cjs +38 -30
- package/dist/entries/captions.d.cts +48 -2
- package/dist/entries/captions.d.ts +48 -2
- package/dist/entries/captions.js +1 -1
- package/dist/entries/credits.cjs +319 -191
- package/dist/entries/credits.d.cts +260 -19
- package/dist/entries/credits.d.ts +260 -19
- package/dist/entries/credits.js +11 -11
- package/dist/entries/entities.cjs +202 -193
- package/dist/entries/entities.d.cts +44 -9
- package/dist/entries/entities.d.ts +44 -9
- package/dist/entries/entities.js +2 -1
- package/dist/entries/llm-models.cjs +86 -62
- package/dist/entries/llm-models.d.cts +73 -20
- package/dist/entries/llm-models.d.ts +73 -20
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/media.cjs +79 -63
- package/dist/entries/media.d.cts +154 -1
- package/dist/entries/media.d.ts +154 -1
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +205 -109
- package/dist/entries/model-catalog.d.cts +65 -58
- package/dist/entries/model-catalog.d.ts +65 -58
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +527 -346
- package/dist/entries/models.d.cts +86 -7
- package/dist/entries/models.d.ts +86 -7
- package/dist/entries/models.js +6 -5
- package/dist/entries/nodes.cjs +220 -211
- package/dist/entries/nodes.d.cts +46 -3
- package/dist/entries/nodes.d.ts +46 -3
- package/dist/entries/nodes.js +10 -9
- package/dist/entries/pipeline.cjs +156 -152
- package/dist/entries/pipeline.d.cts +14 -4
- package/dist/entries/pipeline.d.ts +14 -4
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +177 -177
- package/dist/entries/social.js +2 -2
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +174 -145
- package/dist/entries/video.d.cts +114 -2
- package/dist/entries/video.d.ts +114 -2
- package/dist/entries/video.js +7 -6
- package/dist/entries/workflow.cjs +150 -150
- package/dist/entries/workflow.d.cts +1 -1
- package/dist/entries/workflow.d.ts +1 -1
- package/dist/entries/workflow.js +2 -2
- package/dist/index.cjs +2430 -1929
- package/dist/index.d.cts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +28 -27
- package/dist/{model-catalog-C_Eo35tL.d.cts → model-catalog-BoUKGFNl.d.cts} +182 -3
- package/dist/{model-catalog-C_Eo35tL.d.ts → model-catalog-BoUKGFNl.d.ts} +182 -3
- package/dist/{model-constants-DWcxOmaY.d.cts → model-constants-BElS3AeE.d.ts} +142 -23
- package/dist/{model-constants-Bg4ccSQb.d.ts → model-constants-CpQz1bGa.d.cts} +142 -23
- package/dist/tts-capabilities-BtnDWK9K.d.ts +133 -0
- package/dist/tts-capabilities-C52UccTI.d.cts +133 -0
- package/package.json +1 -1
- package/src/__tests__/add-captions-nemotron-pricing.test.ts +111 -0
- package/src/__tests__/dialogue-capabilities.test.ts +167 -6
- package/src/__tests__/extend-providers.test.ts +353 -26
- package/src/__tests__/fixtures/mask-composite-quote-parity.json +1 -1
- package/src/__tests__/fixtures/measured-input-quote-parity.json +1435 -0
- package/src/__tests__/fixtures/planned-length-quote-parity.json +1866 -0
- package/src/__tests__/fixtures/video-utility-quote-parity.json +2343 -0
- package/src/__tests__/flux-3-klein.test.ts +203 -0
- package/src/__tests__/gpt-image-2-6-formats.test.ts +3 -1
- package/src/__tests__/kling4-catalog.test.ts +1 -1
- package/src/__tests__/llm-models.test.ts +48 -13
- package/src/__tests__/llm-price-key.test.ts +12 -0
- package/src/__tests__/model-makers.test.ts +3 -0
- package/src/__tests__/node-runtime-keys.test.ts +7 -0
- package/src/__tests__/normalize-node-params.test.ts +147 -1
- package/src/__tests__/retired-lip-sync-providers.test.ts +43 -0
- package/src/__tests__/seedance-extend-source-credit-id.test.ts +89 -0
- package/src/__tests__/sequence-execution.test.ts +22 -1
- package/src/__tests__/speech-pricing.test.ts +62 -1
- package/src/__tests__/suno-credit-type.test.ts +21 -2
- package/src/__tests__/transcribe-capabilities.test.ts +4 -2
- package/src/__tests__/tts-capabilities.test.ts +160 -4
- package/src/__tests__/video-analysis-catalog-sync.test.ts +4 -2
- package/src/__tests__/video-analysis-pricing.test.ts +22 -9
- package/src/__tests__/video-subjects.test.ts +192 -0
- package/src/__tests__/wired-character-names.test.ts +142 -0
- package/src/caption-styles.ts +62 -0
- package/src/credit-estimators/add-captions-nemotron.ts +73 -0
- package/src/credit-estimators/index.ts +14 -0
- package/src/credit-estimators/speech.ts +57 -9
- package/src/credit-identifiers.ts +284 -13
- package/src/dialogue-capabilities.ts +220 -3
- package/src/dubbing-structure.ts +186 -0
- package/src/entries/captions.ts +2 -0
- package/src/entries/credits.ts +25 -1
- package/src/entries/entities.ts +2 -0
- package/src/entries/llm-models.ts +7 -0
- package/src/entries/media.ts +3 -1
- package/src/entries/model-catalog.ts +30 -0
- package/src/entries/models.ts +54 -0
- package/src/entries/nodes.ts +2 -0
- package/src/entries/pipeline.ts +1 -1
- package/src/entries/video.ts +8 -1
- package/src/flux-3-klein.ts +69 -0
- package/src/gemini-tts.ts +144 -0
- package/src/input-image-pricing.ts +23 -6
- package/src/llm-models.ts +130 -36
- package/src/model-catalog.ts +539 -25
- package/src/model-constants.ts +247 -25
- package/src/node-default-mappings.ts +3 -0
- package/src/node-runtime-keys.ts +3 -0
- package/src/normalize-node-params.ts +123 -2
- package/src/seedance-extend-rate.ts +116 -0
- package/src/sequence-execution.ts +24 -0
- package/src/transcribe-preflight.ts +23 -0
- package/src/tts-capabilities.ts +193 -1
- package/src/video-analysis-pricing.ts +39 -15
- package/src/video-character-refs.ts +160 -3
- package/src/wired-character-names.ts +134 -18
- package/src/wired-character-video-subjects.ts +63 -0
- package/dist/chunk-63H4C56Q.cjs +0 -38
- package/dist/chunk-63H4C56Q.cjs.map +0 -1
- package/dist/chunk-6M563QE6.js.map +0 -1
- package/dist/chunk-6TGB7ECA.cjs.map +0 -1
- package/dist/chunk-6XUG4L7X.cjs +0 -54
- package/dist/chunk-6XUG4L7X.cjs.map +0 -1
- package/dist/chunk-BLJUCPMV.cjs.map +0 -1
- package/dist/chunk-BMJVKYVB.js.map +0 -1
- package/dist/chunk-CZ5IQB3L.js.map +0 -1
- package/dist/chunk-F6WGGYQW.cjs.map +0 -1
- package/dist/chunk-GMBDLNLD.cjs.map +0 -1
- package/dist/chunk-GSKLPI3J.cjs.map +0 -1
- package/dist/chunk-HBXF6RUU.js +0 -31
- package/dist/chunk-HBXF6RUU.js.map +0 -1
- package/dist/chunk-HSHCCBIV.js.map +0 -1
- package/dist/chunk-HWQ2SYNA.js.map +0 -1
- package/dist/chunk-IY3Y462W.js +0 -42
- package/dist/chunk-IY3Y462W.js.map +0 -1
- package/dist/chunk-KHH54GRP.cjs.map +0 -1
- package/dist/chunk-KMGCHV6O.js.map +0 -1
- package/dist/chunk-LH72PQO2.cjs.map +0 -1
- package/dist/chunk-M5OCFGHF.cjs.map +0 -1
- package/dist/chunk-NIAFR5EE.js.map +0 -1
- package/dist/chunk-O7RZRUMZ.js.map +0 -1
- package/dist/chunk-OV3JTKBY.js.map +0 -1
- package/dist/chunk-PSKZKLDG.js.map +0 -1
- package/dist/chunk-Q6IES3U2.js.map +0 -1
- package/dist/chunk-TM5JYSJF.cjs.map +0 -1
- package/dist/chunk-WRSWH7US.cjs.map +0 -1
- package/dist/chunk-XBTYGQ6Z.js.map +0 -1
- package/dist/chunk-XGGZWA4A.cjs.map +0 -1
- package/dist/chunk-XGVJGNZW.cjs.map +0 -1
- package/dist/chunk-Y35JQPT6.cjs.map +0 -1
- package/dist/chunk-Y4GCJJPF.cjs.map +0 -1
- package/dist/chunk-YUER7TJG.js.map +0 -1
- package/dist/chunk-YX6TFX7H.js.map +0 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google's Gemini text-to-speech models (served through KIE): the facts their
|
|
3
|
+
* capability sheets are built from. DATA only — each list is what the model
|
|
4
|
+
* accepts on the wire, so the catalog, the routes, the editor and any client
|
|
5
|
+
* read one place instead of copying a table that drifts.
|
|
6
|
+
*
|
|
7
|
+
* Two generations with different inputs:
|
|
8
|
+
* - 3.8 (Flash-Lite, Flash): 70 named voices grouped by use, `<angle>` tone
|
|
9
|
+
* tags from a closed list, and a free-text style per line.
|
|
10
|
+
* - 3.1 Flash and 2.5 Pro: 30 named voices, `[square]` tone tags written
|
|
11
|
+
* freely, and per-speaker style, pace, accent and audio profile.
|
|
12
|
+
* Neither takes a language field: the language follows the text.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** What a Gemini 3.8 voice is meant for, as KIE groups them. A stable id; clients translate it. */
|
|
16
|
+
export const GEMINI_TTS_VOICE_GROUPS = [
|
|
17
|
+
"tutor",
|
|
18
|
+
"commercial-voiceover",
|
|
19
|
+
"instructional",
|
|
20
|
+
"podcast",
|
|
21
|
+
"storyteller",
|
|
22
|
+
"digital-assistant",
|
|
23
|
+
"call-center",
|
|
24
|
+
"concierge",
|
|
25
|
+
"tech-support",
|
|
26
|
+
"professional",
|
|
27
|
+
] as const
|
|
28
|
+
export type GeminiTtsVoiceGroup = (typeof GEMINI_TTS_VOICE_GROUPS)[number]
|
|
29
|
+
|
|
30
|
+
/** A named voice a speech model speaks: its wire name (the id a request sends), and what it is meant for when the model groups its voices. */
|
|
31
|
+
export interface TtsNamedVoice {
|
|
32
|
+
readonly id: string
|
|
33
|
+
readonly group?: GeminiTtsVoiceGroup
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Gemini 3.8's 70 voices, in KIE's order, by use. */
|
|
37
|
+
const GEMINI_3_8_VOICES_BY_GROUP: Readonly<Record<GeminiTtsVoiceGroup, readonly string[]>> = {
|
|
38
|
+
"tutor": ["Bodi", "Lumi", "Sadaltager", "Sola", "Sulafat", "Varo", "Zephyr"],
|
|
39
|
+
"commercial-voiceover": ["Koda", "Kore", "Nika", "Tavi", "Zeno"],
|
|
40
|
+
"instructional": ["Algenib", "Despina", "Erinome", "Kira", "Ludo", "Mako", "Rasalgethi", "Rina"],
|
|
41
|
+
"podcast": ["Alnilam", "Brio", "Jori", "Laomedeia", "Rami", "Veda"],
|
|
42
|
+
"storyteller": ["Achird", "Enzo", "Riko", "Sami", "Zali", "Zubenelgenubi"],
|
|
43
|
+
"digital-assistant": ["Algieba", "Aoede", "Autonoe", "Callirrhoe", "Enceladus", "Gero", "Iapetus", "Neno", "Olin", "Tari", "Umbriel"],
|
|
44
|
+
"call-center": ["Achernar", "Charon", "Daro", "Fola", "Hali", "Milo", "Puck"],
|
|
45
|
+
"concierge": ["Arlo", "Cleo", "Fenrir", "Finn", "Leda", "Lora", "Orus"],
|
|
46
|
+
"tech-support": ["Enya", "Jett", "Knox", "Nyla", "Sadachbia", "Vindemiatrix"],
|
|
47
|
+
"professional": ["Cruz", "Elio", "Gacrux", "Pulcherrima", "Schedar", "Tova", "Zuri"],
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const GEMINI_3_8_TTS_VOICES: readonly TtsNamedVoice[] = GEMINI_TTS_VOICE_GROUPS.flatMap((group) =>
|
|
51
|
+
GEMINI_3_8_VOICES_BY_GROUP[group].map((id) => ({ id, group })),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
/** Gemini 3.1 Flash's and 2.5 Pro's 30 voices (one list for both), alphabetical as KIE lists them. */
|
|
55
|
+
export const GEMINI_3_1_TTS_VOICES: readonly TtsNamedVoice[] = [
|
|
56
|
+
"Achernar", "Achird", "Algenib", "Algieba", "Alnilam", "Aoede", "Autonoe", "Callirrhoe", "Charon", "Despina",
|
|
57
|
+
"Enceladus", "Erinome", "Fenrir", "Gacrux", "Iapetus", "Kore", "Laomedeia", "Leda", "Orus", "Puck",
|
|
58
|
+
"Pulcherrima", "Rasalgethi", "Sadachbia", "Sadaltager", "Schedar", "Sulafat", "Umbriel", "Vindemiatrix", "Zephyr", "Zubenelgenubi",
|
|
59
|
+
].map((id) => ({ id }))
|
|
60
|
+
|
|
61
|
+
/** The voice a 3.8 request runs with when it names none — KIE's own default. */
|
|
62
|
+
export const GEMINI_3_8_DEFAULT_VOICE = "Fola"
|
|
63
|
+
/** The voice a 3.1 / 2.5 request runs with when it names none (3.8's default is not on their list). */
|
|
64
|
+
export const GEMINI_3_1_DEFAULT_VOICE = "Kore"
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The tone tags Gemini 3.8 performs, by their own names. A request writes them
|
|
68
|
+
* in angle brackets (`<laugh>`); the platform's `[square]` tags are rewritten
|
|
69
|
+
* to these where they match, and every other tag is taken out
|
|
70
|
+
* (`@nodaro/prompts` `toAngleTags`).
|
|
71
|
+
*/
|
|
72
|
+
export const GEMINI_3_8_TONE_TAGS = [
|
|
73
|
+
"argh", "breath", "cackle", "cheer", "chuckle", "chuckles", "cough", "cry", "exhales", "gasp",
|
|
74
|
+
"giggle", "groan", "growl", "grr", "grunt", "heavy breath", "hiss", "laugh", "laughter", "long pause",
|
|
75
|
+
"moan", "pant", "pff", "phew", "scream", "short pause", "shout", "shriek", "sigh", "sighs",
|
|
76
|
+
"sneeze", "snicker", "snort", "sob", "throat-clearing", "tsk", "whimper", "whispering", "whispers", "yawn",
|
|
77
|
+
] as const
|
|
78
|
+
|
|
79
|
+
/** Gemini 3.1 / 2.5's speaking styles (one per request: the speaker's). */
|
|
80
|
+
export const GEMINI_3_1_TTS_STYLES = ["Vocal Smile", "Newscaster", "Whisper", "Empathetic", "Promo/Hype", "Deadpan"] as const
|
|
81
|
+
/** Gemini 3.1 / 2.5's paces. */
|
|
82
|
+
export const GEMINI_3_1_TTS_PACES = ["Natural", "Rapid Fire", "The Drift", "Staccato"] as const
|
|
83
|
+
/** Gemini 3.1 / 2.5's accents. */
|
|
84
|
+
export const GEMINI_3_1_TTS_ACCENTS = [
|
|
85
|
+
"Neutral",
|
|
86
|
+
"American (Gen)",
|
|
87
|
+
"American (Valley)",
|
|
88
|
+
"American (South)",
|
|
89
|
+
"British (RP)",
|
|
90
|
+
"British (Brixton)",
|
|
91
|
+
"Transatlantic",
|
|
92
|
+
"Australian",
|
|
93
|
+
] as const
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The longest free-text direction a request may carry (3.8's style, 3.1 /
|
|
97
|
+
* 2.5's audio profile). The provider names no limit; a direction is a
|
|
98
|
+
* sentence or two, and this keeps a request from carrying a script's worth of
|
|
99
|
+
* unbilled text (decided 2026-11-12: style text is not billed).
|
|
100
|
+
*/
|
|
101
|
+
export const TTS_DIRECTION_MAX_CHARS = 1000
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Per-request text cap of every Gemini speech model: the provider's limit on
|
|
105
|
+
* one turn's text. Taken from its schema, not measured.
|
|
106
|
+
*/
|
|
107
|
+
export const GEMINI_TTS_MAX_CHARS = 10000
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* A one-off clone of a speaker's voice for ONE request (KIE's `replica`, Gemini
|
|
111
|
+
* 3.8 Flash; decided 2026-11-13): two WAV recordings of the same adult — a
|
|
112
|
+
* reference of natural speech and a consent recording of the owner reading
|
|
113
|
+
* {@link REPLICA_CONSENT_SENTENCE} — sent in place of a named voice. Nothing is
|
|
114
|
+
* saved as a voice. Each is an https link.
|
|
115
|
+
*/
|
|
116
|
+
export interface TtsReplica {
|
|
117
|
+
readonly sourceAudioUrl: string
|
|
118
|
+
readonly consentAudioUrl: string
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** The most bytes either recording may have (KIE: 10 MB per file). */
|
|
122
|
+
export const REPLICA_MAX_BYTES = 10 * 1024 * 1024
|
|
123
|
+
/** The reference recording's length, in seconds (KIE: 10–30 s of natural speech). */
|
|
124
|
+
export const REPLICA_SOURCE_MIN_SEC = 10
|
|
125
|
+
export const REPLICA_SOURCE_MAX_SEC = 30
|
|
126
|
+
/** The consent recording's most seconds (one sentence; KIE sets no range for it). */
|
|
127
|
+
export const REPLICA_CONSENT_MAX_SEC = 30
|
|
128
|
+
/** The sentence the voice's owner reads in the consent recording (KIE's; other supported languages' versions are accepted too). */
|
|
129
|
+
export const REPLICA_CONSENT_SENTENCE = "I am the owner of this voice and I consent to Google using this voice to create a synthetic voice model."
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* What a caller confirms for a one-off clone (decided 2026-11-13): the editor's
|
|
133
|
+
* consent checkbox says it, and an API or MCP request says it with
|
|
134
|
+
* `replica.consent: true`. A clone without it is refused before anything is
|
|
135
|
+
* read or held.
|
|
136
|
+
*/
|
|
137
|
+
export const REPLICA_CONSENT_ATTESTATION =
|
|
138
|
+
"I confirm the voice in these recordings is my own, or that its owner, an adult, has given me consent to clone it for this generation, and that neither recording is AI-generated."
|
|
139
|
+
|
|
140
|
+
/** A one-off clone as an API or MCP request sends it: the two recordings and the caller's consent (`REPLICA_CONSENT_ATTESTATION`). */
|
|
141
|
+
export interface TtsReplicaRequest extends TtsReplica {
|
|
142
|
+
readonly consent: true
|
|
143
|
+
}
|
|
144
|
+
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* The image models whose price depends on how many input images a run sends:
|
|
3
3
|
* GPT Image 2.6 Flare and Sunburst, MiniMax H3 Image and Seedream 5.5. Every place that
|
|
4
4
|
* prices a run counts those images through here, so a model that joins
|
|
5
|
-
* `isPricedPerInputImage` is counted on every path at once.
|
|
5
|
+
* `isPricedPerInputImage` is counted on every path at once. FLUX 3 Klein is
|
|
6
|
+
* counted the same way (`priceReadsInputImages`): its price does not move with
|
|
7
|
+
* the images, but whether any go decides the id it runs, and is priced, on.
|
|
6
8
|
*/
|
|
7
9
|
import {
|
|
8
10
|
GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES,
|
|
@@ -11,6 +13,7 @@ import {
|
|
|
11
13
|
} from "./gpt-image-2-6.js"
|
|
12
14
|
import { isMinimaxH3Image, isMinimaxH3ImageI2i } from "./minimax-h3-image.js"
|
|
13
15
|
import { isSeedream55, isSeedream55I2i } from "./seedream-5-5.js"
|
|
16
|
+
import { isFlux3Klein } from "./flux-3-klein.js"
|
|
14
17
|
|
|
15
18
|
/** True for a model whose price counts the input images a run sends. */
|
|
16
19
|
export function isPricedPerInputImage(model: unknown): boolean {
|
|
@@ -22,11 +25,25 @@ export function isPricedPerInputImageEdit(model: unknown): boolean {
|
|
|
22
25
|
return typeof model === "string" && (isGptImage26I2i(model) || isMinimaxH3ImageI2i(model) || isSeedream55I2i(model))
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
/**
|
|
29
|
+
* True for a model whose price id reads the input images a run sends: one
|
|
30
|
+
* priced per input image ({@link isPricedPerInputImage}), or FLUX 3 Klein, which
|
|
31
|
+
* runs on its edit id whenever an image goes (its text-to-image endpoint takes
|
|
32
|
+
* none) and is priced on that id, at the same price. Every place that prices a
|
|
33
|
+
* run counts the images through {@link pricedSentImages} and
|
|
34
|
+
* {@link pricedEstimatedImages} for such a model, so the id priced is the id
|
|
35
|
+
* the provider runs.
|
|
36
|
+
*/
|
|
37
|
+
export function priceReadsInputImages(model: unknown): boolean {
|
|
38
|
+
return isPricedPerInputImage(model) || isFlux3Klein(model)
|
|
39
|
+
}
|
|
40
|
+
|
|
25
41
|
/**
|
|
26
42
|
* The images a Generate Image run sends its provider: its references and, when
|
|
27
43
|
* it edits a base image, that image too (the worker puts it first, unless it is
|
|
28
|
-
* already one of the references).
|
|
29
|
-
*
|
|
44
|
+
* already one of the references). The base is counted only on a model whose
|
|
45
|
+
* price reads the images ({@link priceReadsInputImages}); any other model is
|
|
46
|
+
* priced, and held to its image limit, on its references alone, as before.
|
|
30
47
|
*/
|
|
31
48
|
export function pricedSentImages(
|
|
32
49
|
provider: string | undefined,
|
|
@@ -34,7 +51,7 @@ export function pricedSentImages(
|
|
|
34
51
|
baseImageUrl: unknown,
|
|
35
52
|
): number {
|
|
36
53
|
const countsBase =
|
|
37
|
-
|
|
54
|
+
priceReadsInputImages(provider) &&
|
|
38
55
|
typeof baseImageUrl === "string" &&
|
|
39
56
|
baseImageUrl.length > 0 &&
|
|
40
57
|
!references.includes(baseImageUrl)
|
|
@@ -50,8 +67,8 @@ function namesMoodboard(direction: unknown): boolean {
|
|
|
50
67
|
}
|
|
51
68
|
|
|
52
69
|
/**
|
|
53
|
-
* The input images a workflow estimate counts for one node on a model
|
|
54
|
-
*
|
|
70
|
+
* The input images a workflow estimate counts for one node on a model whose
|
|
71
|
+
* price reads them ({@link priceReadsInputImages}): every list on the node, its source or base image, what is
|
|
55
72
|
* wired in, a moodboard its direction names (at the most a moodboard holds),
|
|
56
73
|
* and an edit model's own source. An estimate may over-quote, never under.
|
|
57
74
|
*/
|
package/src/llm-models.ts
CHANGED
|
@@ -87,6 +87,26 @@ export interface LlmModelDef {
|
|
|
87
87
|
* any model. Never set together with `structuredOutputMode` (registry test).
|
|
88
88
|
*/
|
|
89
89
|
structuredOutputHint?: "kie-response-format" | "responses-json-schema"
|
|
90
|
+
/**
|
|
91
|
+
* The KIE lane sends this model's structured calls NO `response_format`: the
|
|
92
|
+
* schema rides the system prompt instead (the one-object rule and the schema,
|
|
93
|
+
* as the KIE Claude lane's prompt-JSON), in the wire form `response_format`
|
|
94
|
+
* sent (keyword-named properties aliased and restored on the answer; Google's
|
|
95
|
+
* compact form), and `llmCompleteStructured` parses, validates and re-asks the
|
|
96
|
+
* answer as it does for any model. When every KIE answer of an unpinned call
|
|
97
|
+
* fails validation, the direct lane, which enforces the schema, is asked once
|
|
98
|
+
* before the call fails. For a model whose KIE endpoint fails a request that
|
|
99
|
+
* carries `response_format`.
|
|
100
|
+
*
|
|
101
|
+
* Per LANE, not per model: `structuredOutputMode` stays, so the trust readers
|
|
102
|
+
* (STRUCTURED_VISION_MODELS, the structured-model filters) and the direct
|
|
103
|
+
* lane's enforced `responseJsonSchema` are unchanged. Nothing reads trust to
|
|
104
|
+
* skip validation, and only an `anthropic-tool` model streams partial values,
|
|
105
|
+
* so a KIE-served answer here is checked like any untrusted one. Only on a
|
|
106
|
+
* `kieFormat: "chat-completions"` model whose wire mode is
|
|
107
|
+
* `kie-response-format` (registry test).
|
|
108
|
+
*/
|
|
109
|
+
kieSchemaInPrompt?: true
|
|
90
110
|
/** If set, fallback to direct Anthropic SDK with this model ID when KIE.ai fails */
|
|
91
111
|
directFallbackModel?: string
|
|
92
112
|
/**
|
|
@@ -147,8 +167,8 @@ export interface LlmModelDef {
|
|
|
147
167
|
* and every estimate surface quotes that call. The sizes themselves are
|
|
148
168
|
* backend data (`backend/src/lib/pricing/llm-cost.ts`), held to this flag by
|
|
149
169
|
* a backend test. No model sets it today (GPT-6.1 Terra did for part of
|
|
150
|
-
* 2026-11-12
|
|
151
|
-
* effort).
|
|
170
|
+
* 2026-11-12; since 2026-11-13 its added input is counted at the ceiling it
|
|
171
|
+
* has been seen at, the same with or without an effort).
|
|
152
172
|
*/
|
|
153
173
|
effortPriced?: true
|
|
154
174
|
/**
|
|
@@ -350,6 +370,9 @@ export const LLM_MODELS: readonly LlmModelDef[] = [
|
|
|
350
370
|
retired: true,
|
|
351
371
|
vendor: "google",
|
|
352
372
|
structuredOutputMode: "kie-response-format",
|
|
373
|
+
// The KIE endpoint is 3.8's, so it takes 3.8's rule: no `response_format`
|
|
374
|
+
// there, the schema in the prompt (see gemini-3.8-flash below).
|
|
375
|
+
kieSchemaInPrompt: true,
|
|
353
376
|
supportsImages: true,
|
|
354
377
|
// Google's own cap is 65,536, but the field feeds BOTH lanes and the KIE
|
|
355
378
|
// flash endpoints cap at 8192 (the measured 3.6 posture) — stay at the
|
|
@@ -372,8 +395,9 @@ export const LLM_MODELS: readonly LlmModelDef[] = [
|
|
|
372
395
|
series: "Gemini",
|
|
373
396
|
// Inherits "Newest" from 3.7 (demoted above). Deliberately does NOT name
|
|
374
397
|
// agentic video: that capability exists only on the direct Google lane
|
|
375
|
-
// (Interactions API, not wired here)
|
|
376
|
-
//
|
|
398
|
+
// (Interactions API, not wired here). Plain video + audio input is wired
|
|
399
|
+
// (LLM_MODALITY_CAPS below) — a picker desc must not promise a lever this
|
|
400
|
+
// entry cannot expose.
|
|
377
401
|
desc: "Newest fast Gemini, agentic-tuned",
|
|
378
402
|
tier: "economy",
|
|
379
403
|
kieFormat: "chat-completions",
|
|
@@ -387,6 +411,16 @@ export const LLM_MODELS: readonly LlmModelDef[] = [
|
|
|
387
411
|
// is ENFORCED (the reply came back exact-schema valid, credits_consumed
|
|
388
412
|
// present) — not merely accepted-and-ignored.
|
|
389
413
|
structuredOutputMode: "kie-response-format",
|
|
414
|
+
// Since 2026-11-13 the KIE endpoint answers ANY request carrying
|
|
415
|
+
// `response_format` (json_schema strict or not, json_object; any effort or
|
|
416
|
+
// none; with or without media) with HTTP 200 and an in-band
|
|
417
|
+
// `{"code":500}` after ~34 s, while the same request without it answers;
|
|
418
|
+
// 3.6 Flash, 3.1 Pro and Carbon take the same body. So the KIE lane sends
|
|
419
|
+
// the schema in the prompt (measured: a real Video Analysis roll, video
|
|
420
|
+
// included, answered schema-valid that way). The direct lane keeps its
|
|
421
|
+
// enforced `responseJsonSchema` (asked once when a call's KIE answers never
|
|
422
|
+
// validate), and the trust this mode carries stays.
|
|
423
|
+
kieSchemaInPrompt: true,
|
|
390
424
|
supportsImages: true,
|
|
391
425
|
// 16384 here, NOT the 8192 its 3.6 / 3.7 siblings sit at. Those two stay at
|
|
392
426
|
// the KIE-safe intersection because nobody measured their endpoints past
|
|
@@ -905,11 +939,11 @@ export const LLM_MODELS: readonly LlmModelDef[] = [
|
|
|
905
939
|
//
|
|
906
940
|
// KIE's endpoint adds its own instructions to every call and counts them as
|
|
907
941
|
// input. The hold and the estimate count them too
|
|
908
|
-
// (backend/src/lib/pricing/llm-cost.ts, `llmLaneAddedInputTokens`).
|
|
909
|
-
//
|
|
910
|
-
// 2026-11-12
|
|
911
|
-
// does not depend on the effort
|
|
912
|
-
//
|
|
942
|
+
// (backend/src/lib/pricing/llm-cost.ts, `llmLaneAddedInputTokens`). Their
|
|
943
|
+
// size has moved (about 4,400 and about 25,500 tokens on the same request,
|
|
944
|
+
// 2026-11-12/13), so both count the ceiling, with or without an effort
|
|
945
|
+
// (decided 2026-11-13): its price does not depend on the effort, so not
|
|
946
|
+
// `effortPriced`. The charge follows what KIE states or reports.
|
|
913
947
|
kieSlugOrModel: "gpt-6-1-terra",
|
|
914
948
|
vendor: "openai",
|
|
915
949
|
structuredOutputMode: "responses-json-schema",
|
|
@@ -1268,10 +1302,12 @@ export function structuredWireMode(
|
|
|
1268
1302
|
}
|
|
1269
1303
|
|
|
1270
1304
|
/**
|
|
1271
|
-
* Does a structured call on `modelId` (unset = `feature`'s default model)
|
|
1272
|
-
* its schema
|
|
1273
|
-
*
|
|
1274
|
-
*
|
|
1305
|
+
* Does a structured call on `modelId` (unset = `feature`'s default model) send
|
|
1306
|
+
* its schema ({@link structuredWireMode})? On the wire, or in the system prompt
|
|
1307
|
+
* on a lane that carries it there (`kieSchemaInPrompt`): either way the model
|
|
1308
|
+
* reads it, so a request's size counts it. A schema that is not sent is not
|
|
1309
|
+
* read by the model. A model the registry does not know counts as yes (the
|
|
1310
|
+
* larger size).
|
|
1275
1311
|
*/
|
|
1276
1312
|
export function llmSendsSchema(modelId: string | undefined, feature?: string): boolean {
|
|
1277
1313
|
const id = modelId || (feature ? LLM_FEATURE_DEFAULTS[feature as LlmFeature] : undefined)
|
|
@@ -1530,8 +1566,17 @@ export function defaultReasoningEffort(feature: string, modelId?: string): LlmRe
|
|
|
1530
1566
|
* no video). Gemini 2/3 family supports image + video + audio natively.
|
|
1531
1567
|
* GPT-5.x via KIE chat-completions / responses supports image only — audio
|
|
1532
1568
|
* input requires a separate audio-capable model we don't route to today.
|
|
1569
|
+
*
|
|
1570
|
+
* `file` (decided 2026-11-13): the model reads documents (PDF) sent with the
|
|
1571
|
+
* call. Declared on the one model that does — GPT-6.1 Terra — and never
|
|
1572
|
+
* derived for any other: absent means no. Read it through
|
|
1573
|
+
* {@link llmAcceptsFiles}.
|
|
1533
1574
|
*/
|
|
1534
|
-
export const LLM_MODALITY_CAPS: Record<string,
|
|
1575
|
+
export const LLM_MODALITY_CAPS: Record<string, LlmModalityCaps> = {
|
|
1576
|
+
// Keeps full caps after KIE dropped its channel (2026-11-13): it stays a
|
|
1577
|
+
// VIDEO_ANALYSIS_LLM_MODELS member as the legacy `fast` backing (below), so a
|
|
1578
|
+
// stored raw `llmModel: "gemini-3-flash"` still resolves and prices under its
|
|
1579
|
+
// own credit family.
|
|
1535
1580
|
"gemini-3-flash": { image: true, video: true, audio: true },
|
|
1536
1581
|
"gemini-3.6-flash": { image: true, video: true, audio: true },
|
|
1537
1582
|
// gemini-3.7-flash is IMAGE-ONLY by DECISION, not omission: full video+audio
|
|
@@ -1540,15 +1585,13 @@ export const LLM_MODALITY_CAPS: Record<string, { image: boolean; video: boolean;
|
|
|
1540
1585
|
// deferred while the smart-family A/B routes this model internally (#747).
|
|
1541
1586
|
// Flip these two flags ONLY together with that VA-side decision.
|
|
1542
1587
|
"gemini-3.7-flash": { image: true, video: false, audio: false },
|
|
1543
|
-
// gemini-3.8-flash
|
|
1544
|
-
//
|
|
1545
|
-
//
|
|
1546
|
-
//
|
|
1547
|
-
//
|
|
1548
|
-
//
|
|
1549
|
-
|
|
1550
|
-
// with that VA-side decision.
|
|
1551
|
-
"gemini-3.8-flash": { image: true, video: false, audio: false },
|
|
1588
|
+
// gemini-3.8-flash takes video + audio (decided 2026-11-13): it backs the
|
|
1589
|
+
// video-analysis `fast` tier (VIDEO_ANALYSIS_TIERS below) since KIE dropped
|
|
1590
|
+
// gemini-3-flash's channel, which is what enrols it in
|
|
1591
|
+
// VIDEO_ANALYSIS_LLM_MODELS. Its KIE lane reads a video URL sent as an
|
|
1592
|
+
// `image_url` part, the same channel gemini-3-flash used (live-verified
|
|
1593
|
+
// 2026-11-13 with the analysis request: prompt tokens include the clip).
|
|
1594
|
+
"gemini-3.8-flash": { image: true, video: true, audio: true },
|
|
1552
1595
|
"gemini-3.1-pro": { image: true, video: true, audio: true },
|
|
1553
1596
|
// gemini-4-argon is IMAGE-ONLY by DECISION, not omission (decided 2026-10-17):
|
|
1554
1597
|
// the model DOES read video and audio, but full caps would
|
|
@@ -1556,12 +1599,13 @@ export const LLM_MODALITY_CAPS: Record<string, { image: boolean; video: boolean;
|
|
|
1556
1599
|
// video-analysis tier + pricing decision. That waits on a Video Analysis
|
|
1557
1600
|
// bake-off; flip these two flags ONLY together with its outcome.
|
|
1558
1601
|
"gemini-4-argon": { image: true, video: false, audio: false },
|
|
1559
|
-
// gemini-4-carbon
|
|
1560
|
-
//
|
|
1561
|
-
//
|
|
1562
|
-
//
|
|
1563
|
-
//
|
|
1564
|
-
|
|
1602
|
+
// gemini-4-carbon takes video + audio (decided 2026-11-13): it backs the
|
|
1603
|
+
// video-analysis `ultra` tier (VIDEO_ANALYSIS_TIERS below), which is what
|
|
1604
|
+
// enrols it in VIDEO_ANALYSIS_LLM_MODELS. The same caps let LLM Chat send it
|
|
1605
|
+
// video and audio references, and let a trend's LLM step that reads the clip
|
|
1606
|
+
// choose it (modelReadsClip) — both intended. It was image-only from
|
|
1607
|
+
// 2026-11-12 until this enrolment was decided.
|
|
1608
|
+
"gemini-4-carbon": { image: true, video: true, audio: true },
|
|
1565
1609
|
"claude-haiku-4.5": { image: true, video: false, audio: false },
|
|
1566
1610
|
"claude-haiku-5.5": { image: true, video: false, audio: false },
|
|
1567
1611
|
"claude-sonnet-4.6": { image: true, video: false, audio: false },
|
|
@@ -1578,8 +1622,9 @@ export const LLM_MODALITY_CAPS: Record<string, { image: boolean; video: boolean;
|
|
|
1578
1622
|
"gpt-6-luna": { image: true, video: false, audio: false },
|
|
1579
1623
|
"gpt-6-sol": { image: true, video: false, audio: false },
|
|
1580
1624
|
"gpt-6.1-sol": { image: true, video: false, audio: false },
|
|
1581
|
-
//
|
|
1582
|
-
|
|
1625
|
+
// Reads PDFs (`file`, probed 2026-11-13: KIE took a PDF inline and by link,
|
|
1626
|
+
// and refused a text file and a Word file — so PDF only).
|
|
1627
|
+
"gpt-6.1-terra": { image: true, video: false, audio: false, file: true },
|
|
1583
1628
|
"grok-4.6": { image: true, video: false, audio: false },
|
|
1584
1629
|
"grok-4.7": { image: true, video: false, audio: false },
|
|
1585
1630
|
"claude-sonnet-5": { image: true, video: false, audio: false },
|
|
@@ -1595,11 +1640,49 @@ export const LLM_MODALITY_CAPS: Record<string, { image: boolean; video: boolean;
|
|
|
1595
1640
|
}
|
|
1596
1641
|
|
|
1597
1642
|
/** Capability lookup with safe default — unknown models get image-only. */
|
|
1598
|
-
export function getLlmModalityCaps(modelId: string | undefined):
|
|
1643
|
+
export function getLlmModalityCaps(modelId: string | undefined): LlmModalityCaps {
|
|
1599
1644
|
if (!modelId) return { image: true, video: false, audio: false }
|
|
1600
1645
|
return LLM_MODALITY_CAPS[modelId] ?? { image: true, video: false, audio: false }
|
|
1601
1646
|
}
|
|
1602
1647
|
|
|
1648
|
+
/** What a model reads besides text (see {@link LLM_MODALITY_CAPS}). */
|
|
1649
|
+
export interface LlmModalityCaps {
|
|
1650
|
+
image: boolean
|
|
1651
|
+
video: boolean
|
|
1652
|
+
audio: boolean
|
|
1653
|
+
/** Documents (PDF). Set only where it is true. */
|
|
1654
|
+
file?: true
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
/** Does `modelId` read documents sent with the call (`file` in its modality caps)? An unknown model does not. */
|
|
1658
|
+
export function llmAcceptsFiles(modelId: string | undefined): boolean {
|
|
1659
|
+
return Boolean(modelId && LLM_MODALITY_CAPS[modelId]?.file)
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/** The models that read documents, in registry order — what a refusal names. */
|
|
1663
|
+
export const LLM_FILE_MODELS: readonly LlmModelDef[] = LLM_MODELS.filter((m) => llmAcceptsFiles(m.id))
|
|
1664
|
+
|
|
1665
|
+
/** The most documents one LLM call takes (`referenceFileUrls`). */
|
|
1666
|
+
export const LLM_REFERENCE_FILES_MAX = 5
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* The most bytes the documents of one LLM call may total: 6 MiB. They are sent
|
|
1670
|
+
* inline with the call, which carries about ten million characters in all,
|
|
1671
|
+
* and base64 makes 6 MiB about 8.4 million of them (the rest is the call's
|
|
1672
|
+
* images').
|
|
1673
|
+
*/
|
|
1674
|
+
export const LLM_REFERENCE_FILES_MAX_TOTAL_BYTES = 6 * 1024 * 1024
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* The most pages the documents of one LLM call may have IN ALL (decided
|
|
1678
|
+
* 2026-11-13: 100 for the whole call, not per file, until a probe shows the
|
|
1679
|
+
* aggregator reads more in one call).
|
|
1680
|
+
*/
|
|
1681
|
+
export const LLM_REFERENCE_FILES_MAX_PAGES = 100
|
|
1682
|
+
|
|
1683
|
+
/** The document types an LLM call takes: PDF only (the aggregator refused text and Word files, 2026-11-13). */
|
|
1684
|
+
export const LLM_REFERENCE_FILE_MIME_TYPES: readonly string[] = ["application/pdf"]
|
|
1685
|
+
|
|
1603
1686
|
/**
|
|
1604
1687
|
* Dash-form aliases resolve to their canonical dot-form ids. Several wire
|
|
1605
1688
|
* contracts carry dash forms (`PIPELINE_PINNABLE_SCRIPT_LLMS`, provider slugs,
|
|
@@ -1959,8 +2042,12 @@ export const VIDEO_ANALYSIS_LLM_MODELS: string[] = LLM_MODELS
|
|
|
1959
2042
|
* (video-analysis-pricing.test.ts) asserts every tier target is a real
|
|
1960
2043
|
* VIDEO_ANALYSIS_LLM_MODELS member AND every such model is reachable by a tier,
|
|
1961
2044
|
* so adding a video model forces a tier decision instead of silently leaking.
|
|
2045
|
+
*
|
|
2046
|
+
* `ultra` (decided 2026-11-13) reads every window with the deepest-reasoning
|
|
2047
|
+
* analysis model, at the same frame sampling as the other single-model tiers.
|
|
2048
|
+
* It is priced between the mixed tiers and `smart`.
|
|
1962
2049
|
*/
|
|
1963
|
-
export const VIDEO_ANALYSIS_TIERS = { fast: "gemini-3-flash", pro: "gemini-3.1-pro" } as const
|
|
2050
|
+
export const VIDEO_ANALYSIS_TIERS = { fast: "gemini-3.8-flash", pro: "gemini-3.1-pro", ultra: "gemini-4-carbon" } as const
|
|
1964
2051
|
export type VideoAnalysisModelTier = keyof typeof VIDEO_ANALYSIS_TIERS
|
|
1965
2052
|
/**
|
|
1966
2053
|
* Models that PREVIOUSLY backed a tier, mapped to the tier they backed.
|
|
@@ -1981,6 +2068,12 @@ export const VIDEO_ANALYSIS_LEGACY_MODELS: Record<string, VideoAnalysisModelTier
|
|
|
1981
2068
|
// belongs here: stored raw `llmModel` values keep resolving and keep pricing
|
|
1982
2069
|
// under their own credit family.
|
|
1983
2070
|
"gemini-3.6-flash": "fast",
|
|
2071
|
+
// Backed the fast tier from 2026-07-29 until 2026-11-13, when KIE dropped its
|
|
2072
|
+
// channel (every call answers `code 422 "The channel is not supported"`) and
|
|
2073
|
+
// the fast tier moved to gemini-3.8-flash. Stored raw `llmModel` values keep
|
|
2074
|
+
// resolving and keep pricing under their own credit family; the analysis
|
|
2075
|
+
// engine serves their rolls with the current fast model.
|
|
2076
|
+
"gemini-3-flash": "fast",
|
|
1984
2077
|
}
|
|
1985
2078
|
/**
|
|
1986
2079
|
* MIXED tiers — advanced multi-engine analysis plans whose identifier resolves
|
|
@@ -2010,14 +2103,15 @@ export type VideoAnalysisMixedTier = (typeof VIDEO_ANALYSIS_MIXED_TIERS)[number]
|
|
|
2010
2103
|
* As with the mixed sentinels, what the plan does internally is deliberately not
|
|
2011
2104
|
* published here; only the wire vocabulary is contract.
|
|
2012
2105
|
*/
|
|
2013
|
-
/** UI/listing order — recommended (smart) first. */
|
|
2014
|
-
export const VIDEO_ANALYSIS_TIER_ORDER = ["smart", "pro", "fast", "mixed", "mixed-fast"] as const
|
|
2106
|
+
/** UI/listing order — recommended (smart) first, then `ultra`, the other high-accuracy tier. */
|
|
2107
|
+
export const VIDEO_ANALYSIS_TIER_ORDER = ["smart", "ultra", "pro", "fast", "mixed", "mixed-fast"] as const
|
|
2015
2108
|
export type VideoAnalysisTier = (typeof VIDEO_ANALYSIS_TIER_ORDER)[number]
|
|
2016
2109
|
export const DEFAULT_VIDEO_ANALYSIS_TIER: VideoAnalysisTier = "pro"
|
|
2017
2110
|
export const DEFAULT_VIDEO_ANALYSIS_MODEL: string = VIDEO_ANALYSIS_TIERS[DEFAULT_VIDEO_ANALYSIS_TIER]
|
|
2018
2111
|
/** Neutral, vendor-free display labels for the UI. */
|
|
2019
2112
|
export const VIDEO_ANALYSIS_TIER_LABELS: Record<VideoAnalysisTier, string> = {
|
|
2020
2113
|
smart: "Smart",
|
|
2114
|
+
ultra: "Ultra",
|
|
2021
2115
|
fast: "Fast",
|
|
2022
2116
|
pro: "Pro",
|
|
2023
2117
|
mixed: "Mixed",
|
|
@@ -2035,7 +2129,7 @@ export function isVideoAnalysisMixedTier(v: string): v is VideoAnalysisMixedTier
|
|
|
2035
2129
|
/**
|
|
2036
2130
|
* Resolve a user-supplied tier OR a raw internal model id to the analysis
|
|
2037
2131
|
* ENGINE IDENTIFIER carried in the worker payload:
|
|
2038
|
-
* - model-backed tiers ("fast"/"pro") → the internal model id;
|
|
2132
|
+
* - model-backed tiers ("fast"/"pro"/"ultra") → the internal model id;
|
|
2039
2133
|
* - mixed tiers ("mixed"/"mixed-fast") → the sentinel ITSELF (the engine
|
|
2040
2134
|
* expands it to a multi-model roll plan);
|
|
2041
2135
|
* - raw model ids pass through (back-compat for stored `llmModel` values);
|