sim-setup 1.0.10-preview.96.1 → 1.0.10-preview.97.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.js +233 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -727,7 +727,8 @@ function getProviderFields(provider) {
|
|
|
727
727
|
return unique(providerKeys(provider));
|
|
728
728
|
}
|
|
729
729
|
function providerIsActive(provider, values) {
|
|
730
|
-
|
|
730
|
+
const activated = provider.activation.mode === "enabled" ? isTruthyValue(values, provider.activation.key) : provider.activation.keys.some((key) => hasValue(values, key));
|
|
731
|
+
return activated && (provider.activeWhen?.(values) ?? true);
|
|
731
732
|
}
|
|
732
733
|
function capabilityKeys(definition) {
|
|
733
734
|
return [
|
|
@@ -1071,10 +1072,11 @@ function findFieldRequirement(requirement, key) {
|
|
|
1071
1072
|
}
|
|
1072
1073
|
return null;
|
|
1073
1074
|
}
|
|
1074
|
-
function validateCapabilityFieldInput(definition, key, value) {
|
|
1075
|
+
function validateCapabilityFieldInput(definition, key, value, providerId) {
|
|
1075
1076
|
if (!value)
|
|
1076
1077
|
return "required";
|
|
1077
|
-
|
|
1078
|
+
const providers = providerId ? definition.providers.filter((provider) => provider.id === providerId) : definition.providers;
|
|
1079
|
+
for (const provider of providers) {
|
|
1078
1080
|
const field = findFieldRequirement(provider.requires, key) ?? provider.optionalFields?.find((candidate) => candidate.key === key);
|
|
1079
1081
|
if (!field)
|
|
1080
1082
|
continue;
|
|
@@ -1083,6 +1085,8 @@ function validateCapabilityFieldInput(definition, key, value) {
|
|
|
1083
1085
|
}
|
|
1084
1086
|
return field.validation.message;
|
|
1085
1087
|
}
|
|
1088
|
+
if (providerId)
|
|
1089
|
+
return;
|
|
1086
1090
|
throw new Error(`${definition.label} has no validation definition for ${key}`);
|
|
1087
1091
|
}
|
|
1088
1092
|
function validateRedisProvider(values) {
|
|
@@ -1105,6 +1109,42 @@ function validateRedisProvider(values) {
|
|
|
1105
1109
|
}
|
|
1106
1110
|
return [];
|
|
1107
1111
|
}
|
|
1112
|
+
function validateEmbeddingModelWidth(values) {
|
|
1113
|
+
const model = String(readValue(values, "KB_EMBEDDING_MODEL") ?? "");
|
|
1114
|
+
const rawWidth = readValue(values, "EMBEDDING_OUTPUT_DIMS");
|
|
1115
|
+
if (!hasValue(values, "EMBEDDING_OUTPUT_DIMS"))
|
|
1116
|
+
return [];
|
|
1117
|
+
const widths = KB_EMBEDDING_MODEL_WIDTHS[model];
|
|
1118
|
+
if (!widths)
|
|
1119
|
+
return [];
|
|
1120
|
+
if (widths.includes(Number(String(rawWidth).trim())))
|
|
1121
|
+
return [];
|
|
1122
|
+
return [
|
|
1123
|
+
{
|
|
1124
|
+
kind: "invalid",
|
|
1125
|
+
fields: ["EMBEDDING_OUTPUT_DIMS"],
|
|
1126
|
+
message: `EMBEDDING_OUTPUT_DIMS must be one of ${widths.join(", ")} for ${model}`
|
|
1127
|
+
}
|
|
1128
|
+
];
|
|
1129
|
+
}
|
|
1130
|
+
function knowledgeEmbeddingFamily(values) {
|
|
1131
|
+
const model = String(readValue(values, "KB_EMBEDDING_MODEL") ?? "");
|
|
1132
|
+
if (model.startsWith(OLLAMA_EMBEDDING_MODEL_PREFIX)) {
|
|
1133
|
+
return model.length > OLLAMA_EMBEDDING_MODEL_PREFIX.length ? "ollama" : "openai";
|
|
1134
|
+
}
|
|
1135
|
+
if (GEMINI_KB_EMBEDDING_MODELS.includes(model))
|
|
1136
|
+
return "gemini";
|
|
1137
|
+
return "openai";
|
|
1138
|
+
}
|
|
1139
|
+
function embeddingOutputDimsField(widths) {
|
|
1140
|
+
return envField("EMBEDDING_OUTPUT_DIMS", {
|
|
1141
|
+
validation: {
|
|
1142
|
+
kind: "pattern",
|
|
1143
|
+
pattern: new RegExp(`^(${widths.join("|")})$`),
|
|
1144
|
+
message: `must be one of ${widths.join(", ")}`
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1108
1148
|
function resolveOAuthClientCapabilityId(serviceId) {
|
|
1109
1149
|
const normalized = serviceId.toLowerCase().replace(/_/g, "-");
|
|
1110
1150
|
if (GOOGLE_OAUTH_SERVICES.has(normalized))
|
|
@@ -1142,7 +1182,7 @@ function inspectOAuthClientCapability(providerId, values) {
|
|
|
1142
1182
|
setupCommand: `npx sim-setup add integration ${providerId}`
|
|
1143
1183
|
};
|
|
1144
1184
|
}
|
|
1145
|
-
var CORE_CONFIGURATION_KEYS, EnvCapabilityConfigurationError, EMAIL_CAPABILITY, STORAGE_CAPABILITY, SANDBOX_CAPABILITY, ASYNC_JOBS_CAPABILITY, CACHE_CAPABILITY, OCR_CAPABILITY, KNOWLEDGE_EMBEDDINGS_CAPABILITY, OAUTH_CLIENT_CAPABILITIES, ENV_CAPABILITIES, LLM_KEY_POOLS, DEPLOYMENT_CONFIGURATION_KEYS, GOOGLE_OAUTH_SERVICES, MICROSOFT_OAUTH_SERVICES;
|
|
1185
|
+
var CORE_CONFIGURATION_KEYS, EnvCapabilityConfigurationError, EMAIL_CAPABILITY, STORAGE_CAPABILITY, SANDBOX_CAPABILITY, ASYNC_JOBS_CAPABILITY, CACHE_CAPABILITY, OCR_CAPABILITY, OLLAMA_EMBEDDING_MODEL_PREFIX = "ollama/", KB_EMBEDDING_MODEL_WIDTHS, GEMINI_KB_EMBEDDING_MODELS, embeddingFamilyIs = (family) => (values) => knowledgeEmbeddingFamily(values) === family, OPENAI_EMBEDDING_WIDTHS, GEMINI_EMBEDDING_WIDTHS, OLLAMA_EMBEDDING_WIDTHS, KNOWLEDGE_EMBEDDINGS_CAPABILITY, OAUTH_CLIENT_CAPABILITIES, ENV_CAPABILITIES, LLM_KEY_POOLS, DEPLOYMENT_CONFIGURATION_KEYS, GOOGLE_OAUTH_SERVICES, MICROSOFT_OAUTH_SERVICES;
|
|
1146
1186
|
var init_env_capabilities = __esm(() => {
|
|
1147
1187
|
init_sandbox_references();
|
|
1148
1188
|
CORE_CONFIGURATION_KEYS = [
|
|
@@ -1412,6 +1452,15 @@ var init_env_capabilities = __esm(() => {
|
|
|
1412
1452
|
}
|
|
1413
1453
|
]
|
|
1414
1454
|
});
|
|
1455
|
+
KB_EMBEDDING_MODEL_WIDTHS = {
|
|
1456
|
+
"text-embedding-3-small": [1536, 1024, 768],
|
|
1457
|
+
"text-embedding-3-large": [3072, 1536, 1024, 768],
|
|
1458
|
+
"gemini-embedding-001": [3072, 1536, 768]
|
|
1459
|
+
};
|
|
1460
|
+
GEMINI_KB_EMBEDDING_MODELS = ["gemini-embedding-001"];
|
|
1461
|
+
OPENAI_EMBEDDING_WIDTHS = [768, 1024, 1536, 3072];
|
|
1462
|
+
GEMINI_EMBEDDING_WIDTHS = [768, 1536, 3072];
|
|
1463
|
+
OLLAMA_EMBEDDING_WIDTHS = [384, 768, 1024, 1536, 3072];
|
|
1415
1464
|
KNOWLEDGE_EMBEDDINGS_CAPABILITY = defineCapability({
|
|
1416
1465
|
strategy: "fallback",
|
|
1417
1466
|
id: "knowledge-embeddings",
|
|
@@ -1424,6 +1473,7 @@ var init_env_capabilities = __esm(() => {
|
|
|
1424
1473
|
mode: "any-present",
|
|
1425
1474
|
keys: ["AZURE_OPENAI_API_KEY", "AZURE_OPENAI_ENDPOINT", "AZURE_OPENAI_API_VERSION"]
|
|
1426
1475
|
},
|
|
1476
|
+
activeWhen: embeddingFamilyIs("openai"),
|
|
1427
1477
|
requires: allOf(envField("AZURE_OPENAI_API_KEY"), envField("AZURE_OPENAI_ENDPOINT", {
|
|
1428
1478
|
validation: {
|
|
1429
1479
|
kind: "url",
|
|
@@ -1431,7 +1481,12 @@ var init_env_capabilities = __esm(() => {
|
|
|
1431
1481
|
message: "must be a valid HTTP(S) URL"
|
|
1432
1482
|
}
|
|
1433
1483
|
}), envField("AZURE_OPENAI_API_VERSION")),
|
|
1434
|
-
optionalFields: [
|
|
1484
|
+
optionalFields: [
|
|
1485
|
+
envField("KB_OPENAI_MODEL_NAME"),
|
|
1486
|
+
envField("KB_EMBEDDING_MODEL"),
|
|
1487
|
+
embeddingOutputDimsField(OPENAI_EMBEDDING_WIDTHS)
|
|
1488
|
+
],
|
|
1489
|
+
validate: validateEmbeddingModelWidth
|
|
1435
1490
|
},
|
|
1436
1491
|
{
|
|
1437
1492
|
id: "openai",
|
|
@@ -1440,13 +1495,57 @@ var init_env_capabilities = __esm(() => {
|
|
|
1440
1495
|
mode: "any-present",
|
|
1441
1496
|
keys: ["OPENAI_API_KEY", "OPENAI_API_KEY_1", "OPENAI_API_KEY_2", "OPENAI_API_KEY_3"]
|
|
1442
1497
|
},
|
|
1443
|
-
|
|
1498
|
+
activeWhen: embeddingFamilyIs("openai"),
|
|
1499
|
+
requires: anyOf(envField("OPENAI_API_KEY"), envField("OPENAI_API_KEY_1"), envField("OPENAI_API_KEY_2"), envField("OPENAI_API_KEY_3")),
|
|
1500
|
+
optionalFields: [
|
|
1501
|
+
envField("KB_EMBEDDING_MODEL"),
|
|
1502
|
+
embeddingOutputDimsField(OPENAI_EMBEDDING_WIDTHS)
|
|
1503
|
+
],
|
|
1504
|
+
validate: validateEmbeddingModelWidth
|
|
1444
1505
|
},
|
|
1445
1506
|
{
|
|
1446
1507
|
id: "openrouter",
|
|
1447
1508
|
label: "OpenRouter",
|
|
1448
1509
|
activation: { mode: "any-present", keys: ["OPENROUTER_API_KEY"] },
|
|
1449
|
-
|
|
1510
|
+
activeWhen: embeddingFamilyIs("openai"),
|
|
1511
|
+
requires: envField("OPENROUTER_API_KEY"),
|
|
1512
|
+
optionalFields: [
|
|
1513
|
+
envField("KB_EMBEDDING_MODEL"),
|
|
1514
|
+
embeddingOutputDimsField(OPENAI_EMBEDDING_WIDTHS)
|
|
1515
|
+
],
|
|
1516
|
+
validate: validateEmbeddingModelWidth
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
id: "gemini",
|
|
1520
|
+
label: "Google Gemini",
|
|
1521
|
+
activation: {
|
|
1522
|
+
mode: "any-present",
|
|
1523
|
+
keys: ["GEMINI_API_KEY", "GEMINI_API_KEY_1", "GEMINI_API_KEY_2", "GEMINI_API_KEY_3"]
|
|
1524
|
+
},
|
|
1525
|
+
activeWhen: embeddingFamilyIs("gemini"),
|
|
1526
|
+
requires: allOf(anyOf(envField("GEMINI_API_KEY"), envField("GEMINI_API_KEY_1"), envField("GEMINI_API_KEY_2"), envField("GEMINI_API_KEY_3")), envField("KB_EMBEDDING_MODEL")),
|
|
1527
|
+
optionalFields: [embeddingOutputDimsField(GEMINI_EMBEDDING_WIDTHS)],
|
|
1528
|
+
validate: validateEmbeddingModelWidth
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
id: "ollama",
|
|
1532
|
+
label: "Ollama",
|
|
1533
|
+
activation: { mode: "any-present", keys: ["OLLAMA_URL", "KB_EMBEDDING_MODEL"] },
|
|
1534
|
+
activeWhen: embeddingFamilyIs("ollama"),
|
|
1535
|
+
requires: allOf(envField("OLLAMA_URL", {
|
|
1536
|
+
validation: {
|
|
1537
|
+
kind: "url",
|
|
1538
|
+
protocols: ["http:", "https:"],
|
|
1539
|
+
message: "must be a valid HTTP(S) URL"
|
|
1540
|
+
}
|
|
1541
|
+
}), envField("KB_EMBEDDING_MODEL", {
|
|
1542
|
+
validation: {
|
|
1543
|
+
kind: "pattern",
|
|
1544
|
+
pattern: /^ollama\/.+/,
|
|
1545
|
+
message: "must name a model on your Ollama server, as ollama/<model>"
|
|
1546
|
+
}
|
|
1547
|
+
})),
|
|
1548
|
+
optionalFields: [embeddingOutputDimsField(OLLAMA_EMBEDDING_WIDTHS)]
|
|
1450
1549
|
}
|
|
1451
1550
|
]
|
|
1452
1551
|
});
|
|
@@ -1571,7 +1670,7 @@ var init_env_capabilities = __esm(() => {
|
|
|
1571
1670
|
var integrations_default;
|
|
1572
1671
|
var init_integrations = __esm(() => {
|
|
1573
1672
|
integrations_default = {
|
|
1574
|
-
updatedAt: "2026-09-
|
|
1673
|
+
updatedAt: "2026-09-04",
|
|
1575
1674
|
integrations: [
|
|
1576
1675
|
{
|
|
1577
1676
|
type: "onepassword",
|
|
@@ -9032,7 +9131,7 @@ var init_integrations = __esm(() => {
|
|
|
9032
9131
|
slug: "embeddings",
|
|
9033
9132
|
name: "Embeddings",
|
|
9034
9133
|
description: "Generate embeddings",
|
|
9035
|
-
longDescription: "Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, OpenRouter, Google Gemini, Cohere, and Mistral embedding models.",
|
|
9134
|
+
longDescription: "Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, OpenRouter, Google Gemini, Cohere, and Mistral embedding models, plus embedding models on a self-hosted Ollama.",
|
|
9036
9135
|
bgColor: "#7B4DFF",
|
|
9037
9136
|
iconName: "EmbeddingsIcon",
|
|
9038
9137
|
docsUrl: "https://docs.sim.ai/integrations/embeddings",
|
|
@@ -28444,7 +28543,7 @@ function matchesSetupCondition(condition, values) {
|
|
|
28444
28543
|
}
|
|
28445
28544
|
return !matchesSetupCondition(condition.condition, values);
|
|
28446
28545
|
}
|
|
28447
|
-
var EMAIL_SETUP, STORAGE_SETUP, SANDBOX_SETUP, JOBS_SETUP, CACHE_SETUP, KNOWLEDGE_SETUP, KNOWLEDGE_EMBEDDINGS_SETUP, CAPABILITY_SETUPS, configuredCapabilityIds, missingCapabilitySetups, SETUP_FEATURES, OAUTH_CLIENT_SETUP_FIELDS;
|
|
28546
|
+
var EMAIL_SETUP, STORAGE_SETUP, SANDBOX_SETUP, JOBS_SETUP, CACHE_SETUP, KNOWLEDGE_SETUP, OPENAI_EMBEDDING_MODEL_PROMPTS, KNOWLEDGE_EMBEDDINGS_SETUP, CAPABILITY_SETUPS, configuredCapabilityIds, missingCapabilitySetups, SETUP_FEATURES, OAUTH_CLIENT_SETUP_FIELDS;
|
|
28448
28547
|
var init_capability_config = __esm(() => {
|
|
28449
28548
|
init_env_capabilities();
|
|
28450
28549
|
EMAIL_SETUP = defineCapabilitySetup(EMAIL_CAPABILITY, {
|
|
@@ -28914,6 +29013,40 @@ var init_capability_config = __esm(() => {
|
|
|
28914
29013
|
},
|
|
28915
29014
|
optionOrder: ["local", "mistral", "azure-mistral"]
|
|
28916
29015
|
});
|
|
29016
|
+
OPENAI_EMBEDDING_MODEL_PROMPTS = [
|
|
29017
|
+
{
|
|
29018
|
+
type: "choice",
|
|
29019
|
+
id: "openai-embedding-model",
|
|
29020
|
+
message: "Embedding model?",
|
|
29021
|
+
options: [
|
|
29022
|
+
{
|
|
29023
|
+
id: "small",
|
|
29024
|
+
label: "text-embedding-3-small (default)",
|
|
29025
|
+
currentWhen: {
|
|
29026
|
+
kind: "any",
|
|
29027
|
+
conditions: [
|
|
29028
|
+
{ kind: "equals", key: "KB_EMBEDDING_MODEL", value: "text-embedding-3-small" },
|
|
29029
|
+
{ kind: "not", condition: { kind: "present", key: "KB_EMBEDDING_MODEL" } }
|
|
29030
|
+
]
|
|
29031
|
+
},
|
|
29032
|
+
env: { KB_EMBEDDING_MODEL: "text-embedding-3-small" }
|
|
29033
|
+
},
|
|
29034
|
+
{
|
|
29035
|
+
id: "large",
|
|
29036
|
+
label: "text-embedding-3-large",
|
|
29037
|
+
currentWhen: { kind: "equals", key: "KB_EMBEDDING_MODEL", value: "text-embedding-3-large" },
|
|
29038
|
+
env: { KB_EMBEDDING_MODEL: "text-embedding-3-large" }
|
|
29039
|
+
}
|
|
29040
|
+
]
|
|
29041
|
+
},
|
|
29042
|
+
{
|
|
29043
|
+
type: "field",
|
|
29044
|
+
key: "EMBEDDING_OUTPUT_DIMS",
|
|
29045
|
+
input: "text",
|
|
29046
|
+
hint: "optional vector width for new knowledge bases: 768, 1024, 1536 (default), or 3072",
|
|
29047
|
+
validate: true
|
|
29048
|
+
}
|
|
29049
|
+
];
|
|
28917
29050
|
KNOWLEDGE_EMBEDDINGS_SETUP = defineCapabilitySetup(KNOWLEDGE_EMBEDDINGS_CAPABILITY, {
|
|
28918
29051
|
label: "Knowledge embeddings",
|
|
28919
29052
|
message: "Knowledge embedding provider?",
|
|
@@ -28946,7 +29079,8 @@ var init_capability_config = __esm(() => {
|
|
|
28946
29079
|
key: "KB_OPENAI_MODEL_NAME",
|
|
28947
29080
|
input: "text",
|
|
28948
29081
|
hint: "optional Azure deployment name; defaults to the embedding model id"
|
|
28949
|
-
}
|
|
29082
|
+
},
|
|
29083
|
+
...OPENAI_EMBEDDING_MODEL_PROMPTS
|
|
28950
29084
|
]
|
|
28951
29085
|
},
|
|
28952
29086
|
openai: {
|
|
@@ -28991,7 +29125,8 @@ var init_capability_config = __esm(() => {
|
|
|
28991
29125
|
]
|
|
28992
29126
|
}
|
|
28993
29127
|
]
|
|
28994
|
-
}
|
|
29128
|
+
},
|
|
29129
|
+
...OPENAI_EMBEDDING_MODEL_PROMPTS
|
|
28995
29130
|
]
|
|
28996
29131
|
},
|
|
28997
29132
|
openrouter: {
|
|
@@ -29002,11 +29137,93 @@ var init_capability_config = __esm(() => {
|
|
|
29002
29137
|
key: "OPENROUTER_API_KEY",
|
|
29003
29138
|
input: "secret",
|
|
29004
29139
|
required: true
|
|
29140
|
+
},
|
|
29141
|
+
...OPENAI_EMBEDDING_MODEL_PROMPTS
|
|
29142
|
+
]
|
|
29143
|
+
},
|
|
29144
|
+
gemini: {
|
|
29145
|
+
hint: "gemini-embedding-001, at 768, 1536, or 3072 dimensions",
|
|
29146
|
+
env: { KB_EMBEDDING_MODEL: "gemini-embedding-001" },
|
|
29147
|
+
prompts: [
|
|
29148
|
+
{
|
|
29149
|
+
type: "choice",
|
|
29150
|
+
id: "gemini-credentials",
|
|
29151
|
+
message: "Gemini credentials?",
|
|
29152
|
+
options: [
|
|
29153
|
+
{
|
|
29154
|
+
id: "single",
|
|
29155
|
+
label: "Single API key",
|
|
29156
|
+
currentWhen: { kind: "present", key: "GEMINI_API_KEY" },
|
|
29157
|
+
prompts: [{ type: "field", key: "GEMINI_API_KEY", input: "secret", required: true }]
|
|
29158
|
+
},
|
|
29159
|
+
{
|
|
29160
|
+
id: "rotating",
|
|
29161
|
+
label: "Rotating key pool",
|
|
29162
|
+
currentWhen: {
|
|
29163
|
+
kind: "any",
|
|
29164
|
+
conditions: [
|
|
29165
|
+
{ kind: "present", key: "GEMINI_API_KEY_1" },
|
|
29166
|
+
{ kind: "present", key: "GEMINI_API_KEY_2" },
|
|
29167
|
+
{ kind: "present", key: "GEMINI_API_KEY_3" }
|
|
29168
|
+
]
|
|
29169
|
+
},
|
|
29170
|
+
prompts: [
|
|
29171
|
+
{ type: "field", key: "GEMINI_API_KEY_1", input: "secret", required: true },
|
|
29172
|
+
{
|
|
29173
|
+
type: "field",
|
|
29174
|
+
key: "GEMINI_API_KEY_2",
|
|
29175
|
+
input: "secret",
|
|
29176
|
+
hint: "optional rotating key"
|
|
29177
|
+
},
|
|
29178
|
+
{
|
|
29179
|
+
type: "field",
|
|
29180
|
+
key: "GEMINI_API_KEY_3",
|
|
29181
|
+
input: "secret",
|
|
29182
|
+
hint: "optional rotating key"
|
|
29183
|
+
}
|
|
29184
|
+
]
|
|
29185
|
+
}
|
|
29186
|
+
]
|
|
29187
|
+
},
|
|
29188
|
+
{
|
|
29189
|
+
type: "field",
|
|
29190
|
+
key: "EMBEDDING_OUTPUT_DIMS",
|
|
29191
|
+
input: "text",
|
|
29192
|
+
hint: "vector width for new knowledge bases: 768, 1536 (default), or 3072",
|
|
29193
|
+
validate: true
|
|
29194
|
+
}
|
|
29195
|
+
]
|
|
29196
|
+
},
|
|
29197
|
+
ollama: {
|
|
29198
|
+
hint: "embeddings on your own Ollama; no API key, nothing billed",
|
|
29199
|
+
prompts: [
|
|
29200
|
+
{
|
|
29201
|
+
type: "field",
|
|
29202
|
+
key: "OLLAMA_URL",
|
|
29203
|
+
input: "text",
|
|
29204
|
+
required: true,
|
|
29205
|
+
hint: "e.g. http://localhost:11434, or http://host.docker.internal:11434 in Docker",
|
|
29206
|
+
validate: true
|
|
29207
|
+
},
|
|
29208
|
+
{
|
|
29209
|
+
type: "field",
|
|
29210
|
+
key: "KB_EMBEDDING_MODEL",
|
|
29211
|
+
input: "text",
|
|
29212
|
+
required: true,
|
|
29213
|
+
defaultValue: "ollama/nomic-embed-text",
|
|
29214
|
+
hint: "ollama/<model>, pulled on that server (nomic-embed-text is 768)"
|
|
29215
|
+
},
|
|
29216
|
+
{
|
|
29217
|
+
type: "field",
|
|
29218
|
+
key: "EMBEDDING_OUTPUT_DIMS",
|
|
29219
|
+
input: "text",
|
|
29220
|
+
hint: "optional — leave blank and Sim reads the width from your Ollama server",
|
|
29221
|
+
validate: true
|
|
29005
29222
|
}
|
|
29006
29223
|
]
|
|
29007
29224
|
}
|
|
29008
29225
|
},
|
|
29009
|
-
optionOrder: ["openai", "azure-openai", "openrouter"]
|
|
29226
|
+
optionOrder: ["openai", "azure-openai", "gemini", "ollama", "openrouter"]
|
|
29010
29227
|
});
|
|
29011
29228
|
CAPABILITY_SETUPS = [
|
|
29012
29229
|
EMAIL_SETUP,
|
|
@@ -35786,11 +36003,12 @@ async function promptField(prompt, state) {
|
|
|
35786
36003
|
const existing = state.currentValues.get(prompt.key);
|
|
35787
36004
|
const current = hasEnvCapabilityValue(state.currentValues, prompt.key);
|
|
35788
36005
|
const draft = getCapabilitySetupDraftValues(state.setup, state.optionId, state.values);
|
|
35789
|
-
const
|
|
36006
|
+
const reusableExisting = existing !== undefined && validateCapabilityFieldInput(state.setup.definition, prompt.key, existing, state.optionId) === undefined ? existing : undefined;
|
|
36007
|
+
const initialValue = reusableExisting ?? draft[prompt.key] ?? prompt.defaultValue;
|
|
35790
36008
|
const validate = (value) => {
|
|
35791
36009
|
if (!value)
|
|
35792
36010
|
return prompt.required && !existing ? "required" : undefined;
|
|
35793
|
-
return prompt.validate ? validateCapabilityFieldInput(state.setup.definition, prompt.key, value) : undefined;
|
|
36011
|
+
return prompt.validate ? validateCapabilityFieldInput(state.setup.definition, prompt.key, value, state.optionId) : undefined;
|
|
35794
36012
|
};
|
|
35795
36013
|
let value;
|
|
35796
36014
|
if (prompt.input === "secret") {
|