@nodaro/shared 2.7.0 → 2.8.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/index.cjs +83 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +80 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/llm-models.test.ts +134 -8
- package/src/index.ts +6 -0
- package/src/llm-models.ts +111 -2
package/dist/index.cjs
CHANGED
|
@@ -4818,6 +4818,30 @@ var LLM_MODELS = [
|
|
|
4818
4818
|
// direct is the reliability fallback only.
|
|
4819
4819
|
directGeminiModel: "gemini-3.6-flash"
|
|
4820
4820
|
},
|
|
4821
|
+
{
|
|
4822
|
+
id: "gemini-3.7-flash",
|
|
4823
|
+
displayName: "Gemini 3.7 Flash",
|
|
4824
|
+
desc: "Newest fast Gemini, agentic-tuned",
|
|
4825
|
+
tier: "economy",
|
|
4826
|
+
kieFormat: "chat-completions",
|
|
4827
|
+
// KIE serves it on the OpenAI-compatible dialect under this slug
|
|
4828
|
+
// (docs.kie.ai/market/gemini/gemini-3-7-flash-openai.md) — same
|
|
4829
|
+
// chat-completions path shape as gemini-3.6-flash.
|
|
4830
|
+
kieSlugOrModel: "gemini-3-7-flash-openai",
|
|
4831
|
+
vendor: "google",
|
|
4832
|
+
structuredOutputMode: "kie-response-format",
|
|
4833
|
+
supportsImages: true,
|
|
4834
|
+
// Google's own cap is 65,536, but the field feeds BOTH lanes and the KIE
|
|
4835
|
+
// flash endpoints cap at 8192 (the measured 3.6 posture) — stay at the
|
|
4836
|
+
// KIE-safe intersection, same reasoning as `reasoningEfforts` below.
|
|
4837
|
+
maxOutputTokens: 8192,
|
|
4838
|
+
// KIE's 3.7 endpoint enumerates reasoning_effort low | high (verified
|
|
4839
|
+
// against its OpenAPI spec 2026-08-18), identical to 3.6.
|
|
4840
|
+
reasoningEfforts: ["low", "high"],
|
|
4841
|
+
// Assumed parity with 3.6 pending a live probe on the direct lane.
|
|
4842
|
+
directReasoningEfforts: ["none", "low", "medium", "high"],
|
|
4843
|
+
directGeminiModel: "gemini-3.7-flash"
|
|
4844
|
+
},
|
|
4821
4845
|
{
|
|
4822
4846
|
id: "claude-haiku-4.5",
|
|
4823
4847
|
displayName: "Claude Haiku 4.5",
|
|
@@ -4980,7 +5004,35 @@ var LLM_MODELS = [
|
|
|
4980
5004
|
reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
|
|
4981
5005
|
supportsTemperature: false
|
|
4982
5006
|
},
|
|
4983
|
-
|
|
5007
|
+
{
|
|
5008
|
+
id: "grok-4.6",
|
|
5009
|
+
displayName: "Grok 4.6",
|
|
5010
|
+
desc: "xAI flagship, strong reasoning",
|
|
5011
|
+
tier: "standard",
|
|
5012
|
+
kieFormat: "responses",
|
|
5013
|
+
// KIE serves Grok on the responses dialect under its own family path —
|
|
5014
|
+
// grok/v1/responses, NOT codex/v1/responses (llm-client derives the path
|
|
5015
|
+
// from `vendor`). Live-verified end-to-end 2026-08-18: array `input`,
|
|
5016
|
+
// `developer` system role, `input_image` URL vision, `text.format`
|
|
5017
|
+
// json_schema enforcement, SSE `response.output_text.delta` stream, and
|
|
5018
|
+
// `credits_consumed` actual-cost capture. (grok-4.5 was deferred 2026-07-13
|
|
5019
|
+
// because none of this was live; 4.6 is its activation.)
|
|
5020
|
+
kieSlugOrModel: "grok-4-6",
|
|
5021
|
+
vendor: "xai",
|
|
5022
|
+
structuredOutputMode: "responses-json-schema",
|
|
5023
|
+
supportsImages: true,
|
|
5024
|
+
maxOutputTokens: 16384,
|
|
5025
|
+
// KIE's documented enum, each level live-verified (echoed back) 2026-08-18.
|
|
5026
|
+
// No `none`: the endpoint reasons unconditionally (see thinkingDefaultOn).
|
|
5027
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh"],
|
|
5028
|
+
// Live-probed 2026-08-18: `temperature` is silently IGNORED (request echo
|
|
5029
|
+
// stays at the 0.7 default), so never send it — same treatment as GPT-5.5+.
|
|
5030
|
+
supportsTemperature: false,
|
|
5031
|
+
// Reasons with NO reasoning param sent (effort defaults to "low" server-side
|
|
5032
|
+
// — a trivial probe spent 169 of 170 output tokens on reasoning), so every
|
|
5033
|
+
// call needs output headroom, not just xhigh.
|
|
5034
|
+
thinkingDefaultOn: true
|
|
5035
|
+
},
|
|
4984
5036
|
{
|
|
4985
5037
|
id: "claude-sonnet-5",
|
|
4986
5038
|
displayName: "Claude Sonnet 5",
|
|
@@ -5056,6 +5108,25 @@ var LLM_MODEL_IDS = LLM_MODELS.map((m) => m.id);
|
|
|
5056
5108
|
var STRUCTURED_VISION_MODELS = LLM_MODELS.filter(
|
|
5057
5109
|
(m) => m.supportsImages && m.structuredOutputMode != null
|
|
5058
5110
|
);
|
|
5111
|
+
var LLM_VENDOR_ORDER = ["anthropic", "google", "openai", "xai"];
|
|
5112
|
+
var LLM_VENDOR_LABELS = {
|
|
5113
|
+
anthropic: "Anthropic",
|
|
5114
|
+
google: "Google",
|
|
5115
|
+
openai: "OpenAI",
|
|
5116
|
+
xai: "xAI"
|
|
5117
|
+
};
|
|
5118
|
+
var TIER_RANK = { economy: 0, standard: 1, premium: 2 };
|
|
5119
|
+
function groupLlmModelsByVendor(models = LLM_MODELS) {
|
|
5120
|
+
const groups = [];
|
|
5121
|
+
for (const vendor of LLM_VENDOR_ORDER) {
|
|
5122
|
+
const members = models.filter((m) => m.vendor === vendor).sort((a, b) => TIER_RANK[a.tier] - TIER_RANK[b.tier]);
|
|
5123
|
+
if (members.length > 0) groups.push({ vendor, label: LLM_VENDOR_LABELS[vendor], models: members });
|
|
5124
|
+
}
|
|
5125
|
+
return groups;
|
|
5126
|
+
}
|
|
5127
|
+
function orderedLlmModels(models = LLM_MODELS) {
|
|
5128
|
+
return groupLlmModelsByVendor(models).flatMap((g) => g.models);
|
|
5129
|
+
}
|
|
5059
5130
|
function motionGraphicsFeature(engine) {
|
|
5060
5131
|
return engine === "lottie" ? "motion-graphics-lottie" : "motion-graphics";
|
|
5061
5132
|
}
|
|
@@ -5080,6 +5151,12 @@ var LLM_FEATURE_DEFAULTS = {
|
|
|
5080
5151
|
var LLM_MODALITY_CAPS = {
|
|
5081
5152
|
"gemini-3-flash": { image: true, video: true, audio: true },
|
|
5082
5153
|
"gemini-3.6-flash": { image: true, video: true, audio: true },
|
|
5154
|
+
// gemini-3.7-flash is IMAGE-ONLY by DECISION, not omission: full video+audio
|
|
5155
|
+
// caps would auto-enroll it in VIDEO_ANALYSIS_LLM_MODELS (derived below) and
|
|
5156
|
+
// force a video-analysis tier + pricing decision that is deliberately
|
|
5157
|
+
// deferred while the smart-family A/B routes this model internally (#747).
|
|
5158
|
+
// Flip these two flags ONLY together with that VA-side decision.
|
|
5159
|
+
"gemini-3.7-flash": { image: true, video: false, audio: false },
|
|
5083
5160
|
"gemini-3.1-pro": { image: true, video: true, audio: true },
|
|
5084
5161
|
"claude-haiku-4.5": { image: true, video: false, audio: false },
|
|
5085
5162
|
"claude-sonnet-4.6": { image: true, video: false, audio: false },
|
|
@@ -5090,6 +5167,7 @@ var LLM_MODALITY_CAPS = {
|
|
|
5090
5167
|
"gpt-5.6-luna": { image: true, video: false, audio: false },
|
|
5091
5168
|
"gpt-5.6-terra": { image: true, video: false, audio: false },
|
|
5092
5169
|
"gpt-5.6-sol": { image: true, video: false, audio: false },
|
|
5170
|
+
"grok-4.6": { image: true, video: false, audio: false },
|
|
5093
5171
|
"claude-sonnet-5": { image: true, video: false, audio: false },
|
|
5094
5172
|
"claude-opus-4.8": { image: true, video: false, audio: false },
|
|
5095
5173
|
"claude-opus-5": { image: true, video: false, audio: false },
|
|
@@ -13478,6 +13556,8 @@ exports.LLM_MODEL_IDS = LLM_MODEL_IDS;
|
|
|
13478
13556
|
exports.LLM_REASONING_EFFORTS = LLM_REASONING_EFFORTS;
|
|
13479
13557
|
exports.LLM_ROUTE_DEFAULTS = LLM_ROUTE_DEFAULTS;
|
|
13480
13558
|
exports.LLM_TEXT_INPUT_MAX = LLM_TEXT_INPUT_MAX;
|
|
13559
|
+
exports.LLM_VENDOR_LABELS = LLM_VENDOR_LABELS;
|
|
13560
|
+
exports.LLM_VENDOR_ORDER = LLM_VENDOR_ORDER;
|
|
13481
13561
|
exports.LOCATION_ASSET_TYPES = LOCATION_ASSET_TYPES;
|
|
13482
13562
|
exports.LOCATION_ASSET_VARIANTS = LOCATION_ASSET_VARIANTS;
|
|
13483
13563
|
exports.LOCATION_ATMOSPHERE_PROVIDERS = LOCATION_ATMOSPHERE_PROVIDERS;
|
|
@@ -13875,6 +13955,7 @@ exports.getWeapon = getWeapon;
|
|
|
13875
13955
|
exports.getWeaponLabel = getWeaponLabel;
|
|
13876
13956
|
exports.groupByFamily = groupByFamily;
|
|
13877
13957
|
exports.groupHandleId = groupHandleId;
|
|
13958
|
+
exports.groupLlmModelsByVendor = groupLlmModelsByVendor;
|
|
13878
13959
|
exports.hasContiguousSegmentDurations = hasContiguousSegmentDurations;
|
|
13879
13960
|
exports.hasFeature = hasFeature;
|
|
13880
13961
|
exports.hexToRgbaArray = hexToRgbaArray;
|
|
@@ -13933,6 +14014,7 @@ exports.normalizeModelInput = normalizeModelInput;
|
|
|
13933
14014
|
exports.normalizeNodeModelParams = normalizeNodeModelParams;
|
|
13934
14015
|
exports.normalizePinterestUrl = normalizePinterestUrl;
|
|
13935
14016
|
exports.normalizeRoleSlug = normalizeRoleSlug;
|
|
14017
|
+
exports.orderedLlmModels = orderedLlmModels;
|
|
13936
14018
|
exports.parseAttributedDialogue = parseAttributedDialogue;
|
|
13937
14019
|
exports.parseCharacterMentionToken = parseCharacterMentionToken;
|
|
13938
14020
|
exports.parseGroupHandle = parseGroupHandle;
|