@hostwebhook/node-types 1.54.1 → 1.55.1
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.d.ts +2 -0
- package/dist/index.js +8 -1
- package/dist/llm-models.d.ts +77 -0
- package/dist/llm-models.js +186 -0
- package/dist/ui.js +8 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -39,5 +39,7 @@ export { DOCS_OPERATIONS, DOCS_OPERATION_SPECS, isDocsOperation, } from './docs-
|
|
|
39
39
|
export type { DocsOperation, DocsParamType, DocsParamSlot, DocsParamSpec, DocsOperationSpec, } from './docs-operations';
|
|
40
40
|
export { DOCS_TOOLKIT_SPECS, DOCS_TOOLKIT_BY_TOOL_NAME, DOCS_TOOLKIT_DEFAULTABLE, } from './docs-toolkit';
|
|
41
41
|
export type { DocsToolkitSpec, DocsToolkitParameter, } from './docs-toolkit';
|
|
42
|
+
export type { LlmProvider, LlmProviderOption, LlmModelOption, } from './llm-models';
|
|
43
|
+
export { LLM_PROVIDERS, LLM_MODELS, MODEL_CONTEXT_WINDOWS, getModelsFor, getDefaultModel, getModelLabel, } from './llm-models';
|
|
42
44
|
export type { CredentialTypeRegistration, CredentialType } from './credentials';
|
|
43
45
|
export { CREDENTIAL_TYPES, CREDENTIAL_TYPE_VALUES, credentialTypeValues, getCredentialType, isCredentialType, } from './credentials';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TELEGRAM_TOOLKIT_SPECS = exports.isTelegramOperation = exports.TELEGRAM_OPERATION_SPECS = exports.TELEGRAM_OPERATIONS = exports.DRIVE_TOOLKIT_BY_TOOL_NAME = exports.DRIVE_TOOLKIT_SPECS = exports.isDriveOperation = exports.DRIVE_OPERATION_SPECS = exports.DRIVE_OPERATIONS = exports.GOOGLE_CALENDAR_TOOLKIT_BY_TOOL_NAME = exports.GOOGLE_CALENDAR_TOOLKIT_SPECS = exports.isGoogleCalendarOperation = exports.GOOGLE_CALENDAR_OPERATION_SPECS = exports.GOOGLE_CALENDAR_OPERATIONS = exports.isGmailOperation = exports.resolveGmailSendFields = exports.GMAIL_SEND_LEGACY_FIELDS = exports.NATIVE_EMAIL_TOOLKIT_BY_TOOL_NAME = exports.GMAIL_TOOLKIT_BY_TOOL_NAME = exports.NATIVE_EMAIL_TOOLKIT_SPECS = exports.GMAIL_SEND_AND_WAIT_TOOL_SPEC = exports.GMAIL_ALL_TOOLKIT_SPECS = exports.GMAIL_TOOLKIT_SPECS = exports.GMAIL_TOOLKIT_OPERATIONS = exports.GMAIL_DROPDOWN_OPERATIONS = exports.GMAIL_OPERATION_GROUPS = exports.GMAIL_OPERATION_SPECS = exports.GMAIL_OPERATIONS = exports.NODE_TYPE_TO_PREFIX = exports.PREFIX_TO_NODE_TYPE = exports.NODE_STATE_KEYS = exports.NODE_COLORS = exports.NODE_DETAIL_PATHS = exports.getNodeRegistryEntry = exports.NODE_REGISTRY = exports.getNodeDispatchConfig = exports.getAllNodeCollections = exports.NODE_DISPATCH = exports.resolveNodeId = exports.PREFIX_TO_TYPE = exports.NODE_UI = exports.ALL_NODE_TYPES = exports.isNodeType = exports.isTerminal = exports.canSendToNodes = exports.canReceiveFromNodes = exports.canReceiveFrom = exports.NODE_CONNECTIONS = exports.iterableMeta = exports.singleMeta = void 0;
|
|
4
|
-
exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.DOCS_TOOLKIT_DEFAULTABLE = exports.DOCS_TOOLKIT_BY_TOOL_NAME = exports.DOCS_TOOLKIT_SPECS = exports.isDocsOperation = exports.DOCS_OPERATION_SPECS = exports.DOCS_OPERATIONS = exports.isMongoOperation = exports.MONGO_OPERATION_SPECS = exports.MONGO_OPERATIONS = exports.isPostgresOperation = exports.POSTGRES_OPERATION_SPECS = exports.POSTGRES_MODES = exports.POSTGRES_OPERATIONS = exports.isGoogleContactsOperation = exports.GOOGLE_CONTACTS_DEFAULT_PERSON_FIELDS = exports.GOOGLE_CONTACTS_OPERATION_GROUPS = exports.GOOGLE_CONTACTS_OPERATION_SPECS = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = exports.GOOGLE_CONTACTS_OPERATIONS = exports.SHEETS_TOOLKIT_DEFAULTABLE = exports.SHEETS_TOOLKIT_BY_TOOL_NAME = exports.SHEETS_TOOLKIT_SPECS = exports.isSheetsOperation = exports.SHEETS_OPERATION_SPECS = exports.SHEETS_OPERATIONS = exports.isSlackOperation = exports.SLACK_OPERATION_SPECS = exports.SLACK_OPERATIONS = exports.isDiscordOperation = exports.DISCORD_OPERATION_SPECS = exports.DISCORD_OPERATIONS = exports.isWhatsAppOperation = exports.WHATSAPP_OPERATIONS = exports.TELEGRAM_TOOLKIT_BY_TOOL_NAME = void 0;
|
|
4
|
+
exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.getModelLabel = exports.getDefaultModel = exports.getModelsFor = exports.MODEL_CONTEXT_WINDOWS = exports.LLM_MODELS = exports.LLM_PROVIDERS = exports.DOCS_TOOLKIT_DEFAULTABLE = exports.DOCS_TOOLKIT_BY_TOOL_NAME = exports.DOCS_TOOLKIT_SPECS = exports.isDocsOperation = exports.DOCS_OPERATION_SPECS = exports.DOCS_OPERATIONS = exports.isMongoOperation = exports.MONGO_OPERATION_SPECS = exports.MONGO_OPERATIONS = exports.isPostgresOperation = exports.POSTGRES_OPERATION_SPECS = exports.POSTGRES_MODES = exports.POSTGRES_OPERATIONS = exports.isGoogleContactsOperation = exports.GOOGLE_CONTACTS_DEFAULT_PERSON_FIELDS = exports.GOOGLE_CONTACTS_OPERATION_GROUPS = exports.GOOGLE_CONTACTS_OPERATION_SPECS = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = exports.GOOGLE_CONTACTS_OPERATIONS = exports.SHEETS_TOOLKIT_DEFAULTABLE = exports.SHEETS_TOOLKIT_BY_TOOL_NAME = exports.SHEETS_TOOLKIT_SPECS = exports.isSheetsOperation = exports.SHEETS_OPERATION_SPECS = exports.SHEETS_OPERATIONS = exports.isSlackOperation = exports.SLACK_OPERATION_SPECS = exports.SLACK_OPERATIONS = exports.isDiscordOperation = exports.DISCORD_OPERATION_SPECS = exports.DISCORD_OPERATIONS = exports.isWhatsAppOperation = exports.WHATSAPP_OPERATIONS = exports.TELEGRAM_TOOLKIT_BY_TOOL_NAME = void 0;
|
|
5
5
|
var types_1 = require("./types");
|
|
6
6
|
Object.defineProperty(exports, "singleMeta", { enumerable: true, get: function () { return types_1.singleMeta; } });
|
|
7
7
|
Object.defineProperty(exports, "iterableMeta", { enumerable: true, get: function () { return types_1.iterableMeta; } });
|
|
@@ -113,6 +113,13 @@ var docs_toolkit_1 = require("./docs-toolkit");
|
|
|
113
113
|
Object.defineProperty(exports, "DOCS_TOOLKIT_SPECS", { enumerable: true, get: function () { return docs_toolkit_1.DOCS_TOOLKIT_SPECS; } });
|
|
114
114
|
Object.defineProperty(exports, "DOCS_TOOLKIT_BY_TOOL_NAME", { enumerable: true, get: function () { return docs_toolkit_1.DOCS_TOOLKIT_BY_TOOL_NAME; } });
|
|
115
115
|
Object.defineProperty(exports, "DOCS_TOOLKIT_DEFAULTABLE", { enumerable: true, get: function () { return docs_toolkit_1.DOCS_TOOLKIT_DEFAULTABLE; } });
|
|
116
|
+
var llm_models_1 = require("./llm-models");
|
|
117
|
+
Object.defineProperty(exports, "LLM_PROVIDERS", { enumerable: true, get: function () { return llm_models_1.LLM_PROVIDERS; } });
|
|
118
|
+
Object.defineProperty(exports, "LLM_MODELS", { enumerable: true, get: function () { return llm_models_1.LLM_MODELS; } });
|
|
119
|
+
Object.defineProperty(exports, "MODEL_CONTEXT_WINDOWS", { enumerable: true, get: function () { return llm_models_1.MODEL_CONTEXT_WINDOWS; } });
|
|
120
|
+
Object.defineProperty(exports, "getModelsFor", { enumerable: true, get: function () { return llm_models_1.getModelsFor; } });
|
|
121
|
+
Object.defineProperty(exports, "getDefaultModel", { enumerable: true, get: function () { return llm_models_1.getDefaultModel; } });
|
|
122
|
+
Object.defineProperty(exports, "getModelLabel", { enumerable: true, get: function () { return llm_models_1.getModelLabel; } });
|
|
116
123
|
var credentials_1 = require("./credentials");
|
|
117
124
|
Object.defineProperty(exports, "CREDENTIAL_TYPES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPES; } });
|
|
118
125
|
Object.defineProperty(exports, "CREDENTIAL_TYPE_VALUES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPE_VALUES; } });
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical LLM provider + model catalog. Single source of truth for
|
|
3
|
+
* every place that names a model, used by:
|
|
4
|
+
*
|
|
5
|
+
* - dashboard pickers: AI nodes, LLM credentials, voice agents
|
|
6
|
+
* - api defaults: the AI node's `model` @Prop, the cheap model the
|
|
7
|
+
* tool generator and the fact extractor pick per provider
|
|
8
|
+
* - api summarization: context windows drive the chunk size
|
|
9
|
+
*
|
|
10
|
+
* It lived in `dashboard/lib/llm-models.ts` until 2026-08-18, with a
|
|
11
|
+
* comment arguing model strings were "dashboard chrome only". They were
|
|
12
|
+
* not: the api had its own hardcoded copies and nothing synced them. The
|
|
13
|
+
* picker offered `claude-haiku-4-5` while the api minted nodes on
|
|
14
|
+
* `claude-sonnet-4-20250514`, retired two months earlier. Same class of
|
|
15
|
+
* bug `credentials.ts` exists to kill — both sides import one list now.
|
|
16
|
+
*
|
|
17
|
+
* NOT here: the models HostWebhook runs on its own key (see the api's
|
|
18
|
+
* `common/llm-models.ts`) and the voice-platform catalogs. Retell and
|
|
19
|
+
* Vapi accept their own spellings — Retell says `claude-5-sonnet`, Vapi
|
|
20
|
+
* demands the dated Haiku id — so those live with their backends and
|
|
21
|
+
* follow the platform's docs, not the provider's.
|
|
22
|
+
*
|
|
23
|
+
* Last verified against provider docs: 2026-08-18
|
|
24
|
+
* - Anthropic: https://platform.claude.com/docs/en/about-claude/models/overview
|
|
25
|
+
* - OpenAI: https://developers.openai.com/api/docs/models
|
|
26
|
+
* - Google: https://ai.google.dev/gemini-api/docs/models
|
|
27
|
+
* - Groq: https://console.groq.com/docs/models
|
|
28
|
+
*/
|
|
29
|
+
export type LlmProvider = 'anthropic' | 'openai' | 'google' | 'groq';
|
|
30
|
+
export interface LlmProviderOption {
|
|
31
|
+
value: LlmProvider;
|
|
32
|
+
label: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LlmModelOption {
|
|
35
|
+
value: string;
|
|
36
|
+
/** Friendly label for pickers; defaults to `value` when absent. */
|
|
37
|
+
label?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The suggested default for new selections — exactly one per provider.
|
|
40
|
+
*
|
|
41
|
+
* It carries more weight than "preselected in a dropdown": the api
|
|
42
|
+
* reads it through `getDefaultModel` for the model a new AI node is
|
|
43
|
+
* born with, and for the cheap model it picks when generating a tool
|
|
44
|
+
* definition or extracting memory facts. So the recommended entry must
|
|
45
|
+
* be the cheapest CURRENT-tier model of that provider — pick a
|
|
46
|
+
* flagship here and every background call gets expensive at once.
|
|
47
|
+
*/
|
|
48
|
+
recommended?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare const LLM_PROVIDERS: ReadonlyArray<LlmProviderOption>;
|
|
51
|
+
export declare const LLM_MODELS: Record<LlmProvider, ReadonlyArray<LlmModelOption>>;
|
|
52
|
+
/**
|
|
53
|
+
* Effective context window per model, in TOKENS. The api sizes
|
|
54
|
+
* summarization chunks from this; a miss falls back to a conservative
|
|
55
|
+
* 32k window, which still produces a summary — just chopped into far
|
|
56
|
+
* more map calls than needed. That silence is why this table went four
|
|
57
|
+
* months without a single current model in it.
|
|
58
|
+
*
|
|
59
|
+
* Includes ids the pickers no longer offer: the AI node's model field is
|
|
60
|
+
* a free-text datalist, so a node may hold one by hand.
|
|
61
|
+
*/
|
|
62
|
+
export declare const MODEL_CONTEXT_WINDOWS: Record<string, number>;
|
|
63
|
+
/**
|
|
64
|
+
* The model catalog for a provider. Accepts both the raw provider name
|
|
65
|
+
* (`"anthropic"`) and the `llm_*` credential type prefix
|
|
66
|
+
* (`"llm_anthropic"`) so call sites that key off credential type can
|
|
67
|
+
* pass the type directly without stripping.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getModelsFor(provider: string): ReadonlyArray<LlmModelOption>;
|
|
70
|
+
/**
|
|
71
|
+
* The suggested default model for a provider, or `''` for one we do not
|
|
72
|
+
* catalog (Ollama runs whatever the user pulled, so it has no entry —
|
|
73
|
+
* callers fall back to the node's own model there).
|
|
74
|
+
*/
|
|
75
|
+
export declare function getDefaultModel(provider: string): string;
|
|
76
|
+
/** The friendly label for a model value, or the value itself. */
|
|
77
|
+
export declare function getModelLabel(value: string): string;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Canonical LLM provider + model catalog. Single source of truth for
|
|
4
|
+
* every place that names a model, used by:
|
|
5
|
+
*
|
|
6
|
+
* - dashboard pickers: AI nodes, LLM credentials, voice agents
|
|
7
|
+
* - api defaults: the AI node's `model` @Prop, the cheap model the
|
|
8
|
+
* tool generator and the fact extractor pick per provider
|
|
9
|
+
* - api summarization: context windows drive the chunk size
|
|
10
|
+
*
|
|
11
|
+
* It lived in `dashboard/lib/llm-models.ts` until 2026-08-18, with a
|
|
12
|
+
* comment arguing model strings were "dashboard chrome only". They were
|
|
13
|
+
* not: the api had its own hardcoded copies and nothing synced them. The
|
|
14
|
+
* picker offered `claude-haiku-4-5` while the api minted nodes on
|
|
15
|
+
* `claude-sonnet-4-20250514`, retired two months earlier. Same class of
|
|
16
|
+
* bug `credentials.ts` exists to kill — both sides import one list now.
|
|
17
|
+
*
|
|
18
|
+
* NOT here: the models HostWebhook runs on its own key (see the api's
|
|
19
|
+
* `common/llm-models.ts`) and the voice-platform catalogs. Retell and
|
|
20
|
+
* Vapi accept their own spellings — Retell says `claude-5-sonnet`, Vapi
|
|
21
|
+
* demands the dated Haiku id — so those live with their backends and
|
|
22
|
+
* follow the platform's docs, not the provider's.
|
|
23
|
+
*
|
|
24
|
+
* Last verified against provider docs: 2026-08-18
|
|
25
|
+
* - Anthropic: https://platform.claude.com/docs/en/about-claude/models/overview
|
|
26
|
+
* - OpenAI: https://developers.openai.com/api/docs/models
|
|
27
|
+
* - Google: https://ai.google.dev/gemini-api/docs/models
|
|
28
|
+
* - Groq: https://console.groq.com/docs/models
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.MODEL_CONTEXT_WINDOWS = exports.LLM_MODELS = exports.LLM_PROVIDERS = void 0;
|
|
32
|
+
exports.getModelsFor = getModelsFor;
|
|
33
|
+
exports.getDefaultModel = getDefaultModel;
|
|
34
|
+
exports.getModelLabel = getModelLabel;
|
|
35
|
+
exports.LLM_PROVIDERS = [
|
|
36
|
+
{ value: 'anthropic', label: 'Anthropic' },
|
|
37
|
+
{ value: 'openai', label: 'OpenAI' },
|
|
38
|
+
{ value: 'google', label: 'Google' },
|
|
39
|
+
{ value: 'groq', label: 'Groq' },
|
|
40
|
+
];
|
|
41
|
+
exports.LLM_MODELS = {
|
|
42
|
+
// ── Anthropic ──────────────────────────────────────────────────────────
|
|
43
|
+
// Current tier (Aug 2026): Fable 5, Opus 5, Sonnet 5, Haiku 4.5. The 4.x
|
|
44
|
+
// Opus/Sonnet line is still served but sits under "legacy" in the docs.
|
|
45
|
+
// Haiku 4.5 stays recommended: the only current-tier model in the
|
|
46
|
+
// $1/MTok bracket, so new nodes keep their cost profile.
|
|
47
|
+
// claude-sonnet-4-20250514 + claude-opus-4-20250514 retired 2026-06-15.
|
|
48
|
+
// claude-mythos-5 is omitted on purpose — invitation-only (Glasswing).
|
|
49
|
+
anthropic: [
|
|
50
|
+
{ value: 'claude-haiku-4-5', label: 'Claude Haiku 4.5', recommended: true },
|
|
51
|
+
{ value: 'claude-sonnet-5', label: 'Claude Sonnet 5' },
|
|
52
|
+
{ value: 'claude-opus-5', label: 'Claude Opus 5' },
|
|
53
|
+
{ value: 'claude-fable-5', label: 'Claude Fable 5' },
|
|
54
|
+
{ value: 'claude-opus-4-8', label: 'Claude Opus 4.8 (legacy)' },
|
|
55
|
+
{ value: 'claude-opus-4-7', label: 'Claude Opus 4.7 (legacy)' },
|
|
56
|
+
{ value: 'claude-opus-4-6', label: 'Claude Opus 4.6 (legacy)' },
|
|
57
|
+
{ value: 'claude-sonnet-4-6', label: 'Claude Sonnet 4.6 (legacy)' },
|
|
58
|
+
],
|
|
59
|
+
// ── OpenAI ─────────────────────────────────────────────────────────────
|
|
60
|
+
// GPT-5.6 (Sol / Terra / Luna) is the current frontier family, released
|
|
61
|
+
// 2026-07-09. Luna is the cheap tier and the recommended default. 5.5 /
|
|
62
|
+
// 5.4-mini / 4o are still served but no longer listed as frontier, so
|
|
63
|
+
// they are kept only so existing nodes keep a friendly label.
|
|
64
|
+
// o1 removed — shut down 2025-07-28.
|
|
65
|
+
openai: [
|
|
66
|
+
{ value: 'gpt-5.6-luna', label: 'GPT-5.6 Luna', recommended: true },
|
|
67
|
+
{ value: 'gpt-5.6-terra', label: 'GPT-5.6 Terra' },
|
|
68
|
+
{ value: 'gpt-5.6-sol', label: 'GPT-5.6 Sol' },
|
|
69
|
+
{ value: 'gpt-5.5', label: 'GPT-5.5 (legacy)' },
|
|
70
|
+
{ value: 'gpt-5.4-mini', label: 'GPT-5.4 mini (legacy)' },
|
|
71
|
+
{ value: 'gpt-4o', label: 'GPT-4o (legacy)' },
|
|
72
|
+
{ value: 'gpt-4o-mini', label: 'GPT-4o mini (legacy)' },
|
|
73
|
+
],
|
|
74
|
+
// ── Google Gemini ──────────────────────────────────────────────────────
|
|
75
|
+
// The 3.x line went stable: 3.7/3.6/3.5 Flash and 3.1 Flash Lite no
|
|
76
|
+
// longer carry a -preview suffix. 3.5 Flash Lite is the cheapest current
|
|
77
|
+
// tier and the recommended default.
|
|
78
|
+
// gemini-3.1-flash-lite-preview and gemini-3-pro-preview were shut down —
|
|
79
|
+
// the first one used to be our default, so nodes still on it fail until
|
|
80
|
+
// the user repicks.
|
|
81
|
+
google: [
|
|
82
|
+
{
|
|
83
|
+
value: 'gemini-3.5-flash-lite',
|
|
84
|
+
label: 'Gemini 3.5 Flash Lite',
|
|
85
|
+
recommended: true,
|
|
86
|
+
},
|
|
87
|
+
{ value: 'gemini-3.7-flash', label: 'Gemini 3.7 Flash' },
|
|
88
|
+
{ value: 'gemini-3.6-flash', label: 'Gemini 3.6 Flash' },
|
|
89
|
+
{ value: 'gemini-3.5-flash', label: 'Gemini 3.5 Flash' },
|
|
90
|
+
{ value: 'gemini-3.1-flash-lite', label: 'Gemini 3.1 Flash Lite' },
|
|
91
|
+
{ value: 'gemini-3.1-pro-preview', label: 'Gemini 3.1 Pro (preview)' },
|
|
92
|
+
{ value: 'gemini-2.5-flash', label: 'Gemini 2.5 Flash (legacy)' },
|
|
93
|
+
{ value: 'gemini-2.5-flash-lite', label: 'Gemini 2.5 Flash Lite (legacy)' },
|
|
94
|
+
{ value: 'gemini-2.5-pro', label: 'Gemini 2.5 Pro (legacy)' },
|
|
95
|
+
],
|
|
96
|
+
// ── Groq ───────────────────────────────────────────────────────────────
|
|
97
|
+
// llama-3.1-8b-instant + llama-3.3-70b-versatile were retired 2026-08-16
|
|
98
|
+
// for free/developer tiers — removed. The first one was our recommended
|
|
99
|
+
// default, so nodes still on it fail until the user repicks.
|
|
100
|
+
// Groq's own replacements: 8b-instant → gpt-oss-20b, 70b-versatile →
|
|
101
|
+
// gpt-oss-120b or qwen3.6-27b.
|
|
102
|
+
groq: [
|
|
103
|
+
{ value: 'openai/gpt-oss-20b', label: 'GPT OSS 20B', recommended: true },
|
|
104
|
+
{ value: 'openai/gpt-oss-120b', label: 'GPT OSS 120B' },
|
|
105
|
+
{ value: 'groq/compound', label: 'Compound' },
|
|
106
|
+
{ value: 'groq/compound-mini', label: 'Compound Mini' },
|
|
107
|
+
{ value: 'qwen/qwen3.6-27b', label: 'Qwen 3.6 27B (preview)' },
|
|
108
|
+
],
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Effective context window per model, in TOKENS. The api sizes
|
|
112
|
+
* summarization chunks from this; a miss falls back to a conservative
|
|
113
|
+
* 32k window, which still produces a summary — just chopped into far
|
|
114
|
+
* more map calls than needed. That silence is why this table went four
|
|
115
|
+
* months without a single current model in it.
|
|
116
|
+
*
|
|
117
|
+
* Includes ids the pickers no longer offer: the AI node's model field is
|
|
118
|
+
* a free-text datalist, so a node may hold one by hand.
|
|
119
|
+
*/
|
|
120
|
+
exports.MODEL_CONTEXT_WINDOWS = {
|
|
121
|
+
// Anthropic — the 4.6 generation onward is 1M; Haiku and the 4.5 line
|
|
122
|
+
// stay at 200k. Retired ids left out: claude-sonnet-4-20250514 and
|
|
123
|
+
// claude-opus-4-1 (both gone 2026-06-15).
|
|
124
|
+
'claude-fable-5': 1000000,
|
|
125
|
+
'claude-opus-5': 1000000,
|
|
126
|
+
'claude-sonnet-5': 1000000,
|
|
127
|
+
'claude-haiku-4-5': 200000,
|
|
128
|
+
'claude-opus-4-8': 1000000,
|
|
129
|
+
'claude-opus-4-7': 1000000,
|
|
130
|
+
'claude-opus-4-6': 1000000,
|
|
131
|
+
'claude-sonnet-4-6': 1000000,
|
|
132
|
+
'claude-sonnet-4-5': 200000,
|
|
133
|
+
'claude-opus-4-5': 200000,
|
|
134
|
+
// OpenAI — the GPT-5.6 family is 1.05M. 'gpt-5.6' is the documented
|
|
135
|
+
// alias for Sol, so it needs its own key: the prefix fallback in the
|
|
136
|
+
// api stems on three dash-segments and would not reach 'gpt-5.6-sol'.
|
|
137
|
+
'gpt-5.6': 1050000,
|
|
138
|
+
'gpt-5.6-sol': 1050000,
|
|
139
|
+
'gpt-5.6-terra': 1050000,
|
|
140
|
+
'gpt-5.6-luna': 1050000,
|
|
141
|
+
'gpt-4o': 128000,
|
|
142
|
+
'gpt-4o-mini': 128000,
|
|
143
|
+
'gpt-4-turbo': 128000,
|
|
144
|
+
'gpt-4.1': 1000000,
|
|
145
|
+
// Google — the whole Gemini 3.x line is 1M. gemini-2.0-flash left out
|
|
146
|
+
// (shut down). 2.5 Pro is its real 1M input limit, not the 2M the api
|
|
147
|
+
// used to claim — that produced chunks the model would reject.
|
|
148
|
+
'gemini-3.7-flash': 1000000,
|
|
149
|
+
'gemini-3.6-flash': 1000000,
|
|
150
|
+
'gemini-3.5-flash': 1000000,
|
|
151
|
+
'gemini-3.5-flash-lite': 1000000,
|
|
152
|
+
'gemini-3.1-flash-lite': 1000000,
|
|
153
|
+
'gemini-3.1-pro-preview': 1000000,
|
|
154
|
+
'gemini-2.5-pro': 1000000,
|
|
155
|
+
'gemini-2.5-flash': 1000000,
|
|
156
|
+
'gemini-2.5-flash-lite': 1000000,
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* The model catalog for a provider. Accepts both the raw provider name
|
|
160
|
+
* (`"anthropic"`) and the `llm_*` credential type prefix
|
|
161
|
+
* (`"llm_anthropic"`) so call sites that key off credential type can
|
|
162
|
+
* pass the type directly without stripping.
|
|
163
|
+
*/
|
|
164
|
+
function getModelsFor(provider) {
|
|
165
|
+
const key = provider.replace(/^llm_/, '');
|
|
166
|
+
return exports.LLM_MODELS[key] ?? [];
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The suggested default model for a provider, or `''` for one we do not
|
|
170
|
+
* catalog (Ollama runs whatever the user pulled, so it has no entry —
|
|
171
|
+
* callers fall back to the node's own model there).
|
|
172
|
+
*/
|
|
173
|
+
function getDefaultModel(provider) {
|
|
174
|
+
const models = getModelsFor(provider);
|
|
175
|
+
const recommended = models.find((m) => m.recommended);
|
|
176
|
+
return recommended?.value ?? models[0]?.value ?? '';
|
|
177
|
+
}
|
|
178
|
+
/** The friendly label for a model value, or the value itself. */
|
|
179
|
+
function getModelLabel(value) {
|
|
180
|
+
for (const models of Object.values(exports.LLM_MODELS)) {
|
|
181
|
+
const found = models.find((m) => m.value === value);
|
|
182
|
+
if (found?.label)
|
|
183
|
+
return found.label;
|
|
184
|
+
}
|
|
185
|
+
return value;
|
|
186
|
+
}
|
package/dist/ui.js
CHANGED
|
@@ -8,10 +8,16 @@ exports.PREFIX_TO_TYPE = exports.NODE_UI = void 0;
|
|
|
8
8
|
exports.resolveNodeId = resolveNodeId;
|
|
9
9
|
exports.NODE_UI = {
|
|
10
10
|
// ── Source nodes ──
|
|
11
|
+
// Una fuente arranca el flujo: `fromNodes: false` significa que nada puede
|
|
12
|
+
// conectarse HACIA ella, y por eso su DTO en la API tampoco declara
|
|
13
|
+
// `inputNodes`. Expone un único punto de salida, `right-out`. El de abajo se
|
|
14
|
+
// retiró porque no aportaba una segunda semántica — sólo una segunda diana
|
|
15
|
+
// donde soltar aristas. `router` sí conserva el suyo: ahí, abajo significa
|
|
16
|
+
// "por regla".
|
|
11
17
|
webhook: { fromNodes: true, toNodes: true, isSource: true },
|
|
12
|
-
scheduledWorkflow: { fromNodes: false, toNodes: true, isSource: true, outputHandles: ['right'
|
|
18
|
+
scheduledWorkflow: { fromNodes: false, toNodes: true, isSource: true, outputHandles: ['right'], dotHandles: { output: ['right-out'] } },
|
|
13
19
|
chatTrigger: { fromNodes: false, toNodes: true, isSource: true, outputHandles: ['right'], dotHandles: { output: ['right-out'] } },
|
|
14
|
-
trigger: { fromNodes: false, toNodes: true, isSource: true, outputHandles: ['right'
|
|
20
|
+
trigger: { fromNodes: false, toNodes: true, isSource: true, outputHandles: ['right'], dotHandles: { output: ['right-out'] } },
|
|
15
21
|
// Voice Agent: dynamicOutputs=true tells NodeShell to derive ONE
|
|
16
22
|
// output handle per non-disabled `entity.tools[i].name`. The
|
|
17
23
|
// `right-out` fallback handle is rendered when the agent has zero
|
package/package.json
CHANGED