loopctl-mcp-server 2.31.1 → 2.32.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/index.js +32 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1182,12 +1182,21 @@ async function llmConfig() {
|
|
|
1182
1182
|
return toContent(result);
|
|
1183
1183
|
}
|
|
1184
1184
|
|
|
1185
|
-
async function setLlmConfig({
|
|
1185
|
+
async function setLlmConfig({
|
|
1186
|
+
api_key,
|
|
1187
|
+
extraction_model,
|
|
1188
|
+
classification_model,
|
|
1189
|
+
merge_model,
|
|
1190
|
+
embedding_api_key,
|
|
1191
|
+
embedding_model,
|
|
1192
|
+
}) {
|
|
1186
1193
|
const body = {};
|
|
1187
1194
|
if (api_key != null) body.api_key = api_key;
|
|
1188
1195
|
if (extraction_model !== undefined) body.extraction_model = extraction_model;
|
|
1189
1196
|
if (classification_model !== undefined) body.classification_model = classification_model;
|
|
1190
1197
|
if (merge_model !== undefined) body.merge_model = merge_model;
|
|
1198
|
+
if (embedding_api_key != null) body.embedding_api_key = embedding_api_key;
|
|
1199
|
+
if (embedding_model !== undefined) body.embedding_model = embedding_model;
|
|
1191
1200
|
// PATCH (partial-merge) + EXACT user key (review #12, #13).
|
|
1192
1201
|
const result = await apiCall(
|
|
1193
1202
|
"PATCH",
|
|
@@ -3364,19 +3373,23 @@ const TOOLS = [
|
|
|
3364
3373
|
{
|
|
3365
3374
|
name: "llm_config",
|
|
3366
3375
|
description:
|
|
3367
|
-
"Get the tenant's BYO Anthropic
|
|
3368
|
-
"choices, whether
|
|
3369
|
-
"NEVER returns
|
|
3376
|
+
"Get the tenant's BYO Anthropic + embedding configuration: the per-operation " +
|
|
3377
|
+
"model choices, whether each key is configured (has_api_key / has_embedding_key), " +
|
|
3378
|
+
"and masked last-4 hints. NEVER returns a key itself. Requires user role " +
|
|
3379
|
+
"(LOOPCTL_USER_KEY).",
|
|
3370
3380
|
inputSchema: { type: "object", properties: {}, required: [] },
|
|
3371
3381
|
},
|
|
3372
3382
|
{
|
|
3373
3383
|
name: "set_llm_config",
|
|
3374
3384
|
description:
|
|
3375
|
-
"Set/rotate the tenant's OWN Anthropic API key
|
|
3376
|
-
"and the
|
|
3377
|
-
"fronts no
|
|
3378
|
-
"
|
|
3379
|
-
"
|
|
3385
|
+
"Set/rotate the tenant's OWN Anthropic API key AND OpenAI embedding key (both " +
|
|
3386
|
+
"stored encrypted, never returned) and the per-operation models " +
|
|
3387
|
+
"(extraction/classification/merge/embedding). loopctl fronts no cost — the " +
|
|
3388
|
+
"tenant's keys bill the tenant. Mandatory BYO for embeddings: without an " +
|
|
3389
|
+
"embedding_api_key the tenant's articles are not vector-searchable. Any subset " +
|
|
3390
|
+
"of fields may be sent; omitting a key leaves the existing key untouched. Model " +
|
|
3391
|
+
"ids are free-form (any model the key permits). Requires user role " +
|
|
3392
|
+
"(LOOPCTL_USER_KEY).",
|
|
3380
3393
|
inputSchema: {
|
|
3381
3394
|
type: "object",
|
|
3382
3395
|
properties: {
|
|
@@ -3396,6 +3409,16 @@ const TOOLS = [
|
|
|
3396
3409
|
type: "string",
|
|
3397
3410
|
description: "Model id for article merge synthesis (null → server default).",
|
|
3398
3411
|
},
|
|
3412
|
+
embedding_api_key: {
|
|
3413
|
+
type: "string",
|
|
3414
|
+
description:
|
|
3415
|
+
"OpenAI-compatible embedding API key (write-only; stored encrypted, never returned).",
|
|
3416
|
+
},
|
|
3417
|
+
embedding_model: {
|
|
3418
|
+
type: "string",
|
|
3419
|
+
description:
|
|
3420
|
+
"Embedding model id (null → server default text-embedding-3-small).",
|
|
3421
|
+
},
|
|
3399
3422
|
},
|
|
3400
3423
|
required: [],
|
|
3401
3424
|
},
|