librechat-data-provider 0.8.522 → 0.8.524
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/{data-service-CaB7saTP.mjs → data-service-B-WUVvTH.mjs} +1044 -173
- package/dist/data-service-B-WUVvTH.mjs.map +1 -0
- package/dist/{data-service-D5kHzBt-.js → data-service-CUG1qdeC.js} +1426 -207
- package/dist/data-service-CUG1qdeC.js.map +1 -0
- package/dist/index.js +886 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +780 -70
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +1 -1
- package/dist/react-query/index.mjs +1 -1
- package/dist/types/accessPermissions.d.ts +54 -1
- package/dist/types/actions.d.ts +1 -1
- package/dist/types/agentToolOptions.d.ts +1 -1
- package/dist/types/api-endpoints.d.ts +7 -0
- package/dist/types/backgroundResults.d.ts +13 -0
- package/dist/types/balance.d.ts +4 -0
- package/dist/types/bedrock.d.ts +132 -65
- package/dist/types/code/approval.d.ts +26 -0
- package/dist/types/code/worker.d.ts +10 -0
- package/dist/types/code/workspace.d.ts +50 -0
- package/dist/types/codeEnvRef.d.ts +5 -0
- package/dist/types/config.d.ts +5859 -2469
- package/dist/types/data-service.d.ts +22 -12
- package/dist/types/errors.d.ts +2 -0
- package/dist/types/file-config.d.ts +179 -12
- package/dist/types/filters.d.ts +97 -97
- package/dist/types/footer.d.ts +20 -0
- package/dist/types/generate.d.ts +48 -24
- package/dist/types/index.d.ts +11 -0
- package/dist/types/keys.d.ts +13 -2
- package/dist/types/limits.d.ts +8 -0
- package/dist/types/mcp.d.ts +683 -30
- package/dist/types/messages.d.ts +25 -1
- package/dist/types/models.d.ts +312 -183
- package/dist/types/parameterSettings.d.ts +10 -1
- package/dist/types/parsers.d.ts +25 -1
- package/dist/types/providers.d.ts +1 -0
- package/dist/types/resolve-llm-delivery-path.d.ts +161 -0
- package/dist/types/schemas.d.ts +771 -457
- package/dist/types/svg.d.ts +34 -0
- package/dist/types/types/agents.d.ts +257 -2
- package/dist/types/types/assistants.d.ts +2 -617
- package/dist/types/types/content.d.ts +286 -0
- package/dist/types/types/files.d.ts +48 -1
- package/dist/types/types/insights.d.ts +9 -0
- package/dist/types/types/mutations.d.ts +3 -2
- package/dist/types/types/queries.d.ts +8 -1
- package/dist/types/types/queuedTurns.d.ts +140 -106
- package/dist/types/types/runs.d.ts +33 -5
- package/dist/types/types/schedules.d.ts +40 -7
- package/dist/types/types/skills.d.ts +43 -0
- package/dist/types/types/tools.d.ts +132 -0
- package/dist/types/types/traces.d.ts +134 -0
- package/dist/types/types.d.ts +72 -2
- package/package.json +2 -2
- package/dist/data-service-CaB7saTP.mjs.map +0 -1
- package/dist/data-service-D5kHzBt-.js.map +0 -1
|
@@ -350,6 +350,75 @@ const filtersConfigSchema = zod.z.object({
|
|
|
350
350
|
});
|
|
351
351
|
});
|
|
352
352
|
//#endregion
|
|
353
|
+
//#region src/code/workspace.ts
|
|
354
|
+
const CODE_WORKSPACE_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
|
|
355
|
+
/** Protocol-v1 ceiling enforced by the worker and Code API. */
|
|
356
|
+
const CODE_WORKSPACE_MAX_COUNT = 32;
|
|
357
|
+
/** API/client protocol for immutable conversation-owned environment decisions. */
|
|
358
|
+
const CODE_ENVIRONMENT_DECISION_VERSION = 1;
|
|
359
|
+
/** API/client protocol for an owner's explicit move of a sealed environment decision. */
|
|
360
|
+
const CODE_ENVIRONMENT_MOVE_VERSION = 1;
|
|
361
|
+
const CODE_WORKSPACE_OPERATIONS = [
|
|
362
|
+
"read_file",
|
|
363
|
+
"search_text",
|
|
364
|
+
"list_files",
|
|
365
|
+
"write_file",
|
|
366
|
+
"preview_edit",
|
|
367
|
+
"edit_file",
|
|
368
|
+
"execute_command"
|
|
369
|
+
];
|
|
370
|
+
const CODE_WORKSPACE_INSTANCE_TYPES = ["git_worktree"];
|
|
371
|
+
const CODE_WORKSPACE_SELECTION_ERROR_REASONS = [
|
|
372
|
+
"required",
|
|
373
|
+
"invalid",
|
|
374
|
+
"worker_unavailable",
|
|
375
|
+
"unsupported",
|
|
376
|
+
"missing",
|
|
377
|
+
"locked"
|
|
378
|
+
];
|
|
379
|
+
const CODE_ENVIRONMENT_MODES = ["attached", "without_attached"];
|
|
380
|
+
function isRepositoryInstructionDescriptor(value) {
|
|
381
|
+
if (value == null || typeof value !== "object") return false;
|
|
382
|
+
const descriptor = value;
|
|
383
|
+
return Object.keys(descriptor).every((key) => [
|
|
384
|
+
"path",
|
|
385
|
+
"bytes",
|
|
386
|
+
"sha256",
|
|
387
|
+
"truncated"
|
|
388
|
+
].includes(key)) && (descriptor.path === "AGENTS.md" || descriptor.path === "CLAUDE.md") && Number.isSafeInteger(descriptor.bytes) && Number(descriptor.bytes) >= 0 && Number(descriptor.bytes) <= 32768 && typeof descriptor.sha256 === "string" && /^[a-f0-9]{64}$/.test(descriptor.sha256) && typeof descriptor.truncated === "boolean";
|
|
389
|
+
}
|
|
390
|
+
function isCodeWorkspaceEnvironment(value) {
|
|
391
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
392
|
+
const environment = value;
|
|
393
|
+
return Object.keys(environment).every((key) => [
|
|
394
|
+
"fingerprint",
|
|
395
|
+
"repo",
|
|
396
|
+
"ref",
|
|
397
|
+
"actions"
|
|
398
|
+
].includes(key)) && typeof environment.fingerprint === "string" && /^[a-f0-9]{64}$/.test(environment.fingerprint) && (environment.repo === void 0 || typeof environment.repo === "string" && environment.repo.length <= 256 && /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(environment.repo)) && (environment.ref === void 0 || typeof environment.ref === "string" && environment.ref.trim().length > 0 && environment.ref.length <= 256 && !/[\0\r\n]/.test(environment.ref)) && Array.isArray(environment.actions) && environment.actions.length <= 32 && environment.actions.every((name) => typeof name === "string" && /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(name)) && new Set(environment.actions).size === environment.actions.length;
|
|
399
|
+
}
|
|
400
|
+
function isCodeEnvironmentMode(value) {
|
|
401
|
+
return CODE_ENVIRONMENT_MODES.some((mode) => mode === value);
|
|
402
|
+
}
|
|
403
|
+
function isCodeWorkspaceSelectionErrorReason(value) {
|
|
404
|
+
return CODE_WORKSPACE_SELECTION_ERROR_REASONS.some((reason) => reason === value);
|
|
405
|
+
}
|
|
406
|
+
function isCodeWorkspaceSelection(value) {
|
|
407
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
408
|
+
const selection = value;
|
|
409
|
+
return Object.keys(selection).every((key) => key === "environmentId" || key === "workspaceId") && typeof selection.environmentId === "string" && CODE_WORKSPACE_ID_PATTERN.test(selection.environmentId) && typeof selection.workspaceId === "string" && CODE_WORKSPACE_ID_PATTERN.test(selection.workspaceId);
|
|
410
|
+
}
|
|
411
|
+
/** One exact workspace per attached environment used by a conversation. */
|
|
412
|
+
function isCodeWorkspaceSelections(value) {
|
|
413
|
+
if (!Array.isArray(value)) return false;
|
|
414
|
+
const environmentIds = /* @__PURE__ */ new Set();
|
|
415
|
+
return value.every((selection) => {
|
|
416
|
+
if (!isCodeWorkspaceSelection(selection) || environmentIds.has(selection.environmentId)) return false;
|
|
417
|
+
environmentIds.add(selection.environmentId);
|
|
418
|
+
return true;
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
353
422
|
//#region src/feedback.ts
|
|
354
423
|
const FEEDBACK_RATINGS = ["thumbsUp", "thumbsDown"];
|
|
355
424
|
const FEEDBACK_REASON_KEYS = [
|
|
@@ -459,26 +528,64 @@ function getTagByKey(key) {
|
|
|
459
528
|
return FEEDBACK_TAGS.find((tag) => tag.key === key);
|
|
460
529
|
}
|
|
461
530
|
//#endregion
|
|
462
|
-
//#region src/
|
|
463
|
-
const
|
|
464
|
-
"
|
|
465
|
-
"
|
|
466
|
-
"
|
|
531
|
+
//#region src/code/approval.ts
|
|
532
|
+
const CODE_APPROVAL_MODES = [
|
|
533
|
+
"ask",
|
|
534
|
+
"acceptEdits",
|
|
535
|
+
"fullAccess"
|
|
467
536
|
];
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
537
|
+
const MODE_PERMISSIONS = {
|
|
538
|
+
ask: {
|
|
539
|
+
fileWrite: "ask",
|
|
540
|
+
commandExecution: "ask"
|
|
541
|
+
},
|
|
542
|
+
acceptEdits: {
|
|
543
|
+
fileWrite: "allow",
|
|
544
|
+
commandExecution: "ask"
|
|
545
|
+
},
|
|
546
|
+
fullAccess: {
|
|
547
|
+
fileWrite: "allow",
|
|
548
|
+
commandExecution: "allow"
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
/** Omitted deployment configuration never grants unattended execution. */
|
|
552
|
+
function getAllowedCodeApprovalModes({ enabled, allowedModes, configSchema, settings, environment }) {
|
|
553
|
+
if (enabled === false) return [];
|
|
554
|
+
const permitted = new Set(allowedModes ?? ["ask"]);
|
|
555
|
+
return CODE_APPROVAL_MODES.filter((mode) => {
|
|
556
|
+
if (!permitted.has(mode)) return false;
|
|
557
|
+
if (environment === "managed") return true;
|
|
558
|
+
for (const category of ["fileWrite", "commandExecution"]) {
|
|
559
|
+
if (MODE_PERMISSIONS[mode][category] !== "allow") continue;
|
|
560
|
+
const field = configSchema?.permissions?.[category];
|
|
561
|
+
const configured = settings?.permissions?.[category];
|
|
562
|
+
if ((configured != null && field?.allowed.includes(configured) === true ? configured : field?.default ?? "ask") === "deny" || field?.allowed.includes("allow") !== true) return false;
|
|
563
|
+
}
|
|
564
|
+
return true;
|
|
565
|
+
});
|
|
474
566
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
567
|
+
var CodeApprovalModeError = class extends Error {
|
|
568
|
+
constructor() {
|
|
569
|
+
super("The selected code approval mode is not permitted by the current policy.");
|
|
570
|
+
this.code = "CODE_APPROVAL_MODE_NOT_ALLOWED";
|
|
571
|
+
this.name = "CodeApprovalModeError";
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
/** Validate untrusted request state again at admission, including after policy changes. */
|
|
575
|
+
function resolveCodeApprovalMode(requested, constraints) {
|
|
576
|
+
if (requested == null) return void 0;
|
|
577
|
+
const selected = getAllowedCodeApprovalModes(constraints).find((mode) => mode === requested);
|
|
578
|
+
if (selected == null) throw new CodeApprovalModeError();
|
|
579
|
+
return selected;
|
|
580
|
+
}
|
|
581
|
+
/** Apply a turn preference without modifying machine settings or overriding an existing deny. */
|
|
582
|
+
function resolveCodePermissionDecision({ mode, category, decision }) {
|
|
583
|
+
if (mode == null || decision === "deny") return decision;
|
|
584
|
+
if (MODE_PERMISSIONS[mode] == null) throw new CodeApprovalModeError();
|
|
585
|
+
return MODE_PERMISSIONS[mode][category];
|
|
479
586
|
}
|
|
480
587
|
//#endregion
|
|
481
|
-
//#region src/types/
|
|
588
|
+
//#region src/types/tools.ts
|
|
482
589
|
let Tools = /* @__PURE__ */ function(Tools) {
|
|
483
590
|
Tools["execute_code"] = "execute_code";
|
|
484
591
|
Tools["code_interpreter"] = "code_interpreter";
|
|
@@ -502,35 +609,6 @@ let EToolResources = /* @__PURE__ */ function(EToolResources) {
|
|
|
502
609
|
EToolResources["ocr"] = "ocr";
|
|
503
610
|
return EToolResources;
|
|
504
611
|
}({});
|
|
505
|
-
let AnnotationTypes = /* @__PURE__ */ function(AnnotationTypes) {
|
|
506
|
-
AnnotationTypes["FILE_CITATION"] = "file_citation";
|
|
507
|
-
AnnotationTypes["FILE_PATH"] = "file_path";
|
|
508
|
-
return AnnotationTypes;
|
|
509
|
-
}({});
|
|
510
|
-
let StepStatus = /* @__PURE__ */ function(StepStatus) {
|
|
511
|
-
StepStatus["IN_PROGRESS"] = "in_progress";
|
|
512
|
-
StepStatus["CANCELLED"] = "cancelled";
|
|
513
|
-
StepStatus["FAILED"] = "failed";
|
|
514
|
-
StepStatus["COMPLETED"] = "completed";
|
|
515
|
-
StepStatus["EXPIRED"] = "expired";
|
|
516
|
-
return StepStatus;
|
|
517
|
-
}({});
|
|
518
|
-
let MessageContentTypes = /* @__PURE__ */ function(MessageContentTypes) {
|
|
519
|
-
MessageContentTypes["TEXT"] = "text";
|
|
520
|
-
MessageContentTypes["IMAGE_FILE"] = "image_file";
|
|
521
|
-
return MessageContentTypes;
|
|
522
|
-
}({});
|
|
523
|
-
let RunStatus = /* @__PURE__ */ function(RunStatus) {
|
|
524
|
-
RunStatus["QUEUED"] = "queued";
|
|
525
|
-
RunStatus["IN_PROGRESS"] = "in_progress";
|
|
526
|
-
RunStatus["REQUIRES_ACTION"] = "requires_action";
|
|
527
|
-
RunStatus["CANCELLING"] = "cancelling";
|
|
528
|
-
RunStatus["CANCELLED"] = "cancelled";
|
|
529
|
-
RunStatus["FAILED"] = "failed";
|
|
530
|
-
RunStatus["COMPLETED"] = "completed";
|
|
531
|
-
RunStatus["EXPIRED"] = "expired";
|
|
532
|
-
return RunStatus;
|
|
533
|
-
}({});
|
|
534
612
|
const actionDelimiter = "_action_";
|
|
535
613
|
const actionDomainSeparator = "---";
|
|
536
614
|
/** Mirrors `Constants.mcp_delimiter`; duplicated here to avoid a circular import from `config.ts`. */
|
|
@@ -558,46 +636,6 @@ function isActionTool(toolName) {
|
|
|
558
636
|
const mcpIdx = toolName.indexOf(mcpDelimiter);
|
|
559
637
|
return mcpIdx < 0 || mcpIdx < actionIdx;
|
|
560
638
|
}
|
|
561
|
-
const hostImageIdSuffix = "_host_copy";
|
|
562
|
-
const hostImageNamePrefix = "host_copy_";
|
|
563
|
-
let FilePurpose = /* @__PURE__ */ function(FilePurpose) {
|
|
564
|
-
FilePurpose["Vision"] = "vision";
|
|
565
|
-
FilePurpose["FineTune"] = "fine-tune";
|
|
566
|
-
FilePurpose["FineTuneResults"] = "fine-tune-results";
|
|
567
|
-
FilePurpose["Assistants"] = "assistants";
|
|
568
|
-
FilePurpose["AssistantsOutput"] = "assistants_output";
|
|
569
|
-
return FilePurpose;
|
|
570
|
-
}({});
|
|
571
|
-
const defaultOrderQuery = {
|
|
572
|
-
order: "desc",
|
|
573
|
-
limit: 100
|
|
574
|
-
};
|
|
575
|
-
let AssistantStreamEvents = /* @__PURE__ */ function(AssistantStreamEvents) {
|
|
576
|
-
AssistantStreamEvents["ThreadCreated"] = "thread.created";
|
|
577
|
-
AssistantStreamEvents["ThreadRunCreated"] = "thread.run.created";
|
|
578
|
-
AssistantStreamEvents["ThreadRunQueued"] = "thread.run.queued";
|
|
579
|
-
AssistantStreamEvents["ThreadRunInProgress"] = "thread.run.in_progress";
|
|
580
|
-
AssistantStreamEvents["ThreadRunRequiresAction"] = "thread.run.requires_action";
|
|
581
|
-
AssistantStreamEvents["ThreadRunCompleted"] = "thread.run.completed";
|
|
582
|
-
AssistantStreamEvents["ThreadRunFailed"] = "thread.run.failed";
|
|
583
|
-
AssistantStreamEvents["ThreadRunCancelling"] = "thread.run.cancelling";
|
|
584
|
-
AssistantStreamEvents["ThreadRunCancelled"] = "thread.run.cancelled";
|
|
585
|
-
AssistantStreamEvents["ThreadRunExpired"] = "thread.run.expired";
|
|
586
|
-
AssistantStreamEvents["ThreadRunStepCreated"] = "thread.run.step.created";
|
|
587
|
-
AssistantStreamEvents["ThreadRunStepInProgress"] = "thread.run.step.in_progress";
|
|
588
|
-
AssistantStreamEvents["ThreadRunStepCompleted"] = "thread.run.step.completed";
|
|
589
|
-
AssistantStreamEvents["ThreadRunStepFailed"] = "thread.run.step.failed";
|
|
590
|
-
AssistantStreamEvents["ThreadRunStepCancelled"] = "thread.run.step.cancelled";
|
|
591
|
-
AssistantStreamEvents["ThreadRunStepExpired"] = "thread.run.step.expired";
|
|
592
|
-
AssistantStreamEvents["ThreadRunStepDelta"] = "thread.run.step.delta";
|
|
593
|
-
AssistantStreamEvents["ThreadMessageCreated"] = "thread.message.created";
|
|
594
|
-
AssistantStreamEvents["ThreadMessageInProgress"] = "thread.message.in_progress";
|
|
595
|
-
AssistantStreamEvents["ThreadMessageCompleted"] = "thread.message.completed";
|
|
596
|
-
AssistantStreamEvents["ThreadMessageIncomplete"] = "thread.message.incomplete";
|
|
597
|
-
AssistantStreamEvents["ThreadMessageDelta"] = "thread.message.delta";
|
|
598
|
-
AssistantStreamEvents["ErrorEvent"] = "error";
|
|
599
|
-
return AssistantStreamEvents;
|
|
600
|
-
}({});
|
|
601
639
|
//#endregion
|
|
602
640
|
//#region src/schemas.ts
|
|
603
641
|
const isUUID = zod.z.string().uuid();
|
|
@@ -693,7 +731,35 @@ const inputTokensIncludesCache = (provider) => {
|
|
|
693
731
|
return cacheSubsetProviders.has(provider ?? "");
|
|
694
732
|
};
|
|
695
733
|
const isDocumentSupportedProvider = (provider) => {
|
|
696
|
-
|
|
734
|
+
const normalized = provider?.toLowerCase() ?? "";
|
|
735
|
+
return Array.from(documentSupportedProviders).some((candidate) => candidate.toLowerCase() === normalized);
|
|
736
|
+
};
|
|
737
|
+
/**
|
|
738
|
+
* Endpoints whose encoders actually build native audio/video payloads. Narrower than
|
|
739
|
+
* `documentSupportedProviders`: a provider can accept PDFs and still emit nothing for
|
|
740
|
+
* media, in which case the upload has to fall back to text/STT.
|
|
741
|
+
*/
|
|
742
|
+
const mediaSupportedProviders = new Set([
|
|
743
|
+
"google",
|
|
744
|
+
"vertexai",
|
|
745
|
+
"openrouter"
|
|
746
|
+
]);
|
|
747
|
+
const isMediaSupportedProvider = (provider) => {
|
|
748
|
+
return mediaSupportedProviders.has(provider?.toLowerCase() ?? "");
|
|
749
|
+
};
|
|
750
|
+
/**
|
|
751
|
+
* Built-in endpoint and provider identifiers. A name outside this set is a custom
|
|
752
|
+
* endpoint whose real provider is resolved at request time, so its capabilities
|
|
753
|
+
* cannot be judged from the name alone.
|
|
754
|
+
*/
|
|
755
|
+
const knownProviderIdentifiers = new Set([
|
|
756
|
+
...Object.values(EModelEndpoint),
|
|
757
|
+
...Object.values(Providers),
|
|
758
|
+
...Object.values(EModelEndpoint).map((provider) => provider.toLowerCase()),
|
|
759
|
+
...Object.values(Providers).map((provider) => provider.toLowerCase())
|
|
760
|
+
]);
|
|
761
|
+
const isKnownProviderIdentifier = (provider) => {
|
|
762
|
+
return knownProviderIdentifiers.has(provider?.toLowerCase() ?? "");
|
|
697
763
|
};
|
|
698
764
|
const paramEndpoints = new Set([
|
|
699
765
|
"agents",
|
|
@@ -896,6 +962,8 @@ const defaultAgentFormValues = {
|
|
|
896
962
|
["memory"]: false,
|
|
897
963
|
stateful_code_environment: "user",
|
|
898
964
|
code_environment_id: void 0,
|
|
965
|
+
code_workspace_id: void 0,
|
|
966
|
+
repositoryInstructions: void 0,
|
|
899
967
|
category: "general",
|
|
900
968
|
support_contact: {
|
|
901
969
|
name: "",
|
|
@@ -1386,6 +1454,12 @@ const tConversationSchema = zod.z.object({
|
|
|
1386
1454
|
pinned: zod.z.boolean().optional(),
|
|
1387
1455
|
/** Server-derived: an active shared link exists for this conversation. Not persisted. */
|
|
1388
1456
|
isShared: zod.z.boolean().optional(),
|
|
1457
|
+
codeApprovalMode: zod.z.enum(CODE_APPROVAL_MODES).optional(),
|
|
1458
|
+
codeEnvironmentMode: zod.z.enum(CODE_ENVIRONMENT_MODES).optional(),
|
|
1459
|
+
codeWorkspaces: zod.z.array(zod.z.object({
|
|
1460
|
+
environmentId: zod.z.string().regex(CODE_WORKSPACE_ID_PATTERN),
|
|
1461
|
+
workspaceId: zod.z.string().regex(CODE_WORKSPACE_ID_PATTERN)
|
|
1462
|
+
}).strict()).optional(),
|
|
1389
1463
|
title: zod.z.string().nullable().or(zod.z.literal("New Chat")).default("New Chat"),
|
|
1390
1464
|
user: zod.z.string().optional(),
|
|
1391
1465
|
messages: zod.z.array(zod.z.string()).optional(),
|
|
@@ -1867,6 +1941,72 @@ const compactAgentsBaseSchema = tConversationSchema.pick({
|
|
|
1867
1941
|
});
|
|
1868
1942
|
const compactAgentsSchema = compactAgentsBaseSchema.transform((obj) => removeNullishValues(obj)).catch(() => ({}));
|
|
1869
1943
|
//#endregion
|
|
1944
|
+
//#region src/balance.ts
|
|
1945
|
+
const REFILL_INTERVAL_UNITS = [
|
|
1946
|
+
"seconds",
|
|
1947
|
+
"minutes",
|
|
1948
|
+
"hours",
|
|
1949
|
+
"days",
|
|
1950
|
+
"weeks",
|
|
1951
|
+
"months"
|
|
1952
|
+
];
|
|
1953
|
+
/** How long an unreleased in-flight balance reservation keeps counting against the balance. */
|
|
1954
|
+
const DEFAULT_BALANCE_RESERVATION_TTL_MS = 1800 * 1e3;
|
|
1955
|
+
/** Shortest reservation TTL; a live reservation is renewed every half TTL. */
|
|
1956
|
+
const MIN_BALANCE_RESERVATION_TTL_MS = 10 * 1e3;
|
|
1957
|
+
function getRefillEligibilityDate(lastRefill, value, unit) {
|
|
1958
|
+
const result = new Date(lastRefill);
|
|
1959
|
+
switch (unit) {
|
|
1960
|
+
case "seconds":
|
|
1961
|
+
result.setSeconds(result.getSeconds() + value);
|
|
1962
|
+
return result;
|
|
1963
|
+
case "minutes":
|
|
1964
|
+
result.setMinutes(result.getMinutes() + value);
|
|
1965
|
+
return result;
|
|
1966
|
+
case "hours":
|
|
1967
|
+
result.setHours(result.getHours() + value);
|
|
1968
|
+
return result;
|
|
1969
|
+
case "days":
|
|
1970
|
+
result.setDate(result.getDate() + value);
|
|
1971
|
+
return result;
|
|
1972
|
+
case "weeks":
|
|
1973
|
+
result.setDate(result.getDate() + value * 7);
|
|
1974
|
+
return result;
|
|
1975
|
+
case "months":
|
|
1976
|
+
result.setMonth(result.getMonth() + value);
|
|
1977
|
+
return result;
|
|
1978
|
+
default: return result;
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
//#endregion
|
|
1982
|
+
//#region src/limits.ts
|
|
1983
|
+
/** Maximum number of explicit subagents per parent agent. UI + Zod schema share this. */
|
|
1984
|
+
const MAX_SUBAGENTS = 10;
|
|
1985
|
+
/** Hard upper bound for `endpoints.agents.maxSubagents`, keeping the request-validation
|
|
1986
|
+
* cap bounded no matter what the config file says. */
|
|
1987
|
+
const MAX_SUBAGENTS_CEILING = 50;
|
|
1988
|
+
let maxSubagents = 10;
|
|
1989
|
+
/** Effective subagents-per-agent cap; initialized from `endpoints.agents.maxSubagents` at startup. */
|
|
1990
|
+
const getMaxSubagents = () => maxSubagents;
|
|
1991
|
+
/** Applies a configured cap; any missing or out-of-range value resets to the default. */
|
|
1992
|
+
const setMaxSubagents = (value) => {
|
|
1993
|
+
maxSubagents = typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 50 ? value : 10;
|
|
1994
|
+
};
|
|
1995
|
+
/** Chat project field limits. The dialogs and the persistence layer share these,
|
|
1996
|
+
* so the inputs stop at the same point the server would otherwise truncate. */
|
|
1997
|
+
const MAX_CHAT_PROJECT_NAME_LENGTH = 100;
|
|
1998
|
+
const MAX_CHAT_PROJECT_DESCRIPTION_LENGTH = 1e3;
|
|
1999
|
+
/** Mirrors the bounded graph-child member limit in `@librechat/agents`. */
|
|
2000
|
+
const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
|
|
2001
|
+
/** Characters of retained tool output one stopped turn may be tokenized for, so the
|
|
2002
|
+
* context gauge can add an exact figure instead of an estimate. The schema default
|
|
2003
|
+
* and the save path share it; tokenizing runs ~60 ms/MB, once per stopped turn. */
|
|
2004
|
+
const DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS = 8 * 1024 * 1024;
|
|
2005
|
+
/** Token ceiling for the block of Ask User answers carried verbatim in an agent's
|
|
2006
|
+
* user context (`endpoints.agents.askUserQuestion.retainedAnswers.maxTokens`).
|
|
2007
|
+
* Older answers drop first once the block exceeds it; the newest set is always kept. */
|
|
2008
|
+
const DEFAULT_RETAINED_ANSWER_TOKENS = 4096;
|
|
2009
|
+
//#endregion
|
|
1870
2010
|
//#region src/generate.ts
|
|
1871
2011
|
let ComponentTypes = /* @__PURE__ */ function(ComponentTypes) {
|
|
1872
2012
|
ComponentTypes["Input"] = "input";
|
|
@@ -2265,30 +2405,30 @@ const generateGoogleSchema = (customGoogle) => {
|
|
|
2265
2405
|
}));
|
|
2266
2406
|
};
|
|
2267
2407
|
//#endregion
|
|
2268
|
-
//#region src/
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2280
|
-
}
|
|
2281
|
-
/**
|
|
2282
|
-
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
const MAX_GRAPH_SUBAGENT_MEMBERS = 32;
|
|
2408
|
+
//#region src/stateful-code.ts
|
|
2409
|
+
const STATEFUL_CODE_ENVIRONMENTS = [
|
|
2410
|
+
"user",
|
|
2411
|
+
"agent-user",
|
|
2412
|
+
"conversation"
|
|
2413
|
+
];
|
|
2414
|
+
/** Resolve a deployment allowlist in stable UI order. An omitted value preserves
|
|
2415
|
+
* the backward-compatible behavior where every environment is available. */
|
|
2416
|
+
function resolveAllowedStatefulCodeEnvironments(configured) {
|
|
2417
|
+
if (configured == null) return [...STATEFUL_CODE_ENVIRONMENTS];
|
|
2418
|
+
const configuredSet = new Set(configured);
|
|
2419
|
+
return STATEFUL_CODE_ENVIRONMENTS.filter((environment) => configuredSet.has(environment));
|
|
2420
|
+
}
|
|
2421
|
+
/** Keep an allowed preference, otherwise select the first deployment-allowed scope. */
|
|
2422
|
+
function resolveStatefulCodeEnvironment(preferred, configured) {
|
|
2423
|
+
const allowed = resolveAllowedStatefulCodeEnvironments(configured);
|
|
2424
|
+
return preferred != null && allowed.includes(preferred) ? preferred : allowed[0];
|
|
2425
|
+
}
|
|
2287
2426
|
//#endregion
|
|
2288
2427
|
//#region src/models.ts
|
|
2289
2428
|
const modelSpecSubagentsSchema = zod.z.object({
|
|
2290
2429
|
enabled: zod.z.boolean().optional(),
|
|
2291
2430
|
allowSelf: zod.z.boolean().optional(),
|
|
2431
|
+
shareFiles: zod.z.boolean().optional(),
|
|
2292
2432
|
agent_ids: zod.z.array(zod.z.string()).optional()
|
|
2293
2433
|
}).superRefine((subagents, ctx) => {
|
|
2294
2434
|
const maxSubagents = getMaxSubagents();
|
|
@@ -2382,41 +2522,9 @@ const specsConfigSchema = zod.z.object({
|
|
|
2382
2522
|
addedEndpoints: zod.z.array(zod.z.union([zod.z.string(), eModelEndpointSchema])).optional()
|
|
2383
2523
|
});
|
|
2384
2524
|
//#endregion
|
|
2385
|
-
//#region src/balance.ts
|
|
2386
|
-
const REFILL_INTERVAL_UNITS = [
|
|
2387
|
-
"seconds",
|
|
2388
|
-
"minutes",
|
|
2389
|
-
"hours",
|
|
2390
|
-
"days",
|
|
2391
|
-
"weeks",
|
|
2392
|
-
"months"
|
|
2393
|
-
];
|
|
2394
|
-
function getRefillEligibilityDate(lastRefill, value, unit) {
|
|
2395
|
-
const result = new Date(lastRefill);
|
|
2396
|
-
switch (unit) {
|
|
2397
|
-
case "seconds":
|
|
2398
|
-
result.setSeconds(result.getSeconds() + value);
|
|
2399
|
-
return result;
|
|
2400
|
-
case "minutes":
|
|
2401
|
-
result.setMinutes(result.getMinutes() + value);
|
|
2402
|
-
return result;
|
|
2403
|
-
case "hours":
|
|
2404
|
-
result.setHours(result.getHours() + value);
|
|
2405
|
-
return result;
|
|
2406
|
-
case "days":
|
|
2407
|
-
result.setDate(result.getDate() + value);
|
|
2408
|
-
return result;
|
|
2409
|
-
case "weeks":
|
|
2410
|
-
result.setDate(result.getDate() + value * 7);
|
|
2411
|
-
return result;
|
|
2412
|
-
case "months":
|
|
2413
|
-
result.setMonth(result.getMonth() + value);
|
|
2414
|
-
return result;
|
|
2415
|
-
default: return result;
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
//#endregion
|
|
2419
2525
|
//#region src/file-config.ts
|
|
2526
|
+
/** Parallel storage deletions during rollback of a failed skill archive import. */
|
|
2527
|
+
const DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY = 8;
|
|
2420
2528
|
const supportsFiles = {
|
|
2421
2529
|
["openAI"]: true,
|
|
2422
2530
|
["google"]: true,
|
|
@@ -2570,6 +2678,68 @@ const bedrockDocumentFormats = {
|
|
|
2570
2678
|
"text/plain": "txt",
|
|
2571
2679
|
"text/markdown": "md"
|
|
2572
2680
|
};
|
|
2681
|
+
/**
|
|
2682
|
+
* Whether an upload belongs to the conversation rather than to the agent. The value
|
|
2683
|
+
* arrives from multipart form data, so it can be the string "false", which is truthy.
|
|
2684
|
+
* Shared so the route, the authorization check and processing cannot disagree about it.
|
|
2685
|
+
*/
|
|
2686
|
+
const isMessageFileUpload = (value) => value === true || value === "true";
|
|
2687
|
+
/**
|
|
2688
|
+
* Whether the upload's conversation uses the Responses API, which decides whether Azure
|
|
2689
|
+
* can carry a document natively. Multipart form data has no booleans, so it arrives as
|
|
2690
|
+
* the string "true".
|
|
2691
|
+
*/
|
|
2692
|
+
const isResponsesApiUpload = (value) => value === true || value === "true";
|
|
2693
|
+
/**
|
|
2694
|
+
* The name a file carries inside the code sandbox.
|
|
2695
|
+
*
|
|
2696
|
+
* Image uploads are converted to the configured output type while the record keeps the
|
|
2697
|
+
* original filename, so the extension has to follow the stored bytes or the sandbox
|
|
2698
|
+
* decoder is handed a mismatch. Provisioning and priming both resolve the mount path
|
|
2699
|
+
* from here: deriving it twice under different rules leaves a later turn advertising a
|
|
2700
|
+
* path that does not exist in the sandbox.
|
|
2701
|
+
*/
|
|
2702
|
+
const resolveSandboxFilename = (filename, mimeType) => {
|
|
2703
|
+
if (!mimeType?.startsWith("image/")) return filename;
|
|
2704
|
+
const subtype = mimeType.slice(6);
|
|
2705
|
+
if (![
|
|
2706
|
+
"webp",
|
|
2707
|
+
"png",
|
|
2708
|
+
"jpeg",
|
|
2709
|
+
"gif"
|
|
2710
|
+
].includes(subtype)) return filename;
|
|
2711
|
+
const accepted = subtype === "jpeg" ? [".jpg", ".jpeg"] : [`.${subtype}`];
|
|
2712
|
+
const lastDot = filename.lastIndexOf(".");
|
|
2713
|
+
const currentExt = lastDot > 0 ? filename.slice(lastDot).toLowerCase() : "";
|
|
2714
|
+
if (accepted.includes(currentExt)) return filename;
|
|
2715
|
+
return `${lastDot > 0 ? filename.slice(0, lastDot) : filename}${accepted[0]}`;
|
|
2716
|
+
};
|
|
2717
|
+
/**
|
|
2718
|
+
* The Responses setting a turn actually runs on. A saved agent's own record wins, since
|
|
2719
|
+
* execution reads its model parameters; a conversation only answers for itself. Upload
|
|
2720
|
+
* and delivery must agree here, or a document is stored as raw provider content and then
|
|
2721
|
+
* re-resolved to text it has no extraction for.
|
|
2722
|
+
*/
|
|
2723
|
+
const resolveUseResponsesApi = (agentValue, conversationValue) => agentValue ?? conversationValue ?? void 0;
|
|
2724
|
+
/** Models whose native OpenAI and Azure execution defaults to Responses. Keep
|
|
2725
|
+
* this shared with client upload routing so documents follow the API that the
|
|
2726
|
+
* backend will actually invoke. Explicit false remains an opt-out. */
|
|
2727
|
+
const prefersResponsesApiByModel = (model) => typeof model === "string" && /^gpt-6-(?:astra|sol|luna)(?:-|$)/i.test(model);
|
|
2728
|
+
/** The server has transport and administrator settings the browser cannot see.
|
|
2729
|
+
* Missing policy never enables model-based uploads (including during upgrades). */
|
|
2730
|
+
const resolveEffectiveUseResponsesApi = ({ value, endpoint, model, routing, webSearch }) => {
|
|
2731
|
+
if (endpoint !== "openAI" && endpoint !== "azureOpenAI") return value ?? void 0;
|
|
2732
|
+
let policy = model ? routing?.[model] : void 0;
|
|
2733
|
+
if (!policy && model && prefersResponsesApiByModel(model)) {
|
|
2734
|
+
const family = /^gpt-6-(?:astra|sol|luna)(?=-|$)/i.exec(model)?.[0].toLowerCase();
|
|
2735
|
+
policy = family ? routing?.[`${family}-*`] : void 0;
|
|
2736
|
+
}
|
|
2737
|
+
policy ??= routing?.["*"];
|
|
2738
|
+
if (!policy) return value ?? void 0;
|
|
2739
|
+
if (webSearch && policy.withWebSearch) policy = policy.withWebSearch;
|
|
2740
|
+
if (value == null) return policy.default;
|
|
2741
|
+
return value ? policy.on : policy.off;
|
|
2742
|
+
};
|
|
2573
2743
|
const isBedrockDocumentType = (mimeType) => mimeType != null && mimeType in bedrockDocumentFormats;
|
|
2574
2744
|
/** MIME types Bedrock's Converse document path can send to the model (mirrors `bedrockDocumentFormats`). */
|
|
2575
2745
|
const bedrockDocumentMimeTypes = Object.keys(bedrockDocumentFormats);
|
|
@@ -2803,6 +2973,8 @@ const mbToBytes = (mb) => mb * megabyte;
|
|
|
2803
2973
|
const defaultSizeLimit = mbToBytes(512);
|
|
2804
2974
|
const defaultSkillImportSizeLimit = mbToBytes(50);
|
|
2805
2975
|
const defaultTokenLimit = 1e5;
|
|
2976
|
+
const defaultContextSizeLimit = mbToBytes(128);
|
|
2977
|
+
const defaultContextCharLimit = 1e6;
|
|
2806
2978
|
const assistantsFileConfig = {
|
|
2807
2979
|
fileLimit: 10,
|
|
2808
2980
|
fileSizeLimit: defaultSizeLimit,
|
|
@@ -2830,10 +3002,15 @@ const fileConfig = {
|
|
|
2830
3002
|
disabled: false
|
|
2831
3003
|
}
|
|
2832
3004
|
},
|
|
2833
|
-
skills: {
|
|
3005
|
+
skills: {
|
|
3006
|
+
fileSizeLimit: defaultSkillImportSizeLimit,
|
|
3007
|
+
importCleanupConcurrency: 8
|
|
3008
|
+
},
|
|
2834
3009
|
serverFileSizeLimit: defaultSizeLimit,
|
|
2835
3010
|
avatarSizeLimit: mbToBytes(2),
|
|
2836
3011
|
fileTokenLimit: defaultTokenLimit,
|
|
3012
|
+
fileContextSizeLimit: defaultContextSizeLimit,
|
|
3013
|
+
fileContextCharLimit: defaultContextCharLimit,
|
|
2837
3014
|
clientImageResize: {
|
|
2838
3015
|
enabled: false,
|
|
2839
3016
|
maxWidth: 1900,
|
|
@@ -2848,21 +3025,48 @@ const fileConfig = {
|
|
|
2848
3025
|
return supportedTypes.some((regex) => regex.test(fileType));
|
|
2849
3026
|
}
|
|
2850
3027
|
};
|
|
2851
|
-
const supportedMimeTypesSchema = zod.z.array(zod.z.string()
|
|
3028
|
+
const supportedMimeTypesSchema = zod.z.array(zod.z.string().superRefine((pattern, context) => {
|
|
3029
|
+
try {
|
|
3030
|
+
compileMimeRegex(pattern);
|
|
3031
|
+
} catch {
|
|
3032
|
+
context.addIssue({
|
|
3033
|
+
code: zod.z.ZodIssueCode.custom,
|
|
3034
|
+
message: "Invalid MIME type regex: not supported by the configured regex engine"
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
3037
|
+
})).optional();
|
|
3038
|
+
const DefaultLLMDeliveryPath = zod.z.enum([
|
|
3039
|
+
"provider",
|
|
3040
|
+
"text",
|
|
3041
|
+
"none"
|
|
3042
|
+
]);
|
|
3043
|
+
const defaultLLMDeliveryPathSchema = zod.z.object({
|
|
3044
|
+
fallback: DefaultLLMDeliveryPath.optional(),
|
|
3045
|
+
overrides: zod.z.record(DefaultLLMDeliveryPath).optional()
|
|
3046
|
+
});
|
|
2852
3047
|
const endpointFileConfigSchema = zod.z.object({
|
|
2853
3048
|
disabled: zod.z.boolean().optional(),
|
|
2854
3049
|
fileLimit: zod.z.number().min(0).optional(),
|
|
2855
3050
|
fileSizeLimit: zod.z.number().min(0).optional(),
|
|
2856
3051
|
totalSizeLimit: zod.z.number().min(0).optional(),
|
|
2857
|
-
supportedMimeTypes: supportedMimeTypesSchema.optional()
|
|
3052
|
+
supportedMimeTypes: supportedMimeTypesSchema.optional(),
|
|
3053
|
+
defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
|
|
3054
|
+
legacyFileUploadUX: zod.z.boolean().optional(),
|
|
3055
|
+
textFallbackWithoutTools: zod.z.boolean().optional()
|
|
3056
|
+
});
|
|
3057
|
+
const skillFileConfigSchema = zod.z.object({
|
|
3058
|
+
fileSizeLimit: zod.z.number().min(0).optional(),
|
|
3059
|
+
importCleanupConcurrency: zod.z.number().int().positive().optional()
|
|
2858
3060
|
});
|
|
2859
|
-
const skillFileConfigSchema = zod.z.object({ fileSizeLimit: zod.z.number().min(0).optional() });
|
|
2860
3061
|
const fileConfigSchema = zod.z.object({
|
|
2861
3062
|
endpoints: zod.z.record(endpointFileConfigSchema).optional(),
|
|
2862
3063
|
skills: skillFileConfigSchema.optional(),
|
|
2863
3064
|
serverFileSizeLimit: zod.z.number().min(0).optional(),
|
|
2864
3065
|
avatarSizeLimit: zod.z.number().min(0).optional(),
|
|
2865
3066
|
fileTokenLimit: zod.z.number().min(0).optional(),
|
|
3067
|
+
fileContextSizeLimit: zod.z.number().min(0).optional(),
|
|
3068
|
+
fileContextCharLimit: zod.z.number().min(0).optional(),
|
|
3069
|
+
codeEnvLivenessSafeWindowMs: zod.z.number().min(0).optional(),
|
|
2866
3070
|
imageGeneration: zod.z.object({
|
|
2867
3071
|
percentage: zod.z.number().min(0).max(100).optional(),
|
|
2868
3072
|
px: zod.z.number().min(0).optional()
|
|
@@ -2874,7 +3078,10 @@ const fileConfigSchema = zod.z.object({
|
|
|
2874
3078
|
quality: zod.z.number().min(0).max(1).optional()
|
|
2875
3079
|
}).optional(),
|
|
2876
3080
|
ocr: zod.z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
|
|
2877
|
-
text: zod.z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional()
|
|
3081
|
+
text: zod.z.object({ supportedMimeTypes: supportedMimeTypesSchema.optional() }).optional(),
|
|
3082
|
+
defaultLLMDeliveryPath: defaultLLMDeliveryPathSchema.optional(),
|
|
3083
|
+
legacyFileUploadUX: zod.z.boolean().optional(),
|
|
3084
|
+
textFallbackWithoutTools: zod.z.boolean().optional()
|
|
2878
3085
|
});
|
|
2879
3086
|
/**
|
|
2880
3087
|
* Compiler for admin-supplied MIME patterns. Defaults to native `RegExp`, which browser
|
|
@@ -2911,6 +3118,15 @@ const isPermissiveMimeConfig = (types) => {
|
|
|
2911
3118
|
if (!types || types.length === 0) return false;
|
|
2912
3119
|
return types.some((regex) => regex.test("x-librechat/x-probe"));
|
|
2913
3120
|
};
|
|
3121
|
+
/**
|
|
3122
|
+
* Detects whether an endpoint's `supportedMimeTypes` were set by the admin rather than inherited
|
|
3123
|
+
* from the built-in default list. Inheritance is signaled by referential identity with
|
|
3124
|
+
* `supportedMimeTypes`, which `mergeWithDefault` preserves for unconfigured endpoints.
|
|
3125
|
+
*/
|
|
3126
|
+
const isExplicitMimeConfig = (types) => {
|
|
3127
|
+
if (!types || types.length === 0) return false;
|
|
3128
|
+
return types !== supportedMimeTypes;
|
|
3129
|
+
};
|
|
2914
3130
|
/** Media categories that collapse to a wildcard `accept` token when any member type is allowed. */
|
|
2915
3131
|
const mimeAcceptCategories = [
|
|
2916
3132
|
{
|
|
@@ -3010,6 +3226,12 @@ const documentMimeExtensions = [
|
|
|
3010
3226
|
["text/calendar", [".ics"]],
|
|
3011
3227
|
["message/rfc822", [".eml"]]
|
|
3012
3228
|
];
|
|
3229
|
+
/** Preferred extension for a known document MIME type, including its leading dot. */
|
|
3230
|
+
function getDocumentFileExtension(mimeType) {
|
|
3231
|
+
const normalized = mimeType?.split(";", 1)[0].trim().toLowerCase();
|
|
3232
|
+
const canonical = normalized === "text/comma-separated-values" ? "text/csv" : normalized;
|
|
3233
|
+
return documentMimeExtensions.find(([type]) => type === canonical)?.[1][0];
|
|
3234
|
+
}
|
|
3013
3235
|
const documentMimeSet = new Set(documentMimeExtensions.map(([mimeType]) => mimeType));
|
|
3014
3236
|
/** Every MIME type LibreChat may accept, used to detect patterns that reach beyond the representable set. */
|
|
3015
3237
|
const knownMimeUniverse = Array.from(new Set([
|
|
@@ -3103,16 +3325,61 @@ function mergeWithDefault(endpointConfig, defaultConfig, endpoint) {
|
|
|
3103
3325
|
fileLimit: endpointConfig.fileLimit ?? defaultConfig.fileLimit,
|
|
3104
3326
|
fileSizeLimit: endpointConfig.fileSizeLimit ?? defaultConfig.fileSizeLimit,
|
|
3105
3327
|
totalSizeLimit: endpointConfig.totalSizeLimit ?? defaultConfig.totalSizeLimit,
|
|
3106
|
-
supportedMimeTypes: endpointConfig.supportedMimeTypes ?? defaultMimeTypes
|
|
3328
|
+
supportedMimeTypes: endpointConfig.supportedMimeTypes ?? defaultMimeTypes,
|
|
3329
|
+
defaultLLMDeliveryPath: mergeDeliveryPathConfig(endpointConfig.defaultLLMDeliveryPath, defaultConfig.defaultLLMDeliveryPath),
|
|
3330
|
+
legacyFileUploadUX: endpointConfig.legacyFileUploadUX ?? defaultConfig.legacyFileUploadUX,
|
|
3331
|
+
textFallbackWithoutTools: endpointConfig.textFallbackWithoutTools ?? defaultConfig.textFallbackWithoutTools
|
|
3107
3332
|
};
|
|
3108
3333
|
}
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3334
|
+
/**
|
|
3335
|
+
* Deep-merges delivery-path config so an endpoint that supplies only one override
|
|
3336
|
+
* still inherits the default's fallback and shared overrides. Whole-object
|
|
3337
|
+
* replacement would silently drop the inherited routing.
|
|
3338
|
+
*/
|
|
3339
|
+
function mergeDeliveryPathConfig(endpointValue, defaultValue) {
|
|
3340
|
+
if (!endpointValue) return defaultValue;
|
|
3341
|
+
if (!defaultValue) return endpointValue;
|
|
3342
|
+
if (endpointValue.fallback != null) return endpointValue;
|
|
3343
|
+
const hasOverrides = endpointValue.overrides != null || defaultValue.overrides != null;
|
|
3344
|
+
return {
|
|
3345
|
+
...defaultValue.fallback != null ? { fallback: defaultValue.fallback } : {},
|
|
3346
|
+
...hasOverrides ? { overrides: { ...shadowByWildcard(defaultValue.overrides, endpointValue.overrides) } } : {}
|
|
3347
|
+
};
|
|
3348
|
+
}
|
|
3349
|
+
/**
|
|
3350
|
+
* Flattens two override layers into one map that still resolves like the layered chain.
|
|
3351
|
+
* Resolution reads exact keys before wildcards, so a plain spread would let a lower
|
|
3352
|
+
* layer's `image/png` outrank the upper layer's `image/*`. Dropping the entries an
|
|
3353
|
+
* upper wildcard covers restores precedence without changing how lookups work.
|
|
3354
|
+
*/
|
|
3355
|
+
function shadowByWildcard(lower, upper) {
|
|
3356
|
+
if (!lower) return { ...upper };
|
|
3357
|
+
const upperWildcards = /* @__PURE__ */ new Set();
|
|
3358
|
+
for (const key in upper) if (key.endsWith("/*")) upperWildcards.add(key.slice(0, -1));
|
|
3359
|
+
if (upperWildcards.size === 0) return {
|
|
3360
|
+
...lower,
|
|
3361
|
+
...upper
|
|
3362
|
+
};
|
|
3363
|
+
const retained = {};
|
|
3364
|
+
for (const key in lower) if (!(!key.endsWith("/*") && upperWildcards.has(key.slice(0, key.indexOf("/") + 1)) && upper?.[key] == null)) retained[key] = lower[key];
|
|
3365
|
+
return {
|
|
3366
|
+
...retained,
|
|
3367
|
+
...upper
|
|
3368
|
+
};
|
|
3369
|
+
}
|
|
3370
|
+
function getEndpointFileConfig(params) {
|
|
3371
|
+
const { fileConfig: mergedFileConfig, endpoint, endpointType } = params;
|
|
3372
|
+
if (!mergedFileConfig?.endpoints) return fileConfig.endpoints.default;
|
|
3373
|
+
/** Compute an effective default by merging user-configured default over the base default */
|
|
3374
|
+
const baseDefaultConfig = fileConfig.endpoints.default;
|
|
3375
|
+
const globalDefaultConfig = {
|
|
3376
|
+
...baseDefaultConfig,
|
|
3377
|
+
defaultLLMDeliveryPath: mergeDeliveryPathConfig(mergedFileConfig.defaultLLMDeliveryPath, baseDefaultConfig.defaultLLMDeliveryPath),
|
|
3378
|
+
legacyFileUploadUX: mergedFileConfig.legacyFileUploadUX ?? baseDefaultConfig.legacyFileUploadUX,
|
|
3379
|
+
textFallbackWithoutTools: mergedFileConfig.textFallbackWithoutTools ?? baseDefaultConfig.textFallbackWithoutTools
|
|
3380
|
+
};
|
|
3114
3381
|
const userDefaultConfig = mergedFileConfig.endpoints.default;
|
|
3115
|
-
const defaultConfig = userDefaultConfig ? mergeWithDefault(userDefaultConfig,
|
|
3382
|
+
const defaultConfig = userDefaultConfig ? mergeWithDefault(userDefaultConfig, globalDefaultConfig, "default") : globalDefaultConfig;
|
|
3116
3383
|
const normalizedEndpoint = normalizeEndpointName(endpoint ?? "");
|
|
3117
3384
|
const standardEndpoints = new Set([
|
|
3118
3385
|
"default",
|
|
@@ -3167,9 +3434,18 @@ function mergeFileConfig(dynamic) {
|
|
|
3167
3434
|
}
|
|
3168
3435
|
};
|
|
3169
3436
|
if (!dynamic) return mergedConfig;
|
|
3437
|
+
if (dynamic.defaultLLMDeliveryPath !== void 0) mergedConfig.defaultLLMDeliveryPath = dynamic.defaultLLMDeliveryPath;
|
|
3438
|
+
if (dynamic.legacyFileUploadUX !== void 0) mergedConfig.legacyFileUploadUX = dynamic.legacyFileUploadUX;
|
|
3439
|
+
if (dynamic.textFallbackWithoutTools !== void 0) mergedConfig.textFallbackWithoutTools = dynamic.textFallbackWithoutTools;
|
|
3170
3440
|
if (dynamic.serverFileSizeLimit !== void 0) mergedConfig.serverFileSizeLimit = mbToBytes(dynamic.serverFileSizeLimit);
|
|
3171
3441
|
if (dynamic.avatarSizeLimit !== void 0) mergedConfig.avatarSizeLimit = mbToBytes(dynamic.avatarSizeLimit);
|
|
3172
3442
|
if (dynamic.fileTokenLimit !== void 0) mergedConfig.fileTokenLimit = dynamic.fileTokenLimit;
|
|
3443
|
+
if (dynamic.fileContextSizeLimit !== void 0) mergedConfig.fileContextSizeLimit = mbToBytes(dynamic.fileContextSizeLimit);
|
|
3444
|
+
if (dynamic.fileContextCharLimit !== void 0) mergedConfig.fileContextCharLimit = dynamic.fileContextCharLimit;
|
|
3445
|
+
if (dynamic.skills?.importCleanupConcurrency !== void 0) mergedConfig.skills = {
|
|
3446
|
+
...mergedConfig.skills,
|
|
3447
|
+
importCleanupConcurrency: dynamic.skills.importCleanupConcurrency
|
|
3448
|
+
};
|
|
3173
3449
|
if (dynamic.skills?.fileSizeLimit !== void 0) mergedConfig.skills = {
|
|
3174
3450
|
...mergedConfig.skills,
|
|
3175
3451
|
fileSizeLimit: mbToBytes(dynamic.skills.fileSizeLimit)
|
|
@@ -3217,6 +3493,9 @@ function mergeFileConfig(dynamic) {
|
|
|
3217
3493
|
});
|
|
3218
3494
|
if (dynamicEndpoint.disabled !== void 0) mergedEndpoint.disabled = dynamicEndpoint.disabled;
|
|
3219
3495
|
if (dynamicEndpoint.supportedMimeTypes) mergedEndpoint.supportedMimeTypes = convertStringsToRegex(dynamicEndpoint.supportedMimeTypes);
|
|
3496
|
+
if (dynamicEndpoint.defaultLLMDeliveryPath !== void 0) mergedEndpoint.defaultLLMDeliveryPath = dynamicEndpoint.defaultLLMDeliveryPath;
|
|
3497
|
+
if (dynamicEndpoint.legacyFileUploadUX !== void 0) mergedEndpoint.legacyFileUploadUX = dynamicEndpoint.legacyFileUploadUX;
|
|
3498
|
+
if (dynamicEndpoint.textFallbackWithoutTools !== void 0) mergedEndpoint.textFallbackWithoutTools = dynamicEndpoint.textFallbackWithoutTools;
|
|
3220
3499
|
}
|
|
3221
3500
|
return mergedConfig;
|
|
3222
3501
|
}
|
|
@@ -3246,6 +3525,8 @@ const codeEnvironments = () => `${BASE_URL}/api/code-environments`;
|
|
|
3246
3525
|
const codeEnvironmentPairings = () => `${codeEnvironments()}/pairings`;
|
|
3247
3526
|
const codeEnvironmentById = (id) => `${codeEnvironments()}/${encodeURIComponent(id)}`;
|
|
3248
3527
|
const codeEnvironmentSettings = (id) => `${codeEnvironmentById(id)}/settings`;
|
|
3528
|
+
const codeEnvironmentStatus = (id) => `${codeEnvironmentById(id)}/status`;
|
|
3529
|
+
const codeEnvironmentConversationDecision = (conversationId) => `${codeEnvironments()}/conversations/${encodeURIComponent(conversationId)}/decision`;
|
|
3249
3530
|
const messagesRoot = `${BASE_URL}/api/messages`;
|
|
3250
3531
|
const messages = (params) => {
|
|
3251
3532
|
const { conversationId, messageId, ...rest } = params;
|
|
@@ -3458,8 +3739,15 @@ const listSkillsWithFilters = (filter) => {
|
|
|
3458
3739
|
};
|
|
3459
3740
|
const skillFiles = (id) => `${getSkill$1(id)}/files`;
|
|
3460
3741
|
const skillFile = (id, relativePath) => `${skillFiles(id)}/${encodeURIComponent(relativePath)}`;
|
|
3461
|
-
const insights = () => `${BASE_URL}/api/
|
|
3742
|
+
const insights = () => `${BASE_URL}/api/insights`;
|
|
3462
3743
|
const insightsAccess = () => `${insights()}/access`;
|
|
3744
|
+
const conversationTrace = (conversationId) => `${BASE_URL}/api/traces/${encodeURIComponent(conversationId)}`;
|
|
3745
|
+
const conversationTraceAvailability = (conversationId) => `${conversationTrace(conversationId)}/availability`;
|
|
3746
|
+
const conversationTraceRecords = (conversationId, cursor) => `${conversationTrace(conversationId)}/records${cursor ? `?${new URLSearchParams({ cursor }).toString()}` : ""}`;
|
|
3747
|
+
const conversationTraceRecord = (conversationId, recordId, messageId, sourceId) => `${conversationTrace(conversationId)}/records/${encodeURIComponent(recordId)}?${new URLSearchParams({
|
|
3748
|
+
message: messageId,
|
|
3749
|
+
...sourceId ? { source: sourceId } : {}
|
|
3750
|
+
}).toString()}`;
|
|
3463
3751
|
const adminSkillsSync = () => `${BASE_URL}/api/admin/skills/sync`;
|
|
3464
3752
|
const adminSkillsSyncStatus = () => `${adminSkillsSync()}/status`;
|
|
3465
3753
|
const adminSkillsSyncRun = () => `${adminSkillsSync()}/run`;
|
|
@@ -3468,6 +3756,7 @@ const skillStates = () => `${BASE_URL}/api/user/settings/skills/active`;
|
|
|
3468
3756
|
const adminLangfuseConnection = () => `${BASE_URL}/api/admin/langfuse/connection`;
|
|
3469
3757
|
const adminLangfuseConnectionTest = () => `${adminLangfuseConnection()}/test`;
|
|
3470
3758
|
const adminLangfuseSessionLink = (conversationId) => `${adminLangfuseConnection()}/session/${encodeURIComponent(conversationId)}`;
|
|
3759
|
+
const pinnedOrder = () => `${BASE_URL}/api/user/settings/pinned-order`;
|
|
3471
3760
|
const toolFavorites = () => `${BASE_URL}/api/user/settings/favorites/tools`;
|
|
3472
3761
|
const toolFavorite = (itemType, itemId) => `${toolFavorites()}/${itemType}/${encodeURIComponent(itemId)}`;
|
|
3473
3762
|
const roles = () => `${BASE_URL}/api/roles`;
|
|
@@ -3539,6 +3828,7 @@ let FileContext = /* @__PURE__ */ function(FileContext) {
|
|
|
3539
3828
|
FileContext["image_generation"] = "image_generation";
|
|
3540
3829
|
FileContext["assistants_output"] = "assistants_output";
|
|
3541
3830
|
FileContext["message_attachment"] = "message_attachment";
|
|
3831
|
+
FileContext["run_artifact"] = "run_artifact";
|
|
3542
3832
|
FileContext["skill_file"] = "skill_file";
|
|
3543
3833
|
FileContext["filename"] = "filename";
|
|
3544
3834
|
FileContext["updatedAt"] = "updatedAt";
|
|
@@ -3567,8 +3857,20 @@ let TokenExchangeMethodEnum = /* @__PURE__ */ function(TokenExchangeMethodEnum)
|
|
|
3567
3857
|
TokenExchangeMethodEnum["BasicAuthHeader"] = "basic_auth_header";
|
|
3568
3858
|
return TokenExchangeMethodEnum;
|
|
3569
3859
|
}({});
|
|
3860
|
+
const agentGitIdentitySchema = zod.z.object({
|
|
3861
|
+
name: zod.z.string().trim().min(1).max(128).refine((value) => !/[\0\r\n]/.test(value)),
|
|
3862
|
+
email: zod.z.string().trim().email().max(254).refine((value) => !/[\0\r\n]/.test(value))
|
|
3863
|
+
}).optional();
|
|
3570
3864
|
//#endregion
|
|
3571
3865
|
//#region src/mcp.ts
|
|
3866
|
+
/**
|
|
3867
|
+
* Upper bound on a stored MCP `iconPath` (URL or data URI). Enforced by
|
|
3868
|
+
* `sanitizeMcpIconPath`, not a schema `.max()`, so re-submitting a server whose
|
|
3869
|
+
* stored icon predates the cap clears the icon instead of rejecting the update.
|
|
3870
|
+
*/
|
|
3871
|
+
const MAX_MCP_ICON_PATH_LENGTH = 256 * 1024;
|
|
3872
|
+
/** Keep persistence admission waits below the shared lease's 15-minute lifetime. */
|
|
3873
|
+
const MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS = 14 * 6e4;
|
|
3572
3874
|
const validateOAuthClientCredentials = (oauth, ctx) => {
|
|
3573
3875
|
if (oauth.client_secret && !oauth.client_id) ctx.addIssue({
|
|
3574
3876
|
code: zod.z.ZodIssueCode.custom,
|
|
@@ -3643,6 +3945,27 @@ const OAuthOptionsBaseSchema = zod.z.object({
|
|
|
3643
3945
|
* Ignored when `audience` itself is not configured.
|
|
3644
3946
|
*/
|
|
3645
3947
|
forward_audience_on_refresh: zod.z.boolean().optional(),
|
|
3948
|
+
/**
|
|
3949
|
+
* Whether to send the RFC 8707 `resource` parameter on `/authorize`, the
|
|
3950
|
+
* `authorization_code` exchange and the `refresh_token` grant. The value is the
|
|
3951
|
+
* canonical resource identifier from the MCP server's Protected Resource Metadata
|
|
3952
|
+
* (RFC 9728), never an operator-supplied string.
|
|
3953
|
+
*
|
|
3954
|
+
* Default: `true`. RFC 8707 makes `resource` OPTIONAL, and authorization servers
|
|
3955
|
+
* that reject it cannot complete a flow that sends it: Microsoft Entra ID v2.0
|
|
3956
|
+
* fails an `/authorize` request carrying both `resource` and `scope` with
|
|
3957
|
+
* `AADSTS9010010`. Set to `false` for those providers, and rely on `scope` (or
|
|
3958
|
+
* `audience` above) to obtain an API-scoped token.
|
|
3959
|
+
*
|
|
3960
|
+
* Opting out suppresses the parameter only. Protected Resource Metadata is still
|
|
3961
|
+
* discovered, still validated against the MCP server URL (RFC 9728 §3.3), and
|
|
3962
|
+
* still recorded on the stored client binding, so scope discovery, authorization
|
|
3963
|
+
* server discovery and re-authentication checks are unaffected.
|
|
3964
|
+
*
|
|
3965
|
+
* This field is only accepted from trusted/admin MCP configuration and is rejected
|
|
3966
|
+
* from user-managed servers.
|
|
3967
|
+
*/
|
|
3968
|
+
send_resource_parameter: zod.z.boolean().optional(),
|
|
3646
3969
|
/** OAuth revocation endpoint (optional - can be auto-discovered) */
|
|
3647
3970
|
revocation_endpoint: zod.z.string().transform((val) => extractEnvVariable(val)).pipe(zod.z.string().url()).optional(),
|
|
3648
3971
|
/** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
|
|
@@ -3661,14 +3984,16 @@ const userOAuthEndpointUrlSchema = zod.z.string().refine((val) => !envVarPattern
|
|
|
3661
3984
|
}, { message: "OAuth endpoint URLs cannot include audience or resource query parameters" });
|
|
3662
3985
|
const UserOAuthOptionsSchema = OAuthOptionsBaseSchema.omit({
|
|
3663
3986
|
audience: true,
|
|
3664
|
-
forward_audience_on_refresh: true
|
|
3987
|
+
forward_audience_on_refresh: true,
|
|
3988
|
+
send_resource_parameter: true
|
|
3665
3989
|
}).extend({
|
|
3666
3990
|
authorization_url: userOAuthEndpointUrlSchema.optional(),
|
|
3667
3991
|
token_url: userOAuthEndpointUrlSchema.optional(),
|
|
3668
3992
|
redirect_uri: userOAuthEndpointUrlSchema.optional(),
|
|
3669
3993
|
revocation_endpoint: userOAuthEndpointUrlSchema.optional(),
|
|
3670
3994
|
audience: zod.z.never().optional(),
|
|
3671
|
-
forward_audience_on_refresh: zod.z.never().optional()
|
|
3995
|
+
forward_audience_on_refresh: zod.z.never().optional(),
|
|
3996
|
+
send_resource_parameter: zod.z.never().optional()
|
|
3672
3997
|
}).superRefine(validateOAuthClientCredentials);
|
|
3673
3998
|
const OboOptionsSchema = zod.z.object({
|
|
3674
3999
|
/** Scopes to request for the downstream MCP server (e.g., "api://<client-id>/Mcp.Tools.ReadWrite") */
|
|
@@ -3693,6 +4018,21 @@ const BaseOptionsSchema = zod.z.object({
|
|
|
3693
4018
|
sseReadTimeout: zod.z.number().int().positive().optional(),
|
|
3694
4019
|
initTimeout: zod.z.number().int().nonnegative().optional(),
|
|
3695
4020
|
/**
|
|
4021
|
+
* How long (ms) a replica waits for another replica's in-flight OAuth refresh-token redemption
|
|
4022
|
+
* before failing the attempt as retryable. Raise it for a slow token endpoint; lower it to fail
|
|
4023
|
+
* faster. Default when unset: 15_000. Clamped to 30_000, half the window after which a
|
|
4024
|
+
* redemption aborts itself, because this wait runs inside the redemption that window governs.
|
|
4025
|
+
*
|
|
4026
|
+
* Positive rather than non-negative: zero would mean "never wait for a peer", which fails every
|
|
4027
|
+
* contended refresh instead of adopting the rotation a peer is about to store, and that is the
|
|
4028
|
+
* common case this wait exists to serve. Omit the field to take the default.
|
|
4029
|
+
*/
|
|
4030
|
+
oauthRefreshWaitTimeout: zod.z.number().int().positive().optional(),
|
|
4031
|
+
/** Enable only after every replica has upgraded to the coordinated OAuth writer protocol. Default: false. */
|
|
4032
|
+
oauthRefreshCoordination: zod.z.boolean().optional(),
|
|
4033
|
+
/** Wait (ms) for callback/adoption persistence and publication. Default: 15_000; maximum: 840_000. */
|
|
4034
|
+
oauthPersistenceWaitTimeout: zod.z.number().int().positive().max(MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS).optional(),
|
|
4035
|
+
/**
|
|
3696
4036
|
* Whether the server is offered in chat.
|
|
3697
4037
|
*
|
|
3698
4038
|
* `false` hides it from the chat dropdown (MCPSelect) AND bars it from the
|
|
@@ -3826,6 +4166,13 @@ const SSEOptionsSchema = BaseOptionsSchema.extend({
|
|
|
3826
4166
|
type: zod.z.literal("sse").default("sse"),
|
|
3827
4167
|
headers: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3828
4168
|
/**
|
|
4169
|
+
* Headers resolved from the live chat request and merged over `headers`.
|
|
4170
|
+
* Omitted during catalog discovery, which has no request context, so a
|
|
4171
|
+
* `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
|
|
4172
|
+
* On a duplicate header name the resolved `requestHeaders` value wins.
|
|
4173
|
+
*/
|
|
4174
|
+
requestHeaders: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
4175
|
+
/**
|
|
3829
4176
|
* On-Behalf-Of (OBO) token exchange configuration.
|
|
3830
4177
|
* When configured, LibreChat exchanges the logged-in user's federated access token
|
|
3831
4178
|
* for a token scoped to this MCP server via the OAuth 2.0 OBO flow (jwt-bearer grant).
|
|
@@ -3844,6 +4191,13 @@ const StreamableHTTPOptionsSchema = BaseOptionsSchema.extend({
|
|
|
3844
4191
|
type: zod.z.union([zod.z.literal("streamable-http"), zod.z.literal("http")]),
|
|
3845
4192
|
headers: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3846
4193
|
/**
|
|
4194
|
+
* Headers resolved from the live chat request and merged over `headers`.
|
|
4195
|
+
* Omitted during catalog discovery, which has no request context, so a
|
|
4196
|
+
* `{{LIBRECHAT_BODY_*}}` placeholder here does not block tool listing.
|
|
4197
|
+
* On a duplicate header name the resolved `requestHeaders` value wins.
|
|
4198
|
+
*/
|
|
4199
|
+
requestHeaders: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
4200
|
+
/**
|
|
3847
4201
|
* On-Behalf-Of (OBO) token exchange configuration.
|
|
3848
4202
|
* When configured, LibreChat exchanges the logged-in user's federated access token
|
|
3849
4203
|
* for a token scoped to this MCP server via the OAuth 2.0 OBO flow (jwt-bearer grant).
|
|
@@ -3873,6 +4227,9 @@ const omitServerManagedFields = (schema) => schema.omit({
|
|
|
3873
4227
|
timeout: true,
|
|
3874
4228
|
sseReadTimeout: true,
|
|
3875
4229
|
initTimeout: true,
|
|
4230
|
+
oauthRefreshWaitTimeout: true,
|
|
4231
|
+
oauthRefreshCoordination: true,
|
|
4232
|
+
oauthPersistenceWaitTimeout: true,
|
|
3876
4233
|
chatMenu: true,
|
|
3877
4234
|
serverInstructions: true,
|
|
3878
4235
|
requiresOAuth: true,
|
|
@@ -3939,6 +4296,8 @@ const MCP_USER_INPUT_FIELDS = (() => {
|
|
|
3939
4296
|
})();
|
|
3940
4297
|
//#endregion
|
|
3941
4298
|
//#region src/config.ts
|
|
4299
|
+
const AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT = 24 * 1024;
|
|
4300
|
+
const AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX = 64 * 1024;
|
|
3942
4301
|
const defaultSocialLogins = [
|
|
3943
4302
|
"google",
|
|
3944
4303
|
"facebook",
|
|
@@ -3947,6 +4306,8 @@ const defaultSocialLogins = [
|
|
|
3947
4306
|
"discord",
|
|
3948
4307
|
"saml"
|
|
3949
4308
|
];
|
|
4309
|
+
/** How long a started social login may take to return to its callback before its `state` expires. */
|
|
4310
|
+
const DEFAULT_OAUTH_STATE_TTL_MS = 600 * 1e3;
|
|
3950
4311
|
const BASE_ONLY_CONFIG_SECTIONS = ["filters"];
|
|
3951
4312
|
/** Sections that may be stored in the tenant's base config document but must
|
|
3952
4313
|
* not be overridden or tombstoned by role, group, or user config documents. */
|
|
@@ -3977,6 +4338,8 @@ const excludedKeys = new Set([
|
|
|
3977
4338
|
"conversationId",
|
|
3978
4339
|
"agentEventBinding",
|
|
3979
4340
|
"agentEventActor",
|
|
4341
|
+
"agentEventActorCleanup",
|
|
4342
|
+
"agentEventActorSuspension",
|
|
3980
4343
|
"agentEventActorReconciliations",
|
|
3981
4344
|
"agentEventActorEpoch",
|
|
3982
4345
|
"agentEventActorLegacyTurn",
|
|
@@ -4485,13 +4848,13 @@ function isRemoteOidcUrlAllowed(value) {
|
|
|
4485
4848
|
}
|
|
4486
4849
|
const remoteApiOidcUrlSchema = zod.z.string().url().refine(isRemoteOidcUrlAllowed, { message: "must use https:// unless targeting localhost" });
|
|
4487
4850
|
const remoteApiOidcScopeSchema = zod.z.string().refine((scope) => !scope.includes(","), { message: "scopes must be space-separated" });
|
|
4488
|
-
const
|
|
4851
|
+
const oidcAccessTokenSchema = zod.z.object({
|
|
4489
4852
|
enabled: zod.z.boolean().default(false),
|
|
4490
4853
|
issuer: remoteApiOidcUrlSchema.optional(),
|
|
4491
4854
|
audience: zod.z.string().min(1).optional(),
|
|
4492
|
-
jwksUri: remoteApiOidcUrlSchema.optional()
|
|
4493
|
-
|
|
4494
|
-
|
|
4855
|
+
jwksUri: remoteApiOidcUrlSchema.optional()
|
|
4856
|
+
});
|
|
4857
|
+
function validateEnabledOidc(oidc, ctx) {
|
|
4495
4858
|
if (oidc.enabled === true && !oidc.issuer) ctx.addIssue({
|
|
4496
4859
|
code: zod.z.ZodIssueCode.custom,
|
|
4497
4860
|
path: ["issuer"],
|
|
@@ -4502,12 +4865,60 @@ const remoteApiOidcSchema = zod.z.object({
|
|
|
4502
4865
|
path: ["audience"],
|
|
4503
4866
|
message: "audience is required when OIDC auth is enabled"
|
|
4504
4867
|
});
|
|
4505
|
-
}
|
|
4868
|
+
}
|
|
4869
|
+
const remoteApiOidcSchema = oidcAccessTokenSchema.extend({ scope: remoteApiOidcScopeSchema.optional() }).superRefine(validateEnabledOidc);
|
|
4506
4870
|
const remoteApiAuthSchema = zod.z.object({
|
|
4507
4871
|
apiKey: zod.z.object({ enabled: zod.z.boolean().default(true) }).optional(),
|
|
4508
4872
|
oidc: remoteApiOidcSchema.optional()
|
|
4509
4873
|
});
|
|
4510
4874
|
const remoteApiSchema = zod.z.object({ auth: remoteApiAuthSchema.optional() });
|
|
4875
|
+
const managementClientBindingSchema = zod.z.object({
|
|
4876
|
+
clientId: zod.z.string().trim().min(1).max(128),
|
|
4877
|
+
subject: zod.z.string().trim().min(1).max(512).optional(),
|
|
4878
|
+
userId: zod.z.string().trim().regex(/^[a-f\d]{24}$/i, "must be a MongoDB ObjectId").transform((userId) => userId.toLowerCase()),
|
|
4879
|
+
tenantId: zod.z.string().trim().min(1).max(128).regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/, "must be a valid tenant id").refine((tenantId) => tenantId !== "__SYSTEM__", "system tenant is not allowed"),
|
|
4880
|
+
enabled: zod.z.boolean().default(true)
|
|
4881
|
+
}).strict();
|
|
4882
|
+
const managementApiOidcSchema = oidcAccessTokenSchema.extend({
|
|
4883
|
+
tokenUse: zod.z.literal("access").optional(),
|
|
4884
|
+
requiredScopes: zod.z.array(zod.z.string().trim().min(1).max(256).regex(/^\S+$/, "must be a single scope token")).min(1).max(20).optional()
|
|
4885
|
+
}).strict().superRefine((oidc, ctx) => {
|
|
4886
|
+
if (oidc.enabled === true && !oidc.issuer) ctx.addIssue({
|
|
4887
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4888
|
+
path: ["issuer"],
|
|
4889
|
+
message: "issuer is required when OIDC auth is enabled"
|
|
4890
|
+
});
|
|
4891
|
+
if (oidc.enabled === true && !oidc.audience && (oidc.tokenUse !== "access" || !oidc.requiredScopes?.length)) ctx.addIssue({
|
|
4892
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4893
|
+
path: ["requiredScopes"],
|
|
4894
|
+
message: "audience or access-token validation with required scopes is required when OIDC auth is enabled"
|
|
4895
|
+
});
|
|
4896
|
+
});
|
|
4897
|
+
const managementApiAuthSchema = zod.z.object({
|
|
4898
|
+
oidc: managementApiOidcSchema,
|
|
4899
|
+
clients: zod.z.array(managementClientBindingSchema).max(100).default([])
|
|
4900
|
+
}).strict().superRefine((auth, ctx) => {
|
|
4901
|
+
if (auth.oidc.enabled === true && auth.clients.length === 0) ctx.addIssue({
|
|
4902
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4903
|
+
path: ["clients"],
|
|
4904
|
+
message: "at least one client binding is required when management auth is enabled"
|
|
4905
|
+
});
|
|
4906
|
+
const clientIds = /* @__PURE__ */ new Set();
|
|
4907
|
+
for (let index = 0; index < auth.clients.length; index++) {
|
|
4908
|
+
const client = auth.clients[index];
|
|
4909
|
+
if (clientIds.has(client.clientId)) ctx.addIssue({
|
|
4910
|
+
code: zod.z.ZodIssueCode.custom,
|
|
4911
|
+
path: [
|
|
4912
|
+
"clients",
|
|
4913
|
+
index,
|
|
4914
|
+
"clientId"
|
|
4915
|
+
],
|
|
4916
|
+
message: "client IDs must be unique"
|
|
4917
|
+
});
|
|
4918
|
+
clientIds.add(client.clientId);
|
|
4919
|
+
}
|
|
4920
|
+
});
|
|
4921
|
+
const managementApiSchema = zod.z.object({ auth: managementApiAuthSchema.optional() }).strict();
|
|
4511
4922
|
/**
|
|
4512
4923
|
* Permission mode applied to a tool call. Mirrors `@librechat/agents`'s
|
|
4513
4924
|
* `ToolPolicyMode` 1:1.
|
|
@@ -4581,6 +4992,24 @@ const toolApprovalPolicySchema = zod.z.object({
|
|
|
4581
4992
|
*/
|
|
4582
4993
|
hooks: zod.z.array(toolApprovalHookConfigSchema).optional()
|
|
4583
4994
|
}).optional();
|
|
4995
|
+
const askUserQuestionRetainedAnswersSchema = zod.z.object({
|
|
4996
|
+
/** `false` stops carrying answers forward; they then live only in the messages. */
|
|
4997
|
+
enabled: zod.z.boolean().optional(),
|
|
4998
|
+
/** Token ceiling for the carried block. Older answers drop first once it is
|
|
4999
|
+
* exceeded; the newest set is always kept. Defaults to
|
|
5000
|
+
* `DEFAULT_RETAINED_ANSWER_TOKENS` (4096). */
|
|
5001
|
+
maxTokens: zod.z.number().int().positive().optional()
|
|
5002
|
+
});
|
|
5003
|
+
/**
|
|
5004
|
+
* Behavior of the `ask_user_question` tool beyond the admin kill switch
|
|
5005
|
+
* (`filteredTools` / `includedTools`).
|
|
5006
|
+
*
|
|
5007
|
+
* `retainedAnswers`: every answer the user gave to an agent's question is
|
|
5008
|
+
* quoted verbatim in the run's user context, so it survives after the
|
|
5009
|
+
* messages that carried it were summarized, pruned or dropped from the context
|
|
5010
|
+
* window. On by default.
|
|
5011
|
+
*/
|
|
5012
|
+
const askUserQuestionConfigSchema = zod.z.object({ retainedAnswers: askUserQuestionRetainedAnswersSchema.optional() }).optional();
|
|
4584
5013
|
/**
|
|
4585
5014
|
* Durable checkpointer backing human-in-the-loop resume.
|
|
4586
5015
|
*
|
|
@@ -4646,22 +5075,55 @@ const codeEnvironmentPermissionFieldSchema = zod.z.object({
|
|
|
4646
5075
|
message: "Permission default must be included in allowed values"
|
|
4647
5076
|
});
|
|
4648
5077
|
});
|
|
5078
|
+
/** Existing attached commands used a fixed 30-second execution budget. */
|
|
5079
|
+
const CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS = 3e4;
|
|
5080
|
+
/** Protocol-level ceiling; deployments may only lower this value. */
|
|
5081
|
+
const CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS = 5 * 6e4;
|
|
5082
|
+
/**
|
|
5083
|
+
* Client retry horizon across Code API admission windows. Also the hard cap:
|
|
5084
|
+
* deployments may only lower it. `0` disables client retries, not the server's
|
|
5085
|
+
* initial admission wait or an already-admitted operation's execution budget.
|
|
5086
|
+
*/
|
|
5087
|
+
const CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS = 5 * 6e4;
|
|
4649
5088
|
/**
|
|
4650
5089
|
* Typed user-tunable surface for one attached code environment. Omitted fields
|
|
4651
5090
|
* remain fixed at LibreChat's safe baseline. Isolation, networking, mounts,
|
|
4652
5091
|
* privileged execution, and secrets are deliberately not representable here.
|
|
4653
5092
|
*/
|
|
4654
|
-
const codeEnvironmentUserConfigSchema = zod.z.object({
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
5093
|
+
const codeEnvironmentUserConfigSchema = zod.z.object({
|
|
5094
|
+
permissions: zod.z.object({
|
|
5095
|
+
fileWrite: codeEnvironmentPermissionFieldSchema.optional(),
|
|
5096
|
+
commandExecution: codeEnvironmentPermissionFieldSchema.optional()
|
|
5097
|
+
}).strict().optional(),
|
|
5098
|
+
limits: zod.z.object({
|
|
5099
|
+
/** Maximum timeout a Bash invocation may request. Omission preserves
|
|
5100
|
+
* the historical 30-second command budget. */
|
|
5101
|
+
maxCommandTimeoutMs: zod.z.number().int().min(1).max(CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS).optional(),
|
|
5102
|
+
/** Client retry horizon for capacity expirations, shared by preview/edit.
|
|
5103
|
+
* Omission keeps five minutes; `0` makes each required operation try once.
|
|
5104
|
+
* An in-flight request retains Code API's admission/execution budgets and
|
|
5105
|
+
* can finish after this horizon. This is not a server admission timeout. */
|
|
5106
|
+
maxQueueWaitMs: zod.z.number().int().min(0).max(CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS).optional()
|
|
5107
|
+
}).strict().optional()
|
|
5108
|
+
}).strict();
|
|
4658
5109
|
const codeEnvironmentUserSettingsSchema = zod.z.object({ permissions: zod.z.object({
|
|
4659
5110
|
fileWrite: codeEnvironmentPermissionDecisionSchema.optional(),
|
|
4660
5111
|
commandExecution: codeEnvironmentPermissionDecisionSchema.optional()
|
|
4661
5112
|
}).strict().optional() }).strict();
|
|
5113
|
+
const DEFAULT_MAX_PROVIDER_ERROR_CHARS = 2e3;
|
|
5114
|
+
const DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS = 9e5;
|
|
5115
|
+
const DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS = 3e5;
|
|
4662
5116
|
const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zod.z.object({
|
|
5117
|
+
/** Maximum provider error characters retained in unprotected terminal failures. */
|
|
5118
|
+
maxProviderErrorChars: zod.z.number().int().min(0).max(1e6).default(DEFAULT_MAX_PROVIDER_ERROR_CHARS),
|
|
5119
|
+
/** Maximum inactivity between provider response body chunks; 0 disables the idle timeout. */
|
|
5120
|
+
modelResponseBodyTimeoutMs: zod.z.number().int().min(0).max(864e5).default(DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS),
|
|
5121
|
+
/** Maximum wait for provider response headers; 0 disables the header timeout. */
|
|
5122
|
+
modelResponseHeadersTimeoutMs: zod.z.number().int().min(0).max(864e5).default(DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS),
|
|
4663
5123
|
recursionLimit: zod.z.number().optional(),
|
|
4664
5124
|
disableBuilder: zod.z.boolean().optional().default(false),
|
|
5125
|
+
/** Optional workspace guidance acquisition budget, separate from command execution. */
|
|
5126
|
+
repositoryInstructions: zod.z.object({ timeoutMs: zod.z.number().int().min(100).max(3e4).optional().default(2e3) }).optional(),
|
|
4665
5127
|
maxRecursionLimit: zod.z.number().optional(),
|
|
4666
5128
|
/** Max cumulative bytes a single streamed tool call's arguments may reach before the run
|
|
4667
5129
|
* aborts. Defaults to 64 KiB in the agents SDK; `0` disables the guard. */
|
|
@@ -4672,6 +5134,13 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zo
|
|
|
4672
5134
|
* disables the guard for that tool only. Merged over LibreChat's shipped default of
|
|
4673
5135
|
* `{ create_file: 131072 }`. */
|
|
4674
5136
|
maxToolCallArgBytesByTool: zod.z.record(zod.z.number()).optional(),
|
|
5137
|
+
/** Characters of retained tool output the save path may tokenize exactly for the
|
|
5138
|
+
* context gauge when a turn stops at the tool-call limit (see
|
|
5139
|
+
* `retainedToolTokens`). Tokenizing costs ~60 ms/MB and runs once per stopped
|
|
5140
|
+
* turn; past this ceiling the figure is withdrawn rather than estimated, so the
|
|
5141
|
+
* gauge under-reports that turn instead of blocking the save. Raise it for
|
|
5142
|
+
* deployments whose tools legitimately return more, lower it on slow hardware. */
|
|
5143
|
+
maxRetainedToolCountChars: zod.z.number().int().min(0).optional().default(DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS),
|
|
4675
5144
|
maxCitations: zod.z.number().min(1).max(50).optional().default(30),
|
|
4676
5145
|
maxCitationsPerFile: zod.z.number().min(1).max(10).optional().default(7),
|
|
4677
5146
|
minRelevanceScore: zod.z.number().min(0).max(1).optional().default(.45),
|
|
@@ -4679,12 +5148,35 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zo
|
|
|
4679
5148
|
* the shipped default of 10 for orchestration-heavy deployments, bounded by
|
|
4680
5149
|
* `MAX_SUBAGENTS_CEILING`. */
|
|
4681
5150
|
maxSubagents: zod.z.number().int().min(1).max(50).optional().default(10),
|
|
5151
|
+
/** Run-scoped file access for explicitly opted-in subagent delegations. */
|
|
5152
|
+
fileSharing: zod.z.object({
|
|
5153
|
+
enabled: zod.z.boolean().optional().default(false),
|
|
5154
|
+
allowSiblingSharing: zod.z.boolean().optional().default(false),
|
|
5155
|
+
maxFiles: zod.z.number().int().min(1).max(1e3).optional().default(100),
|
|
5156
|
+
/** Aggregate disk budget for private output versions retained during a run. */
|
|
5157
|
+
maxPrivateBytes: zod.z.number().int().min(1).max(10737418240).optional().default(268435456),
|
|
5158
|
+
ttlMs: zod.z.number().int().min(1).max(864e5).optional().default(36e5)
|
|
5159
|
+
}).optional(),
|
|
5160
|
+
/** Maximum concurrent Code API uploads per route and authenticated principal. */
|
|
5161
|
+
codeApiUploadConcurrency: zod.z.number().int().min(1).max(100).optional().default(3),
|
|
5162
|
+
/** Maximum wall-clock time spent waiting on Code API rate limits per operation. */
|
|
5163
|
+
codeApiMaxRetryWaitMs: zod.z.number().int().min(0).max(3e5).optional().default(2e4),
|
|
4682
5164
|
allowedProviders: zod.z.array(zod.z.union([zod.z.string(), eModelEndpointSchema])).optional(),
|
|
4683
5165
|
capabilities: zod.z.array(zod.z.nativeEnum(AgentCapabilities)).optional().default(defaultAgentCapabilities),
|
|
4684
5166
|
/** Controls which workspace-sharing scopes users may select for stateful code sessions.
|
|
4685
5167
|
* Omit this block to preserve the legacy behavior of allowing every scope. */
|
|
4686
5168
|
statefulCodeSessions: zod.z.object({
|
|
4687
5169
|
allowedEnvironments: zod.z.array(zod.z.enum(STATEFUL_CODE_ENVIRONMENTS)).min(1),
|
|
5170
|
+
/** Server-only personal worker enrollment policy. Effective principal
|
|
5171
|
+
* policy may tighten, but never raise, the deployment ceiling. */
|
|
5172
|
+
principalWorkers: zod.z.object({
|
|
5173
|
+
enabled: zod.z.boolean().optional(),
|
|
5174
|
+
/** Defaults to five. Zero disables enrollment; existing machines remain usable. */
|
|
5175
|
+
maxPerUser: zod.z.number().int().min(0).max(Number.MAX_SAFE_INTEGER).optional()
|
|
5176
|
+
}).optional(),
|
|
5177
|
+
/** Server-only policy letting a conversation's owner move its sealed attached decision
|
|
5178
|
+
* onto the environments its agents now use. Omit to keep sealed decisions immovable. */
|
|
5179
|
+
conversationMoves: zod.z.object({ enabled: zod.z.boolean().optional() }).optional(),
|
|
4688
5180
|
/** Operator-managed execution environments. Attached entries route to a
|
|
4689
5181
|
* Code API deployment backed by an outbound librechat-code worker. */
|
|
4690
5182
|
environments: zod.z.array(zod.z.object({
|
|
@@ -4791,11 +5283,25 @@ const agentsEndpointSchema = baseEndpointSchema.omit({ baseURL: true }).merge(zo
|
|
|
4791
5283
|
eventDriven: zod.z.object({ selfUrl: zod.z.string().url().optional() }).optional(),
|
|
4792
5284
|
/** Conversational background-task delivery policy. Automatic completion wakeups are
|
|
4793
5285
|
* enabled unless an administrator explicitly restores poll-only behavior. */
|
|
4794
|
-
backgroundTasks: zod.z.object({
|
|
5286
|
+
backgroundTasks: zod.z.object({
|
|
5287
|
+
completionWakeups: zod.z.boolean().optional().default(true),
|
|
5288
|
+
/** Maximum terminal output copied into the private completion receipt.
|
|
5289
|
+
* Generated files remain governed by their separate attachment policy. */
|
|
5290
|
+
completionResultMaxChars: zod.z.number().int().min(1).max(AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX).optional().default(AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT),
|
|
5291
|
+
/** Maximum message-backed sibling results in one continuation.
|
|
5292
|
+
* Independent receipts retain task-local delivery ownership. */
|
|
5293
|
+
completionResultBatchSize: zod.z.number().int().min(1).max(16).optional().default(8),
|
|
5294
|
+
/** Cooperative cancellation for process-local ordinary tools. Off
|
|
5295
|
+
* by default so existing deployments opt into the new control. */
|
|
5296
|
+
ordinaryToolCancellation: zod.z.boolean().optional().default(false)
|
|
5297
|
+
}).optional(),
|
|
4795
5298
|
skills: zod.z.object({ maxCatalogSkills: zod.z.number().int().min(1).max(100).optional() }).optional(),
|
|
5299
|
+
managementApi: managementApiSchema.optional(),
|
|
4796
5300
|
remoteApi: remoteApiSchema.optional(),
|
|
4797
5301
|
/** Human-in-the-loop tool approval policy. Off by default. */
|
|
4798
5302
|
toolApproval: toolApprovalPolicySchema,
|
|
5303
|
+
/** Ask User question behavior; see {@link askUserQuestionConfigSchema}. */
|
|
5304
|
+
askUserQuestion: askUserQuestionConfigSchema,
|
|
4799
5305
|
/** Durable checkpointer backing tool-approval and Ask User resume.
|
|
4800
5306
|
* Defaults to the app's MongoDB when either flow needs it. */
|
|
4801
5307
|
checkpointer: checkpointerSchema
|
|
@@ -5050,6 +5556,21 @@ const sttSchema = zod.z.object({
|
|
|
5050
5556
|
openai: sttOpenaiSchema.optional(),
|
|
5051
5557
|
azureOpenAI: sttAzureOpenAISchema.optional()
|
|
5052
5558
|
});
|
|
5559
|
+
/**
|
|
5560
|
+
* The speech providers a schema actually configures. `allowedAddresses` is transport
|
|
5561
|
+
* policy rather than a provider, and a provider key present but empty configures
|
|
5562
|
+
* nothing. The speech services accept a schema only when exactly one survives here, so
|
|
5563
|
+
* the upload router reads availability from the same list and never routes audio to a
|
|
5564
|
+
* transcription that cannot run.
|
|
5565
|
+
*/
|
|
5566
|
+
function listConfiguredSpeechProviders(schema) {
|
|
5567
|
+
if (schema == null) return [];
|
|
5568
|
+
return Object.entries(schema).filter(([key, value]) => key !== "allowedAddresses" && value != null && typeof value === "object" && Object.keys(value).length > 0);
|
|
5569
|
+
}
|
|
5570
|
+
/** Whether a speech schema names exactly one usable provider. */
|
|
5571
|
+
function isSpeechProviderConfigured(schema) {
|
|
5572
|
+
return listConfiguredSpeechProviders(schema).length === 1;
|
|
5573
|
+
}
|
|
5053
5574
|
const speechTab = zod.z.object({
|
|
5054
5575
|
conversationMode: zod.z.boolean().optional(),
|
|
5055
5576
|
advancedMode: zod.z.boolean().optional(),
|
|
@@ -5134,7 +5655,14 @@ const termsOfServiceSchema = zod.z.object({
|
|
|
5134
5655
|
modalContent: zod.z.string().or(zod.z.array(zod.z.string())).optional()
|
|
5135
5656
|
});
|
|
5136
5657
|
const localizedStringSchema = zod.z.union([zod.z.string(), zod.z.record(zod.z.string())]);
|
|
5658
|
+
const mcpRefreshDefaults = {
|
|
5659
|
+
toolsRefreshInterval: 300 * 1e3,
|
|
5660
|
+
statusRefreshInterval: 30 * 1e3
|
|
5661
|
+
};
|
|
5137
5662
|
const mcpServersSchema = zod.z.object({
|
|
5663
|
+
/** Foreground polling intervals in milliseconds; 0 disables polling. */
|
|
5664
|
+
toolsRefreshInterval: zod.z.number().int().nonnegative().max(2147483647).optional(),
|
|
5665
|
+
statusRefreshInterval: zod.z.number().int().nonnegative().max(2147483647).optional(),
|
|
5138
5666
|
placeholder: zod.z.string().optional(),
|
|
5139
5667
|
use: zod.z.boolean().optional(),
|
|
5140
5668
|
create: zod.z.boolean().optional(),
|
|
@@ -5146,6 +5674,76 @@ const mcpServersSchema = zod.z.object({
|
|
|
5146
5674
|
subLabel: localizedStringSchema.optional()
|
|
5147
5675
|
}).optional()
|
|
5148
5676
|
}).optional();
|
|
5677
|
+
/** Values the trace viewer uses for any `interface.traceViewer` field left unset. */
|
|
5678
|
+
const traceViewerDefaults = {
|
|
5679
|
+
enabled: false,
|
|
5680
|
+
showInputOutput: false,
|
|
5681
|
+
showToolNames: false,
|
|
5682
|
+
maxRecords: 1e3,
|
|
5683
|
+
maxContentLength: 5e4,
|
|
5684
|
+
requestsPerMinute: 30,
|
|
5685
|
+
requestTimeoutMs: 1e4
|
|
5686
|
+
};
|
|
5687
|
+
/** Inclusive bounds for the numeric `interface.traceViewer` fields. */
|
|
5688
|
+
const traceViewerLimits = {
|
|
5689
|
+
maxRecords: {
|
|
5690
|
+
min: 1,
|
|
5691
|
+
max: 1e4
|
|
5692
|
+
},
|
|
5693
|
+
maxContentLength: {
|
|
5694
|
+
min: 1,
|
|
5695
|
+
max: 1e6
|
|
5696
|
+
},
|
|
5697
|
+
requestsPerMinute: {
|
|
5698
|
+
min: 1,
|
|
5699
|
+
max: 1e3
|
|
5700
|
+
},
|
|
5701
|
+
requestTimeoutMs: {
|
|
5702
|
+
min: 1e3,
|
|
5703
|
+
max: 3e5
|
|
5704
|
+
}
|
|
5705
|
+
};
|
|
5706
|
+
const boundedIntegerSchema = (field) => zod.z.number().int().min(traceViewerLimits[field].min).max(traceViewerLimits[field].max).optional();
|
|
5707
|
+
const traceViewerSchema = zod.z.object({
|
|
5708
|
+
/** Shows the conversation trace control for traces this deployment exported. */
|
|
5709
|
+
enabled: zod.z.boolean().optional(),
|
|
5710
|
+
/** Returns observation input, output and metadata in the record inspector. */
|
|
5711
|
+
showInputOutput: zod.z.boolean().optional(),
|
|
5712
|
+
/**
|
|
5713
|
+
* Names the tools of each tool round from the tracing backend's own record of the round, at the
|
|
5714
|
+
* cost of further backend reads per listed page, which carry each round's input and output.
|
|
5715
|
+
* Off, a round is named only when the chat's messages can be matched to the trace.
|
|
5716
|
+
*/
|
|
5717
|
+
showToolNames: zod.z.boolean().optional(),
|
|
5718
|
+
/** Observations read from the tracing backend per request. */
|
|
5719
|
+
maxRecords: boundedIntegerSchema("maxRecords"),
|
|
5720
|
+
/** Characters kept from each input, output and metadata value before truncation. */
|
|
5721
|
+
maxContentLength: boundedIntegerSchema("maxContentLength"),
|
|
5722
|
+
/** Trace reads one user may start per minute. */
|
|
5723
|
+
requestsPerMinute: boundedIntegerSchema("requestsPerMinute"),
|
|
5724
|
+
/** Budget for each round trip to the tracing backend, in milliseconds. */
|
|
5725
|
+
requestTimeoutMs: boundedIntegerSchema("requestTimeoutMs")
|
|
5726
|
+
});
|
|
5727
|
+
function boundedInteger(value, field) {
|
|
5728
|
+
const { min, max } = traceViewerLimits[field];
|
|
5729
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= min ? Math.min(value, max) : traceViewerDefaults[field];
|
|
5730
|
+
}
|
|
5731
|
+
/**
|
|
5732
|
+
* Fills unset or invalid `interface.traceViewer` fields from
|
|
5733
|
+
* {@link traceViewerDefaults}. Admin config overrides reach runtime without
|
|
5734
|
+
* schema validation, so every consumer reads the section through this.
|
|
5735
|
+
*/
|
|
5736
|
+
function resolveTraceViewerConfig(config) {
|
|
5737
|
+
return {
|
|
5738
|
+
enabled: config?.enabled === true,
|
|
5739
|
+
showInputOutput: config?.showInputOutput === true,
|
|
5740
|
+
showToolNames: config?.showToolNames === true,
|
|
5741
|
+
maxRecords: boundedInteger(config?.maxRecords, "maxRecords"),
|
|
5742
|
+
maxContentLength: boundedInteger(config?.maxContentLength, "maxContentLength"),
|
|
5743
|
+
requestsPerMinute: boundedInteger(config?.requestsPerMinute, "requestsPerMinute"),
|
|
5744
|
+
requestTimeoutMs: boundedInteger(config?.requestTimeoutMs, "requestTimeoutMs")
|
|
5745
|
+
};
|
|
5746
|
+
}
|
|
5149
5747
|
let RetentionMode = /* @__PURE__ */ function(RetentionMode) {
|
|
5150
5748
|
RetentionMode["ALL"] = "all";
|
|
5151
5749
|
RetentionMode["TEMPORARY"] = "temporary";
|
|
@@ -5160,6 +5758,8 @@ const interfaceSchema = zod.z.object({
|
|
|
5160
5758
|
customWelcome: zod.z.string().optional(),
|
|
5161
5759
|
mcpServers: mcpServersSchema.optional(),
|
|
5162
5760
|
modelSelect: zod.z.boolean().optional(),
|
|
5761
|
+
/** Milliseconds between syntax highlights while a code block streams. */
|
|
5762
|
+
codeHighlightThrottleMs: zod.z.number().int().min(0).max(6e4).default(300),
|
|
5163
5763
|
parameters: zod.z.boolean().optional(),
|
|
5164
5764
|
multiConvo: zod.z.boolean().optional(),
|
|
5165
5765
|
bookmarks: zod.z.boolean().optional(),
|
|
@@ -5179,6 +5779,7 @@ const interfaceSchema = zod.z.object({
|
|
|
5179
5779
|
})]).optional(),
|
|
5180
5780
|
temporaryChat: zod.z.boolean().optional(),
|
|
5181
5781
|
temporaryChatRetention: zod.z.number().min(1).max(8760).optional(),
|
|
5782
|
+
generalChatRetention: zod.z.number().min(1).max(8760).optional(),
|
|
5182
5783
|
autoSubmitFromUrl: zod.z.boolean().optional(),
|
|
5183
5784
|
retentionMode: zod.z.nativeEnum(RetentionMode).default("temporary"),
|
|
5184
5785
|
retainAgentFiles: zod.z.boolean().optional(),
|
|
@@ -5199,6 +5800,7 @@ const interfaceSchema = zod.z.object({
|
|
|
5199
5800
|
marketplace: zod.z.object({ use: zod.z.boolean().optional() }).optional(),
|
|
5200
5801
|
fileSearch: zod.z.boolean().optional(),
|
|
5201
5802
|
fileCitations: zod.z.boolean().optional(),
|
|
5803
|
+
traceViewer: traceViewerSchema.optional(),
|
|
5202
5804
|
/** Tool keys (and `'mcp'` or an MCP server name) pinned to the prompt bar by default */
|
|
5203
5805
|
defaultPinnedTools: zod.z.array(zod.z.string()).optional(),
|
|
5204
5806
|
buildInfo: zod.z.boolean().optional(),
|
|
@@ -5227,7 +5829,10 @@ const interfaceSchema = zod.z.object({
|
|
|
5227
5829
|
maxPerUser: zod.z.number().int().min(0).optional(),
|
|
5228
5830
|
minIntervalMinutes: zod.z.number().int().min(1).optional(),
|
|
5229
5831
|
autoDisableAfterFailures: zod.z.number().int().min(1).optional(),
|
|
5832
|
+
admissionConcurrency: zod.z.number().int().min(1).max(100).optional(),
|
|
5230
5833
|
fireConcurrency: zod.z.number().int().min(1).optional(),
|
|
5834
|
+
mcpPreflightConcurrency: zod.z.number().int().min(1).max(10).optional(),
|
|
5835
|
+
mcpPreflightTimeoutMs: zod.z.number().int().min(1e3).max(6e5).optional(),
|
|
5231
5836
|
/** Refuse schedules that are not filed under a chat project. Enforced on
|
|
5232
5837
|
* create/update AND at every fire, so raising it later stops schedules
|
|
5233
5838
|
* that predate the policy instead of grandfathering them. */
|
|
@@ -5240,6 +5845,7 @@ const interfaceSchema = zod.z.object({
|
|
|
5240
5845
|
})]).optional()
|
|
5241
5846
|
}).default({
|
|
5242
5847
|
modelSelect: true,
|
|
5848
|
+
codeHighlightThrottleMs: 300,
|
|
5243
5849
|
parameters: true,
|
|
5244
5850
|
presets: true,
|
|
5245
5851
|
multiConvo: true,
|
|
@@ -5496,7 +6102,8 @@ const balanceSchema = zod.z.object({
|
|
|
5496
6102
|
autoRefillEnabled: zod.z.boolean().optional().default(false),
|
|
5497
6103
|
refillIntervalValue: zod.z.number().optional().default(30),
|
|
5498
6104
|
refillIntervalUnit: zod.z.enum(REFILL_INTERVAL_UNITS).optional().default("days"),
|
|
5499
|
-
refillAmount: zod.z.number().optional().default(1e4)
|
|
6105
|
+
refillAmount: zod.z.number().optional().default(1e4),
|
|
6106
|
+
reservationTtlMs: zod.z.number().int().min(MIN_BALANCE_RESERVATION_TTL_MS).optional().default(DEFAULT_BALANCE_RESERVATION_TTL_MS)
|
|
5500
6107
|
});
|
|
5501
6108
|
const transactionsSchema = zod.z.object({ enabled: zod.z.boolean().optional().default(true) });
|
|
5502
6109
|
const DEFAULT_MEMORY_MAX_INPUT_TOKENS = 12e3;
|
|
@@ -5620,6 +6227,57 @@ const messageFilterPiiSchema = zod.z.object({
|
|
|
5620
6227
|
});
|
|
5621
6228
|
});
|
|
5622
6229
|
const messageFilterSchema = zod.z.object({ pii: messageFilterPiiSchema.optional() });
|
|
6230
|
+
/** User fields a deployment may select as the Langfuse trace `userId`. */
|
|
6231
|
+
const LANGFUSE_TRACE_USER_ID_FIELDS = [
|
|
6232
|
+
"id",
|
|
6233
|
+
"email",
|
|
6234
|
+
"username",
|
|
6235
|
+
"name",
|
|
6236
|
+
"openidId",
|
|
6237
|
+
"samlId",
|
|
6238
|
+
"ldapId",
|
|
6239
|
+
"googleId",
|
|
6240
|
+
"githubId",
|
|
6241
|
+
"discordId",
|
|
6242
|
+
"appleId",
|
|
6243
|
+
"facebookId"
|
|
6244
|
+
];
|
|
6245
|
+
/** User fields a deployment may copy into Langfuse trace metadata. */
|
|
6246
|
+
const LANGFUSE_TRACE_USER_METADATA_FIELDS = [
|
|
6247
|
+
...LANGFUSE_TRACE_USER_ID_FIELDS,
|
|
6248
|
+
"role",
|
|
6249
|
+
"provider"
|
|
6250
|
+
];
|
|
6251
|
+
/** Request fields a deployment may copy into Langfuse trace metadata. */
|
|
6252
|
+
const LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS = [
|
|
6253
|
+
"conversationId",
|
|
6254
|
+
"endpoint",
|
|
6255
|
+
"endpointType",
|
|
6256
|
+
"provider",
|
|
6257
|
+
"model",
|
|
6258
|
+
"modelLabel",
|
|
6259
|
+
"spec"
|
|
6260
|
+
];
|
|
6261
|
+
/**
|
|
6262
|
+
* What a deployment attaches to every Langfuse trace beyond the defaults.
|
|
6263
|
+
* Nothing here is exported unless explicitly listed, so the default trace
|
|
6264
|
+
* carries only the internal user id and no user or request metadata.
|
|
6265
|
+
*/
|
|
6266
|
+
const langfuseTraceConfigSchema = zod.z.object({
|
|
6267
|
+
/**
|
|
6268
|
+
* Which user field becomes the trace `userId`. Defaults to the internal user
|
|
6269
|
+
* id; a user with no value for the chosen field keeps the internal id.
|
|
6270
|
+
*/
|
|
6271
|
+
userIdField: zod.z.enum(LANGFUSE_TRACE_USER_ID_FIELDS).optional(),
|
|
6272
|
+
/** User fields exported as `librechat.user.<field>` trace metadata. */
|
|
6273
|
+
userMetadataFields: zod.z.array(zod.z.enum(LANGFUSE_TRACE_USER_METADATA_FIELDS)).optional(),
|
|
6274
|
+
/**
|
|
6275
|
+
* Request fields exported as trace metadata: `librechat.conversation.id`,
|
|
6276
|
+
* `librechat.endpoint`, `librechat.endpoint.type`, `librechat.provider`,
|
|
6277
|
+
* `librechat.model`, `librechat.model.label`, and `librechat.spec`.
|
|
6278
|
+
*/
|
|
6279
|
+
conversationMetadataFields: zod.z.array(zod.z.enum(LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS)).optional()
|
|
6280
|
+
});
|
|
5623
6281
|
const langfuseConfigSchema = zod.z.object({
|
|
5624
6282
|
enabled: zod.z.boolean().optional(),
|
|
5625
6283
|
publicKey: zod.z.string().optional(),
|
|
@@ -5651,10 +6309,21 @@ const langfuseConfigSchema = zod.z.object({
|
|
|
5651
6309
|
* schema does not yet express — and note the fanout collector forwards only
|
|
5652
6310
|
* `Authorization` upstream regardless.
|
|
5653
6311
|
*/
|
|
5654
|
-
headers: zod.z.record(zod.z.string()).optional()
|
|
6312
|
+
headers: zod.z.record(zod.z.string()).optional(),
|
|
6313
|
+
/** Trace user identity and allowlisted user/request metadata. */
|
|
6314
|
+
trace: langfuseTraceConfigSchema.optional()
|
|
6315
|
+
});
|
|
6316
|
+
const openIdDiscoverySchema = zod.z.object({
|
|
6317
|
+
/** Discovery attempts made before startup continues; `0` retries only in the background. */
|
|
6318
|
+
startupAttempts: zod.z.number().int().min(0).max(100).default(1),
|
|
6319
|
+
/** Milliseconds between startup and background discovery attempts. */
|
|
6320
|
+
retryDelayMs: zod.z.number().int().min(100).max(36e5).default(5e3)
|
|
5655
6321
|
});
|
|
6322
|
+
/** Maximum CAS attempts per ACL document, including the initial attempt. */
|
|
6323
|
+
const permissionWriteAttemptsSchema = zod.z.number().int().min(1).max(100).default(3);
|
|
5656
6324
|
const configSchema = zod.z.object({
|
|
5657
6325
|
version: zod.z.string(),
|
|
6326
|
+
permissions: zod.z.object({ maxWriteAttempts: permissionWriteAttemptsSchema }).optional(),
|
|
5658
6327
|
cache: zod.z.boolean().default(true),
|
|
5659
6328
|
ocr: ocrSchema.optional(),
|
|
5660
6329
|
webSearch: webSearchSchema.optional(),
|
|
@@ -5669,7 +6338,35 @@ const configSchema = zod.z.object({
|
|
|
5669
6338
|
mcpServers: MCPServersSchema.optional(),
|
|
5670
6339
|
mcpSettings: zod.z.object({
|
|
5671
6340
|
allowedDomains: zod.z.array(zod.z.string()).optional(),
|
|
5672
|
-
allowedAddresses: allowedAddressesSchema
|
|
6341
|
+
allowedAddresses: allowedAddressesSchema,
|
|
6342
|
+
catalogRecovery: zod.z.object({
|
|
6343
|
+
discoveryBackoffMs: zod.z.array(zod.z.number().int().positive().max(1440 * 6e4)).min(1).max(8).default([
|
|
6344
|
+
5 * 6e4,
|
|
6345
|
+
10 * 6e4,
|
|
6346
|
+
20 * 6e4,
|
|
6347
|
+
30 * 6e4
|
|
6348
|
+
]),
|
|
6349
|
+
discoveryTimeoutMs: zod.z.number().int().positive().max(5 * 6e4).default(3e3),
|
|
6350
|
+
/** How long past `discoveryTimeoutMs` a stalled discovery may hold its catalog slot and
|
|
6351
|
+
* coalesced requests. It is never cancelled, so OAuth tokens it redeemed still persist,
|
|
6352
|
+
* and no other discovery for the same server state starts until it settles. */
|
|
6353
|
+
discoverySettleGraceMs: zod.z.number().int().nonnegative().max(5 * 6e4).default(1e4),
|
|
6354
|
+
reauthRetryMs: zod.z.number().int().positive().max(1440 * 6e4).default(30 * 6e4),
|
|
6355
|
+
maxStateEntries: zod.z.number().int().positive().max(1e6).default(1e4),
|
|
6356
|
+
/** Process-wide: how many discoveries released past `discoverySettleGraceMs` may still be
|
|
6357
|
+
* running before recovery starts no new discovery until one settles. The default matches
|
|
6358
|
+
* the three catalog slots a stalled dependency could hold before discoveries were released. */
|
|
6359
|
+
maxDetachedDiscoveries: zod.z.number().int().positive().max(1e3).default(3),
|
|
6360
|
+
generationReadTimeoutMs: zod.z.number().int().positive().max(1e4).default(500),
|
|
6361
|
+
authorizationFenceRetryMs: zod.z.array(zod.z.number().int().nonnegative().max(6e4)).min(1).max(8).default([
|
|
6362
|
+
0,
|
|
6363
|
+
50,
|
|
6364
|
+
200
|
|
6365
|
+
]),
|
|
6366
|
+
authorizationFenceTimeoutMs: zod.z.number().int().positive().max(3e4).default(1e3),
|
|
6367
|
+
authorizationFenceRetryIntervalMs: zod.z.number().int().positive().max(60 * 6e4).default(3e4),
|
|
6368
|
+
authorizationFenceRetryBatchSize: zod.z.number().int().positive().max(1e4).default(100)
|
|
6369
|
+
}).default({})
|
|
5673
6370
|
}).optional(),
|
|
5674
6371
|
interface: interfaceSchema,
|
|
5675
6372
|
turnstile: turnstileSchema.optional(),
|
|
@@ -5682,7 +6379,11 @@ const configSchema = zod.z.object({
|
|
|
5682
6379
|
}).optional(),
|
|
5683
6380
|
registration: zod.z.object({
|
|
5684
6381
|
socialLogins: zod.z.array(zod.z.string()).optional(),
|
|
5685
|
-
allowedDomains: zod.z.array(zod.z.string()).optional()
|
|
6382
|
+
allowedDomains: zod.z.array(zod.z.string()).optional(),
|
|
6383
|
+
/** Milliseconds a started social login may take to reach its callback; defaults to `DEFAULT_OAUTH_STATE_TTL_MS`. */
|
|
6384
|
+
oauthStateTtlMs: zod.z.number().int().min(6e4).max(36e5).optional(),
|
|
6385
|
+
/** OpenID discovery retries; an unset field falls back to its `OPENID_DISCOVERY_RETRY_*` env var, then the schema default. */
|
|
6386
|
+
openidDiscovery: openIdDiscoverySchema.partial().optional()
|
|
5686
6387
|
}).default({ socialLogins: defaultSocialLogins }),
|
|
5687
6388
|
balance: balanceSchema.optional(),
|
|
5688
6389
|
transactions: transactionsSchema.optional(),
|
|
@@ -5715,7 +6416,9 @@ const configSchema = zod.z.object({
|
|
|
5715
6416
|
["agents"]: agentsEndpointSchema.optional(),
|
|
5716
6417
|
["custom"]: customEndpointsSchema.optional(),
|
|
5717
6418
|
["bedrock"]: bedrockEndpointSchema.optional()
|
|
5718
|
-
}).strict().refine((data) => Object.keys(data).length > 0, { message: "At least one `endpoints` field must be provided." }).optional()
|
|
6419
|
+
}).strict().refine((data) => Object.keys(data).length > 0, { message: "At least one `endpoints` field must be provided." }).optional(),
|
|
6420
|
+
/** Serve the OpenAPI spec and docs for the public Agents API. Off by default. */
|
|
6421
|
+
openapi: zod.z.object({ enabled: zod.z.boolean().optional() }).optional()
|
|
5719
6422
|
});
|
|
5720
6423
|
const getConfigDefaults = () => getSchemaDefaults(configSchema);
|
|
5721
6424
|
let KnownEndpoints = /* @__PURE__ */ function(KnownEndpoints) {
|
|
@@ -5728,6 +6431,7 @@ let KnownEndpoints = /* @__PURE__ */ function(KnownEndpoints) {
|
|
|
5728
6431
|
KnownEndpoints["groq"] = "groq";
|
|
5729
6432
|
KnownEndpoints["helicone"] = "helicone";
|
|
5730
6433
|
KnownEndpoints["huggingface"] = "huggingface";
|
|
6434
|
+
KnownEndpoints["lemonade"] = "lemonade";
|
|
5731
6435
|
KnownEndpoints["mistral"] = "mistral";
|
|
5732
6436
|
KnownEndpoints["mlx"] = "mlx";
|
|
5733
6437
|
KnownEndpoints["ollama"] = "ollama";
|
|
@@ -5766,6 +6470,7 @@ const alternateName = {
|
|
|
5766
6470
|
["anthropic"]: "Anthropic",
|
|
5767
6471
|
["custom"]: "Custom",
|
|
5768
6472
|
["bedrock"]: "AWS Bedrock",
|
|
6473
|
+
["lemonade"]: "AMD Lemonade",
|
|
5769
6474
|
["ollama"]: "Ollama",
|
|
5770
6475
|
["deepseek"]: "DeepSeek",
|
|
5771
6476
|
["moonshot"]: "Moonshot",
|
|
@@ -5773,6 +6478,17 @@ const alternateName = {
|
|
|
5773
6478
|
["vercel"]: "Vercel",
|
|
5774
6479
|
["helicone"]: "Helicone"
|
|
5775
6480
|
};
|
|
6481
|
+
/**
|
|
6482
|
+
* Models the Assistants endpoints cannot run. GPT-6 Astra serves tool calls only
|
|
6483
|
+
* from the Responses API, and the Assistants surface does not route through
|
|
6484
|
+
* `getOpenAILLMConfig`, so listing it there would offer a configuration the
|
|
6485
|
+
* provider rejects. Kept out of `sharedOpenAIModels`, which both Assistants
|
|
6486
|
+
* catalogs consume.
|
|
6487
|
+
*/
|
|
6488
|
+
const responsesOnlyOpenAIModels = ["gpt-6-astra"];
|
|
6489
|
+
/** Tool calls with Sol/Luna's default reasoning require Responses. Do not offer
|
|
6490
|
+
* these on Assistants, which cannot use the native request-routing path. */
|
|
6491
|
+
const responsesReasoningOpenAIModels = ["gpt-6-sol", "gpt-6-luna"];
|
|
5776
6492
|
const sharedOpenAIModels = [
|
|
5777
6493
|
"gpt-5.6",
|
|
5778
6494
|
"gpt-5.6-terra",
|
|
@@ -5802,6 +6518,7 @@ const sharedOpenAIModels = [
|
|
|
5802
6518
|
const sharedAnthropicModels = [
|
|
5803
6519
|
"claude-fable-5-1",
|
|
5804
6520
|
"claude-fable-5",
|
|
6521
|
+
"claude-opus-5-5",
|
|
5805
6522
|
"claude-opus-5",
|
|
5806
6523
|
"claude-opus-4-8",
|
|
5807
6524
|
"claude-opus-4-7",
|
|
@@ -5837,6 +6554,7 @@ const sharedAnthropicModels = [
|
|
|
5837
6554
|
const bedrockModels = [
|
|
5838
6555
|
"global.anthropic.claude-fable-5-1",
|
|
5839
6556
|
"global.anthropic.claude-fable-5",
|
|
6557
|
+
"global.anthropic.claude-opus-5-5",
|
|
5840
6558
|
"global.anthropic.claude-opus-5",
|
|
5841
6559
|
"global.anthropic.claude-opus-4-8",
|
|
5842
6560
|
"global.anthropic.claude-opus-4-7",
|
|
@@ -5868,7 +6586,11 @@ const bedrockModels = [
|
|
|
5868
6586
|
const defaultModels = {
|
|
5869
6587
|
["azureAssistants"]: sharedOpenAIModels,
|
|
5870
6588
|
["assistants"]: [...sharedOpenAIModels, "chatgpt-4o-latest"],
|
|
5871
|
-
["agents"]:
|
|
6589
|
+
["agents"]: [
|
|
6590
|
+
...responsesOnlyOpenAIModels,
|
|
6591
|
+
...responsesReasoningOpenAIModels,
|
|
6592
|
+
...sharedOpenAIModels
|
|
6593
|
+
],
|
|
5872
6594
|
["google"]: [
|
|
5873
6595
|
"gemini-3.8-flash",
|
|
5874
6596
|
"gemini-3.7-flash",
|
|
@@ -5886,6 +6608,8 @@ const defaultModels = {
|
|
|
5886
6608
|
],
|
|
5887
6609
|
["anthropic"]: sharedAnthropicModels,
|
|
5888
6610
|
["openAI"]: [
|
|
6611
|
+
...responsesOnlyOpenAIModels,
|
|
6612
|
+
...responsesReasoningOpenAIModels,
|
|
5889
6613
|
...sharedOpenAIModels,
|
|
5890
6614
|
"chatgpt-4o-latest",
|
|
5891
6615
|
"gpt-4-vision-preview",
|
|
@@ -5898,12 +6622,18 @@ const fitlerAssistantModels = (str) => {
|
|
|
5898
6622
|
return /gpt-4|gpt-3\\.5/i.test(str) && !/vision|instruct/i.test(str);
|
|
5899
6623
|
};
|
|
5900
6624
|
const openAIModels = defaultModels["openAI"];
|
|
6625
|
+
/**
|
|
6626
|
+
* Preserve Azure's fallback default selection when the OpenAI catalog gains
|
|
6627
|
+
* Responses-preferred models. Configured Azure deployments supply their own
|
|
6628
|
+
* model list, including Astra when deployed.
|
|
6629
|
+
*/
|
|
6630
|
+
const nonResponsesOnlyOpenAIModels = openAIModels.filter((model) => !responsesOnlyOpenAIModels.includes(model) && !responsesReasoningOpenAIModels.includes(model));
|
|
5901
6631
|
const initialModelsConfig = {
|
|
5902
6632
|
initial: [],
|
|
5903
6633
|
["openAI"]: openAIModels,
|
|
5904
6634
|
["assistants"]: openAIModels.filter(fitlerAssistantModels),
|
|
5905
6635
|
["agents"]: openAIModels,
|
|
5906
|
-
["azureOpenAI"]:
|
|
6636
|
+
["azureOpenAI"]: nonResponsesOnlyOpenAIModels,
|
|
5907
6637
|
["google"]: defaultModels["google"],
|
|
5908
6638
|
["anthropic"]: defaultModels["anthropic"],
|
|
5909
6639
|
["bedrock"]: defaultModels["bedrock"]
|
|
@@ -5938,6 +6668,8 @@ const visionModels = [
|
|
|
5938
6668
|
"grok-vision",
|
|
5939
6669
|
"grok-2-vision",
|
|
5940
6670
|
"grok-3",
|
|
6671
|
+
"grok-4.7",
|
|
6672
|
+
"grok-4-7",
|
|
5941
6673
|
"gpt-4o-mini",
|
|
5942
6674
|
"gpt-4o",
|
|
5943
6675
|
"gpt-4-turbo",
|
|
@@ -6201,6 +6933,10 @@ let ViolationTypes = /* @__PURE__ */ function(ViolationTypes) {
|
|
|
6201
6933
|
* Registration violations.
|
|
6202
6934
|
*/
|
|
6203
6935
|
ViolationTypes["REGISTRATIONS"] = "registrations";
|
|
6936
|
+
/**
|
|
6937
|
+
* Shared link retrieval limit violations.
|
|
6938
|
+
*/
|
|
6939
|
+
ViolationTypes["SHARE_LIMIT"] = "share_limit";
|
|
6204
6940
|
return ViolationTypes;
|
|
6205
6941
|
}({});
|
|
6206
6942
|
/**
|
|
@@ -6268,6 +7004,10 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
6268
7004
|
*/
|
|
6269
7005
|
ErrorTypes["STATEFUL_CODE_ENVIRONMENT_NOT_ALLOWED"] = "stateful_code_environment_not_allowed";
|
|
6270
7006
|
/**
|
|
7007
|
+
* A conversation's selected attached workspace cannot be used as requested.
|
|
7008
|
+
*/
|
|
7009
|
+
ErrorTypes["CODE_WORKSPACE_UNAVAILABLE"] = "code_workspace_unavailable";
|
|
7010
|
+
/**
|
|
6271
7011
|
* Invalid Agent Provider (excluded by Admin)
|
|
6272
7012
|
*/
|
|
6273
7013
|
ErrorTypes["INVALID_AGENT_PROVIDER"] = "invalid_agent_provider";
|
|
@@ -6296,6 +7036,10 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
6296
7036
|
*/
|
|
6297
7037
|
ErrorTypes["AUTH_BANNED"] = "auth_banned";
|
|
6298
7038
|
/**
|
|
7039
|
+
* Authentication request was not sent from this application's origin
|
|
7040
|
+
*/
|
|
7041
|
+
ErrorTypes["AUTH_CROSS_ORIGIN"] = "auth_cross_origin";
|
|
7042
|
+
/**
|
|
6299
7043
|
* Model refused to respond (content policy violation)
|
|
6300
7044
|
*/
|
|
6301
7045
|
ErrorTypes["REFUSAL"] = "refusal";
|
|
@@ -6311,6 +7055,26 @@ let ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
|
6311
7055
|
* Provider throttled or refused the request for exceeding a rate/spend allowance
|
|
6312
7056
|
*/
|
|
6313
7057
|
ErrorTypes["MODEL_RATE_LIMIT"] = "model_rate_limit";
|
|
7058
|
+
/**
|
|
7059
|
+
* An agent model provider failed and the run could not recover.
|
|
7060
|
+
*/
|
|
7061
|
+
ErrorTypes["UPSTREAM_MODEL_ERROR"] = "upstream_model_error";
|
|
7062
|
+
/**
|
|
7063
|
+
* Context pruning removed every message; nothing fits the configured context window
|
|
7064
|
+
*/
|
|
7065
|
+
ErrorTypes["EMPTY_MESSAGES"] = "empty_messages";
|
|
7066
|
+
/**
|
|
7067
|
+
* Formatted provider payload exceeded the context budget before invocation
|
|
7068
|
+
*/
|
|
7069
|
+
ErrorTypes["FINAL_CONTEXT_OVERFLOW"] = "final_context_overflow";
|
|
7070
|
+
/**
|
|
7071
|
+
* A manual compaction the graph could not attempt; `reason` says why
|
|
7072
|
+
*/
|
|
7073
|
+
ErrorTypes["COMPACTION_SKIPPED"] = "compaction_skipped";
|
|
7074
|
+
/**
|
|
7075
|
+
* A manual compaction whose summarizer produced nothing; history is untouched
|
|
7076
|
+
*/
|
|
7077
|
+
ErrorTypes["COMPACTION_FAILED"] = "compaction_failed";
|
|
6314
7078
|
return ErrorTypes;
|
|
6315
7079
|
}({});
|
|
6316
7080
|
/**
|
|
@@ -6442,7 +7206,7 @@ let TTSProviders = /* @__PURE__ */ function(TTSProviders) {
|
|
|
6442
7206
|
/** Enum for app-wide constants */
|
|
6443
7207
|
let Constants = /* @__PURE__ */ function(Constants) {
|
|
6444
7208
|
/**
|
|
6445
|
-
* Key for the app's version. The placeholder `v0.8.8-
|
|
7209
|
+
* Key for the app's version. The placeholder `v0.8.8-rc4` is
|
|
6446
7210
|
* swapped in by `@rollup/plugin-replace` during `npm run build:data-provider`
|
|
6447
7211
|
* using the value of the root `package.json`'s `version` field. Consumers
|
|
6448
7212
|
* always import this via the built dist bundle (see `main` field in
|
|
@@ -6450,9 +7214,9 @@ let Constants = /* @__PURE__ */ function(Constants) {
|
|
|
6450
7214
|
* substituted value. Only tests that import the TypeScript source directly
|
|
6451
7215
|
* would observe the raw placeholder.
|
|
6452
7216
|
*/
|
|
6453
|
-
Constants["VERSION"] = "v0.8.8-
|
|
7217
|
+
Constants["VERSION"] = "v0.8.8-rc4";
|
|
6454
7218
|
/** Key for the Custom Config's version (librechat.yaml). */
|
|
6455
|
-
Constants["CONFIG_VERSION"] = "1.3.
|
|
7219
|
+
Constants["CONFIG_VERSION"] = "1.3.17";
|
|
6456
7220
|
/** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
|
|
6457
7221
|
Constants["NO_PARENT"] = "00000000-0000-0000-0000-000000000000";
|
|
6458
7222
|
/** Standard value to use whatever the submission prelim. `responseMessageId` is */
|
|
@@ -6785,6 +7549,8 @@ let LocalStorageKeys = /* @__PURE__ */ function(LocalStorageKeys) {
|
|
|
6785
7549
|
LocalStorageKeys["PIN_WEB_SEARCH_"] = "PIN_WEB_SEARCH_";
|
|
6786
7550
|
/** Pin state for Code Interpreter per conversation ID */
|
|
6787
7551
|
LocalStorageKeys["PIN_CODE_INTERPRETER_"] = "PIN_CODE_INTERPRETER_";
|
|
7552
|
+
/** Key for the last selected code approval mode */
|
|
7553
|
+
LocalStorageKeys["LAST_CODE_APPROVAL_MODE"] = "lastCodeApprovalMode";
|
|
6788
7554
|
return LocalStorageKeys;
|
|
6789
7555
|
}({});
|
|
6790
7556
|
let ForkOptions = /* @__PURE__ */ function(ForkOptions) {
|
|
@@ -6877,6 +7643,57 @@ function getDefaultParamsEndpoint(endpointsConfig, endpoint) {
|
|
|
6877
7643
|
return endpointsConfig[endpoint]?.customParams?.defaultParamsEndpoint;
|
|
6878
7644
|
}
|
|
6879
7645
|
//#endregion
|
|
7646
|
+
//#region src/types/assistants.ts
|
|
7647
|
+
let RunStatus = /* @__PURE__ */ function(RunStatus) {
|
|
7648
|
+
RunStatus["QUEUED"] = "queued";
|
|
7649
|
+
RunStatus["IN_PROGRESS"] = "in_progress";
|
|
7650
|
+
RunStatus["REQUIRES_ACTION"] = "requires_action";
|
|
7651
|
+
RunStatus["CANCELLING"] = "cancelling";
|
|
7652
|
+
RunStatus["CANCELLED"] = "cancelled";
|
|
7653
|
+
RunStatus["FAILED"] = "failed";
|
|
7654
|
+
RunStatus["COMPLETED"] = "completed";
|
|
7655
|
+
RunStatus["EXPIRED"] = "expired";
|
|
7656
|
+
return RunStatus;
|
|
7657
|
+
}({});
|
|
7658
|
+
let FilePurpose = /* @__PURE__ */ function(FilePurpose) {
|
|
7659
|
+
FilePurpose["Vision"] = "vision";
|
|
7660
|
+
FilePurpose["FineTune"] = "fine-tune";
|
|
7661
|
+
FilePurpose["FineTuneResults"] = "fine-tune-results";
|
|
7662
|
+
FilePurpose["Assistants"] = "assistants";
|
|
7663
|
+
FilePurpose["AssistantsOutput"] = "assistants_output";
|
|
7664
|
+
return FilePurpose;
|
|
7665
|
+
}({});
|
|
7666
|
+
const defaultOrderQuery = {
|
|
7667
|
+
order: "desc",
|
|
7668
|
+
limit: 100
|
|
7669
|
+
};
|
|
7670
|
+
let AssistantStreamEvents = /* @__PURE__ */ function(AssistantStreamEvents) {
|
|
7671
|
+
AssistantStreamEvents["ThreadCreated"] = "thread.created";
|
|
7672
|
+
AssistantStreamEvents["ThreadRunCreated"] = "thread.run.created";
|
|
7673
|
+
AssistantStreamEvents["ThreadRunQueued"] = "thread.run.queued";
|
|
7674
|
+
AssistantStreamEvents["ThreadRunInProgress"] = "thread.run.in_progress";
|
|
7675
|
+
AssistantStreamEvents["ThreadRunRequiresAction"] = "thread.run.requires_action";
|
|
7676
|
+
AssistantStreamEvents["ThreadRunCompleted"] = "thread.run.completed";
|
|
7677
|
+
AssistantStreamEvents["ThreadRunFailed"] = "thread.run.failed";
|
|
7678
|
+
AssistantStreamEvents["ThreadRunCancelling"] = "thread.run.cancelling";
|
|
7679
|
+
AssistantStreamEvents["ThreadRunCancelled"] = "thread.run.cancelled";
|
|
7680
|
+
AssistantStreamEvents["ThreadRunExpired"] = "thread.run.expired";
|
|
7681
|
+
AssistantStreamEvents["ThreadRunStepCreated"] = "thread.run.step.created";
|
|
7682
|
+
AssistantStreamEvents["ThreadRunStepInProgress"] = "thread.run.step.in_progress";
|
|
7683
|
+
AssistantStreamEvents["ThreadRunStepCompleted"] = "thread.run.step.completed";
|
|
7684
|
+
AssistantStreamEvents["ThreadRunStepFailed"] = "thread.run.step.failed";
|
|
7685
|
+
AssistantStreamEvents["ThreadRunStepCancelled"] = "thread.run.step.cancelled";
|
|
7686
|
+
AssistantStreamEvents["ThreadRunStepExpired"] = "thread.run.step.expired";
|
|
7687
|
+
AssistantStreamEvents["ThreadRunStepDelta"] = "thread.run.step.delta";
|
|
7688
|
+
AssistantStreamEvents["ThreadMessageCreated"] = "thread.message.created";
|
|
7689
|
+
AssistantStreamEvents["ThreadMessageInProgress"] = "thread.message.in_progress";
|
|
7690
|
+
AssistantStreamEvents["ThreadMessageCompleted"] = "thread.message.completed";
|
|
7691
|
+
AssistantStreamEvents["ThreadMessageIncomplete"] = "thread.message.incomplete";
|
|
7692
|
+
AssistantStreamEvents["ThreadMessageDelta"] = "thread.message.delta";
|
|
7693
|
+
AssistantStreamEvents["ErrorEvent"] = "error";
|
|
7694
|
+
return AssistantStreamEvents;
|
|
7695
|
+
}({});
|
|
7696
|
+
//#endregion
|
|
6880
7697
|
//#region src/accessPermissions.ts
|
|
6881
7698
|
/**
|
|
6882
7699
|
* Granular Permission System Types for Agent Sharing
|
|
@@ -6929,6 +7746,8 @@ let PermissionBits = /* @__PURE__ */ function(PermissionBits) {
|
|
|
6929
7746
|
PermissionBits[PermissionBits["DELETE"] = 4] = "DELETE";
|
|
6930
7747
|
/** 1000 - Can share agent with others (future) */
|
|
6931
7748
|
PermissionBits[PermissionBits["SHARE"] = 8] = "SHARE";
|
|
7749
|
+
/** 10000 - Can view Insights data for an agent when VIEW is also present */
|
|
7750
|
+
PermissionBits[PermissionBits["VIEW_INSIGHTS"] = 16] = "VIEW_INSIGHTS";
|
|
6932
7751
|
return PermissionBits;
|
|
6933
7752
|
}({});
|
|
6934
7753
|
/**
|
|
@@ -6970,6 +7789,8 @@ const principalSchema = zod.z.object({
|
|
|
6970
7789
|
description: zod.z.string().optional(),
|
|
6971
7790
|
idOnTheSource: zod.z.string().optional(),
|
|
6972
7791
|
accessRoleId: zod.z.nativeEnum(AccessRoleIds).optional(),
|
|
7792
|
+
viewInsights: zod.z.boolean().optional(),
|
|
7793
|
+
isAdmin: zod.z.boolean().optional(),
|
|
6973
7794
|
memberCount: zod.z.number().optional()
|
|
6974
7795
|
});
|
|
6975
7796
|
/**
|
|
@@ -7103,6 +7924,9 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
|
|
|
7103
7924
|
QueryKeys["searchEnabled"] = "searchEnabled";
|
|
7104
7925
|
QueryKeys["langfuseConnection"] = "langfuseConnection";
|
|
7105
7926
|
QueryKeys["langfuseSessionLink"] = "langfuseSessionLink";
|
|
7927
|
+
QueryKeys["conversationTraceAvailability"] = "conversationTraceAvailability";
|
|
7928
|
+
QueryKeys["conversationTraceRecords"] = "conversationTraceRecords";
|
|
7929
|
+
QueryKeys["conversationTraceRecord"] = "conversationTraceRecord";
|
|
7106
7930
|
QueryKeys["user"] = "user";
|
|
7107
7931
|
QueryKeys["name"] = "name";
|
|
7108
7932
|
QueryKeys["models"] = "models";
|
|
@@ -7179,13 +8003,26 @@ let QueryKeys = /* @__PURE__ */ function(QueryKeys) {
|
|
|
7179
8003
|
QueryKeys["subagentThread"] = "subagentThread";
|
|
7180
8004
|
QueryKeys["codeEnvironments"] = "codeEnvironments";
|
|
7181
8005
|
QueryKeys["agentQueuedTurns"] = "agentQueuedTurns";
|
|
8006
|
+
QueryKeys["pinnedOrder"] = "pinnedOrder";
|
|
7182
8007
|
return QueryKeys;
|
|
7183
8008
|
}({});
|
|
7184
|
-
const DynamicQueryKeys = {
|
|
8009
|
+
const DynamicQueryKeys = {
|
|
8010
|
+
agentFiles: (agentId) => ["agentFiles", agentId],
|
|
8011
|
+
codeEnvironmentStatus: (id) => [
|
|
8012
|
+
"codeEnvironments",
|
|
8013
|
+
id,
|
|
8014
|
+
"status"
|
|
8015
|
+
]
|
|
8016
|
+
};
|
|
7185
8017
|
let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
7186
8018
|
MutationKeys["subagentControl"] = "subagentControl";
|
|
7187
8019
|
MutationKeys["enqueueAgentQueuedTurn"] = "enqueueAgentQueuedTurn";
|
|
7188
8020
|
MutationKeys["cancelAgentQueuedTurn"] = "cancelAgentQueuedTurn";
|
|
8021
|
+
/** Whole-array favorites write, keyed so every hook instance's write is
|
|
8022
|
+
* visible to the others through the query client. */
|
|
8023
|
+
MutationKeys["updateFavorites"] = "updateFavorites";
|
|
8024
|
+
/** Pinned-section display order write, keyed for the same reason. */
|
|
8025
|
+
MutationKeys["updatePinnedOrder"] = "updatePinnedOrder";
|
|
7189
8026
|
MutationKeys["updateLangfuseConnection"] = "updateLangfuseConnection";
|
|
7190
8027
|
MutationKeys["testLangfuseConnection"] = "testLangfuseConnection";
|
|
7191
8028
|
MutationKeys["createAgentApiKey"] = "createAgentApiKey";
|
|
@@ -7231,6 +8068,7 @@ let MutationKeys = /* @__PURE__ */ function(MutationKeys) {
|
|
|
7231
8068
|
MutationKeys["pairCodeEnvironment"] = "pairCodeEnvironment";
|
|
7232
8069
|
MutationKeys["updateCodeEnvironmentSettings"] = "updateCodeEnvironmentSettings";
|
|
7233
8070
|
MutationKeys["deleteCodeEnvironment"] = "deleteCodeEnvironment";
|
|
8071
|
+
MutationKeys["moveConversationCodeEnvironment"] = "moveConversationCodeEnvironment";
|
|
7234
8072
|
return MutationKeys;
|
|
7235
8073
|
}({});
|
|
7236
8074
|
//#endregion
|
|
@@ -7707,10 +8545,14 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
7707
8545
|
getAvailableTools: () => getAvailableTools,
|
|
7708
8546
|
getBanner: () => getBanner,
|
|
7709
8547
|
getCategories: () => getCategories,
|
|
8548
|
+
getCodeEnvironmentStatus: () => getCodeEnvironmentStatus,
|
|
7710
8549
|
getCodeEnvironments: () => getCodeEnvironments,
|
|
7711
8550
|
getCodeOutputDownload: () => getCodeOutputDownload,
|
|
7712
8551
|
getConversationById: () => getConversationById,
|
|
7713
8552
|
getConversationTags: () => getConversationTags,
|
|
8553
|
+
getConversationTraceAvailability: () => getConversationTraceAvailability,
|
|
8554
|
+
getConversationTraceRecord: () => getConversationTraceRecord,
|
|
8555
|
+
getConversationTraceRecords: () => getConversationTraceRecords,
|
|
7714
8556
|
getConversations: () => getConversations,
|
|
7715
8557
|
getCustomConfigSpeech: () => getCustomConfigSpeech,
|
|
7716
8558
|
getDomainServerBaseUrl: () => getDomainServerBaseUrl,
|
|
@@ -7742,6 +8584,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
7742
8584
|
getMessagesByConvoId: () => getMessagesByConvoId,
|
|
7743
8585
|
getModels: () => getModels,
|
|
7744
8586
|
getParentSubagents: () => getParentSubagents,
|
|
8587
|
+
getPinnedOrder: () => getPinnedOrder,
|
|
7745
8588
|
getPresets: () => getPresets,
|
|
7746
8589
|
getProjectById: () => getProjectById,
|
|
7747
8590
|
getPrompt: () => getPrompt,
|
|
@@ -7791,6 +8634,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
7791
8634
|
logout: () => logout,
|
|
7792
8635
|
makePromptProduction: () => makePromptProduction,
|
|
7793
8636
|
markFilesUsage: () => markFilesUsage,
|
|
8637
|
+
moveConversationCodeEnvironment: () => moveConversationCodeEnvironment,
|
|
7794
8638
|
pairCodeEnvironment: () => pairCodeEnvironment,
|
|
7795
8639
|
pinConversation: () => pinConversation,
|
|
7796
8640
|
rebuildConversationTags: () => rebuildConversationTags,
|
|
@@ -7833,6 +8677,7 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
7833
8677
|
updateMessage: () => updateMessage,
|
|
7834
8678
|
updateMessageContent: () => updateMessageContent,
|
|
7835
8679
|
updatePeoplePickerPermissions: () => updatePeoplePickerPermissions,
|
|
8680
|
+
updatePinnedOrder: () => updatePinnedOrder,
|
|
7836
8681
|
updatePreset: () => updatePreset,
|
|
7837
8682
|
updateProject: () => updateProject,
|
|
7838
8683
|
updatePromptGroup: () => updatePromptGroup,
|
|
@@ -7864,13 +8709,23 @@ var data_service_exports = /* @__PURE__ */ __exportAll({
|
|
|
7864
8709
|
});
|
|
7865
8710
|
function getInsights(params = {}) {
|
|
7866
8711
|
const query = new URLSearchParams();
|
|
7867
|
-
for (const [key, value] of Object.entries(params)) if (value
|
|
8712
|
+
for (const [key, value] of Object.entries(params)) if (Array.isArray(value)) value.forEach((item) => query.append(key, String(item)));
|
|
8713
|
+
else if (value !== void 0 && value !== null && value !== "") query.set(key, String(value));
|
|
7868
8714
|
const suffix = query.toString() ? `?${query.toString()}` : "";
|
|
7869
8715
|
return request_default.get(`${insights()}${suffix}`);
|
|
7870
8716
|
}
|
|
7871
8717
|
function getInsightsAccess() {
|
|
7872
8718
|
return request_default.get(insightsAccess());
|
|
7873
8719
|
}
|
|
8720
|
+
function getConversationTraceAvailability(conversationId) {
|
|
8721
|
+
return request_default.get(conversationTraceAvailability(conversationId));
|
|
8722
|
+
}
|
|
8723
|
+
function getConversationTraceRecords({ conversationId, cursor }, signal) {
|
|
8724
|
+
return request_default.get(conversationTraceRecords(conversationId, cursor), signal ? { signal } : void 0);
|
|
8725
|
+
}
|
|
8726
|
+
function getConversationTraceRecord({ conversationId, recordId, messageId, sourceId }, signal) {
|
|
8727
|
+
return request_default.get(conversationTraceRecord(conversationId, recordId, messageId, sourceId), signal ? { signal } : void 0);
|
|
8728
|
+
}
|
|
7874
8729
|
function getLangfuseConnection() {
|
|
7875
8730
|
return request_default.get(adminLangfuseConnection());
|
|
7876
8731
|
}
|
|
@@ -7895,6 +8750,15 @@ function deleteUser(payload) {
|
|
|
7895
8750
|
function getCodeEnvironments() {
|
|
7896
8751
|
return request_default.get(codeEnvironments());
|
|
7897
8752
|
}
|
|
8753
|
+
function getCodeEnvironmentStatus(id) {
|
|
8754
|
+
return request_default.get(codeEnvironmentStatus(id));
|
|
8755
|
+
}
|
|
8756
|
+
function moveConversationCodeEnvironment({ conversationId, from, to }) {
|
|
8757
|
+
return request_default.patch(codeEnvironmentConversationDecision(conversationId), {
|
|
8758
|
+
from,
|
|
8759
|
+
to
|
|
8760
|
+
});
|
|
8761
|
+
}
|
|
7898
8762
|
function pairCodeEnvironment(payload) {
|
|
7899
8763
|
return request_default.post(codeEnvironmentPairings(), payload);
|
|
7900
8764
|
}
|
|
@@ -7910,6 +8774,13 @@ function getFavorites() {
|
|
|
7910
8774
|
function updateFavorites(favorites) {
|
|
7911
8775
|
return request_default.post(`${apiBaseUrl()}/api/user/settings/favorites`, { favorites });
|
|
7912
8776
|
}
|
|
8777
|
+
/** Combined Pinned-section display order: favorite and pinned-chat entry keys interleaved. */
|
|
8778
|
+
function getPinnedOrder() {
|
|
8779
|
+
return request_default.get(pinnedOrder());
|
|
8780
|
+
}
|
|
8781
|
+
function updatePinnedOrder(pinnedOrder$1) {
|
|
8782
|
+
return request_default.post(pinnedOrder(), { pinnedOrder: pinnedOrder$1 });
|
|
8783
|
+
}
|
|
7913
8784
|
/** Tool favorites — starred marketplace items (builtins, tools, MCP servers, skills). */
|
|
7914
8785
|
function getToolFavorites() {
|
|
7915
8786
|
return request_default.get(toolFavorites());
|
|
@@ -8764,6 +9635,18 @@ Object.defineProperty(exports, "ACTION_METADATA_FILTER_FIELDS", {
|
|
|
8764
9635
|
return ACTION_METADATA_FILTER_FIELDS;
|
|
8765
9636
|
}
|
|
8766
9637
|
});
|
|
9638
|
+
Object.defineProperty(exports, "AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT", {
|
|
9639
|
+
enumerable: true,
|
|
9640
|
+
get: function() {
|
|
9641
|
+
return AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_DEFAULT;
|
|
9642
|
+
}
|
|
9643
|
+
});
|
|
9644
|
+
Object.defineProperty(exports, "AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX", {
|
|
9645
|
+
enumerable: true,
|
|
9646
|
+
get: function() {
|
|
9647
|
+
return AGENT_BACKGROUND_COMPLETION_RESULT_MAX_CHARS_HARD_MAX;
|
|
9648
|
+
}
|
|
9649
|
+
});
|
|
8767
9650
|
Object.defineProperty(exports, "AGENT_INSTRUCTION_FILTER_FIELDS", {
|
|
8768
9651
|
enumerable: true,
|
|
8769
9652
|
get: function() {
|
|
@@ -8788,12 +9671,6 @@ Object.defineProperty(exports, "AgentCapabilities", {
|
|
|
8788
9671
|
return AgentCapabilities;
|
|
8789
9672
|
}
|
|
8790
9673
|
});
|
|
8791
|
-
Object.defineProperty(exports, "AnnotationTypes", {
|
|
8792
|
-
enumerable: true,
|
|
8793
|
-
get: function() {
|
|
8794
|
-
return AnnotationTypes;
|
|
8795
|
-
}
|
|
8796
|
-
});
|
|
8797
9674
|
Object.defineProperty(exports, "AnthropicEffort", {
|
|
8798
9675
|
enumerable: true,
|
|
8799
9676
|
get: function() {
|
|
@@ -8854,6 +9731,78 @@ Object.defineProperty(exports, "BedrockReasoningConfig", {
|
|
|
8854
9731
|
return BedrockReasoningConfig;
|
|
8855
9732
|
}
|
|
8856
9733
|
});
|
|
9734
|
+
Object.defineProperty(exports, "CODE_APPROVAL_MODES", {
|
|
9735
|
+
enumerable: true,
|
|
9736
|
+
get: function() {
|
|
9737
|
+
return CODE_APPROVAL_MODES;
|
|
9738
|
+
}
|
|
9739
|
+
});
|
|
9740
|
+
Object.defineProperty(exports, "CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS", {
|
|
9741
|
+
enumerable: true,
|
|
9742
|
+
get: function() {
|
|
9743
|
+
return CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS;
|
|
9744
|
+
}
|
|
9745
|
+
});
|
|
9746
|
+
Object.defineProperty(exports, "CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS", {
|
|
9747
|
+
enumerable: true,
|
|
9748
|
+
get: function() {
|
|
9749
|
+
return CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS;
|
|
9750
|
+
}
|
|
9751
|
+
});
|
|
9752
|
+
Object.defineProperty(exports, "CODE_ENVIRONMENT_DECISION_VERSION", {
|
|
9753
|
+
enumerable: true,
|
|
9754
|
+
get: function() {
|
|
9755
|
+
return CODE_ENVIRONMENT_DECISION_VERSION;
|
|
9756
|
+
}
|
|
9757
|
+
});
|
|
9758
|
+
Object.defineProperty(exports, "CODE_ENVIRONMENT_MODES", {
|
|
9759
|
+
enumerable: true,
|
|
9760
|
+
get: function() {
|
|
9761
|
+
return CODE_ENVIRONMENT_MODES;
|
|
9762
|
+
}
|
|
9763
|
+
});
|
|
9764
|
+
Object.defineProperty(exports, "CODE_ENVIRONMENT_MOVE_VERSION", {
|
|
9765
|
+
enumerable: true,
|
|
9766
|
+
get: function() {
|
|
9767
|
+
return CODE_ENVIRONMENT_MOVE_VERSION;
|
|
9768
|
+
}
|
|
9769
|
+
});
|
|
9770
|
+
Object.defineProperty(exports, "CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS", {
|
|
9771
|
+
enumerable: true,
|
|
9772
|
+
get: function() {
|
|
9773
|
+
return CODE_ENVIRONMENT_QUEUE_WAIT_DEFAULT_MS;
|
|
9774
|
+
}
|
|
9775
|
+
});
|
|
9776
|
+
Object.defineProperty(exports, "CODE_WORKSPACE_ID_PATTERN", {
|
|
9777
|
+
enumerable: true,
|
|
9778
|
+
get: function() {
|
|
9779
|
+
return CODE_WORKSPACE_ID_PATTERN;
|
|
9780
|
+
}
|
|
9781
|
+
});
|
|
9782
|
+
Object.defineProperty(exports, "CODE_WORKSPACE_INSTANCE_TYPES", {
|
|
9783
|
+
enumerable: true,
|
|
9784
|
+
get: function() {
|
|
9785
|
+
return CODE_WORKSPACE_INSTANCE_TYPES;
|
|
9786
|
+
}
|
|
9787
|
+
});
|
|
9788
|
+
Object.defineProperty(exports, "CODE_WORKSPACE_MAX_COUNT", {
|
|
9789
|
+
enumerable: true,
|
|
9790
|
+
get: function() {
|
|
9791
|
+
return CODE_WORKSPACE_MAX_COUNT;
|
|
9792
|
+
}
|
|
9793
|
+
});
|
|
9794
|
+
Object.defineProperty(exports, "CODE_WORKSPACE_OPERATIONS", {
|
|
9795
|
+
enumerable: true,
|
|
9796
|
+
get: function() {
|
|
9797
|
+
return CODE_WORKSPACE_OPERATIONS;
|
|
9798
|
+
}
|
|
9799
|
+
});
|
|
9800
|
+
Object.defineProperty(exports, "CODE_WORKSPACE_SELECTION_ERROR_REASONS", {
|
|
9801
|
+
enumerable: true,
|
|
9802
|
+
get: function() {
|
|
9803
|
+
return CODE_WORKSPACE_SELECTION_ERROR_REASONS;
|
|
9804
|
+
}
|
|
9805
|
+
});
|
|
8857
9806
|
Object.defineProperty(exports, "CONVERSATION_STARTER_FILTER_FIELDS", {
|
|
8858
9807
|
enumerable: true,
|
|
8859
9808
|
get: function() {
|
|
@@ -8878,6 +9827,12 @@ Object.defineProperty(exports, "Capabilities", {
|
|
|
8878
9827
|
return Capabilities;
|
|
8879
9828
|
}
|
|
8880
9829
|
});
|
|
9830
|
+
Object.defineProperty(exports, "CodeApprovalModeError", {
|
|
9831
|
+
enumerable: true,
|
|
9832
|
+
get: function() {
|
|
9833
|
+
return CodeApprovalModeError;
|
|
9834
|
+
}
|
|
9835
|
+
});
|
|
8881
9836
|
Object.defineProperty(exports, "CohereConstants", {
|
|
8882
9837
|
enumerable: true,
|
|
8883
9838
|
get: function() {
|
|
@@ -8896,12 +9851,66 @@ Object.defineProperty(exports, "Constants", {
|
|
|
8896
9851
|
return Constants;
|
|
8897
9852
|
}
|
|
8898
9853
|
});
|
|
9854
|
+
Object.defineProperty(exports, "DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS", {
|
|
9855
|
+
enumerable: true,
|
|
9856
|
+
get: function() {
|
|
9857
|
+
return DEFAULT_AGENT_MODEL_RESPONSE_BODY_TIMEOUT_MS;
|
|
9858
|
+
}
|
|
9859
|
+
});
|
|
9860
|
+
Object.defineProperty(exports, "DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS", {
|
|
9861
|
+
enumerable: true,
|
|
9862
|
+
get: function() {
|
|
9863
|
+
return DEFAULT_AGENT_MODEL_RESPONSE_HEADERS_TIMEOUT_MS;
|
|
9864
|
+
}
|
|
9865
|
+
});
|
|
9866
|
+
Object.defineProperty(exports, "DEFAULT_BALANCE_RESERVATION_TTL_MS", {
|
|
9867
|
+
enumerable: true,
|
|
9868
|
+
get: function() {
|
|
9869
|
+
return DEFAULT_BALANCE_RESERVATION_TTL_MS;
|
|
9870
|
+
}
|
|
9871
|
+
});
|
|
9872
|
+
Object.defineProperty(exports, "DEFAULT_MAX_PROVIDER_ERROR_CHARS", {
|
|
9873
|
+
enumerable: true,
|
|
9874
|
+
get: function() {
|
|
9875
|
+
return DEFAULT_MAX_PROVIDER_ERROR_CHARS;
|
|
9876
|
+
}
|
|
9877
|
+
});
|
|
9878
|
+
Object.defineProperty(exports, "DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS", {
|
|
9879
|
+
enumerable: true,
|
|
9880
|
+
get: function() {
|
|
9881
|
+
return DEFAULT_MAX_RETAINED_TOOL_COUNT_CHARS;
|
|
9882
|
+
}
|
|
9883
|
+
});
|
|
8899
9884
|
Object.defineProperty(exports, "DEFAULT_MEMORY_MAX_INPUT_TOKENS", {
|
|
8900
9885
|
enumerable: true,
|
|
8901
9886
|
get: function() {
|
|
8902
9887
|
return DEFAULT_MEMORY_MAX_INPUT_TOKENS;
|
|
8903
9888
|
}
|
|
8904
9889
|
});
|
|
9890
|
+
Object.defineProperty(exports, "DEFAULT_OAUTH_STATE_TTL_MS", {
|
|
9891
|
+
enumerable: true,
|
|
9892
|
+
get: function() {
|
|
9893
|
+
return DEFAULT_OAUTH_STATE_TTL_MS;
|
|
9894
|
+
}
|
|
9895
|
+
});
|
|
9896
|
+
Object.defineProperty(exports, "DEFAULT_RETAINED_ANSWER_TOKENS", {
|
|
9897
|
+
enumerable: true,
|
|
9898
|
+
get: function() {
|
|
9899
|
+
return DEFAULT_RETAINED_ANSWER_TOKENS;
|
|
9900
|
+
}
|
|
9901
|
+
});
|
|
9902
|
+
Object.defineProperty(exports, "DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY", {
|
|
9903
|
+
enumerable: true,
|
|
9904
|
+
get: function() {
|
|
9905
|
+
return DEFAULT_SKILL_IMPORT_CLEANUP_CONCURRENCY;
|
|
9906
|
+
}
|
|
9907
|
+
});
|
|
9908
|
+
Object.defineProperty(exports, "DefaultLLMDeliveryPath", {
|
|
9909
|
+
enumerable: true,
|
|
9910
|
+
get: function() {
|
|
9911
|
+
return DefaultLLMDeliveryPath;
|
|
9912
|
+
}
|
|
9913
|
+
});
|
|
8905
9914
|
Object.defineProperty(exports, "DynamicQueryKeys", {
|
|
8906
9915
|
enumerable: true,
|
|
8907
9916
|
get: function() {
|
|
@@ -9040,6 +10049,24 @@ Object.defineProperty(exports, "KnownEndpoints", {
|
|
|
9040
10049
|
return KnownEndpoints;
|
|
9041
10050
|
}
|
|
9042
10051
|
});
|
|
10052
|
+
Object.defineProperty(exports, "LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS", {
|
|
10053
|
+
enumerable: true,
|
|
10054
|
+
get: function() {
|
|
10055
|
+
return LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS;
|
|
10056
|
+
}
|
|
10057
|
+
});
|
|
10058
|
+
Object.defineProperty(exports, "LANGFUSE_TRACE_USER_ID_FIELDS", {
|
|
10059
|
+
enumerable: true,
|
|
10060
|
+
get: function() {
|
|
10061
|
+
return LANGFUSE_TRACE_USER_ID_FIELDS;
|
|
10062
|
+
}
|
|
10063
|
+
});
|
|
10064
|
+
Object.defineProperty(exports, "LANGFUSE_TRACE_USER_METADATA_FIELDS", {
|
|
10065
|
+
enumerable: true,
|
|
10066
|
+
get: function() {
|
|
10067
|
+
return LANGFUSE_TRACE_USER_METADATA_FIELDS;
|
|
10068
|
+
}
|
|
10069
|
+
});
|
|
9043
10070
|
Object.defineProperty(exports, "LocalStorageKeys", {
|
|
9044
10071
|
enumerable: true,
|
|
9045
10072
|
get: function() {
|
|
@@ -9064,6 +10091,18 @@ Object.defineProperty(exports, "MAX_GRAPH_SUBAGENT_MEMBERS", {
|
|
|
9064
10091
|
return MAX_GRAPH_SUBAGENT_MEMBERS;
|
|
9065
10092
|
}
|
|
9066
10093
|
});
|
|
10094
|
+
Object.defineProperty(exports, "MAX_MCP_ICON_PATH_LENGTH", {
|
|
10095
|
+
enumerable: true,
|
|
10096
|
+
get: function() {
|
|
10097
|
+
return MAX_MCP_ICON_PATH_LENGTH;
|
|
10098
|
+
}
|
|
10099
|
+
});
|
|
10100
|
+
Object.defineProperty(exports, "MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS", {
|
|
10101
|
+
enumerable: true,
|
|
10102
|
+
get: function() {
|
|
10103
|
+
return MAX_MCP_OAUTH_PERSISTENCE_WAIT_MS;
|
|
10104
|
+
}
|
|
10105
|
+
});
|
|
9067
10106
|
Object.defineProperty(exports, "MAX_PII_CUSTOM_PATTERNS_TOTAL", {
|
|
9068
10107
|
enumerable: true,
|
|
9069
10108
|
get: function() {
|
|
@@ -9184,6 +10223,12 @@ Object.defineProperty(exports, "MESSAGE_FILTER_FIELDS", {
|
|
|
9184
10223
|
return MESSAGE_FILTER_FIELDS;
|
|
9185
10224
|
}
|
|
9186
10225
|
});
|
|
10226
|
+
Object.defineProperty(exports, "MIN_BALANCE_RESERVATION_TTL_MS", {
|
|
10227
|
+
enumerable: true,
|
|
10228
|
+
get: function() {
|
|
10229
|
+
return MIN_BALANCE_RESERVATION_TTL_MS;
|
|
10230
|
+
}
|
|
10231
|
+
});
|
|
9187
10232
|
Object.defineProperty(exports, "MODEL_PARAMETER_FILTER_FIELDS", {
|
|
9188
10233
|
enumerable: true,
|
|
9189
10234
|
get: function() {
|
|
@@ -9202,12 +10247,6 @@ Object.defineProperty(exports, "MemoryScope", {
|
|
|
9202
10247
|
return MemoryScope;
|
|
9203
10248
|
}
|
|
9204
10249
|
});
|
|
9205
|
-
Object.defineProperty(exports, "MessageContentTypes", {
|
|
9206
|
-
enumerable: true,
|
|
9207
|
-
get: function() {
|
|
9208
|
-
return MessageContentTypes;
|
|
9209
|
-
}
|
|
9210
|
-
});
|
|
9211
10250
|
Object.defineProperty(exports, "MutationKeys", {
|
|
9212
10251
|
enumerable: true,
|
|
9213
10252
|
get: function() {
|
|
@@ -9442,12 +10481,6 @@ Object.defineProperty(exports, "StdioOptionsSchema", {
|
|
|
9442
10481
|
return StdioOptionsSchema;
|
|
9443
10482
|
}
|
|
9444
10483
|
});
|
|
9445
|
-
Object.defineProperty(exports, "StepStatus", {
|
|
9446
|
-
enumerable: true,
|
|
9447
|
-
get: function() {
|
|
9448
|
-
return StepStatus;
|
|
9449
|
-
}
|
|
9450
|
-
});
|
|
9451
10484
|
Object.defineProperty(exports, "StreamableHTTPOptionsSchema", {
|
|
9452
10485
|
enumerable: true,
|
|
9453
10486
|
get: function() {
|
|
@@ -9562,6 +10595,12 @@ Object.defineProperty(exports, "actionMetadataFilterFieldSchema", {
|
|
|
9562
10595
|
return actionMetadataFilterFieldSchema;
|
|
9563
10596
|
}
|
|
9564
10597
|
});
|
|
10598
|
+
Object.defineProperty(exports, "agentGitIdentitySchema", {
|
|
10599
|
+
enumerable: true,
|
|
10600
|
+
get: function() {
|
|
10601
|
+
return agentGitIdentitySchema;
|
|
10602
|
+
}
|
|
10603
|
+
});
|
|
9565
10604
|
Object.defineProperty(exports, "agentInstructionFilterFieldSchema", {
|
|
9566
10605
|
enumerable: true,
|
|
9567
10606
|
get: function() {
|
|
@@ -9640,6 +10679,18 @@ Object.defineProperty(exports, "applicationMimeTypes", {
|
|
|
9640
10679
|
return applicationMimeTypes;
|
|
9641
10680
|
}
|
|
9642
10681
|
});
|
|
10682
|
+
Object.defineProperty(exports, "askUserQuestionConfigSchema", {
|
|
10683
|
+
enumerable: true,
|
|
10684
|
+
get: function() {
|
|
10685
|
+
return askUserQuestionConfigSchema;
|
|
10686
|
+
}
|
|
10687
|
+
});
|
|
10688
|
+
Object.defineProperty(exports, "askUserQuestionRetainedAnswersSchema", {
|
|
10689
|
+
enumerable: true,
|
|
10690
|
+
get: function() {
|
|
10691
|
+
return askUserQuestionRetainedAnswersSchema;
|
|
10692
|
+
}
|
|
10693
|
+
});
|
|
9643
10694
|
Object.defineProperty(exports, "assistantEndpointSchema", {
|
|
9644
10695
|
enumerable: true,
|
|
9645
10696
|
get: function() {
|
|
@@ -9940,6 +10991,12 @@ Object.defineProperty(exports, "defaultEndpoints", {
|
|
|
9940
10991
|
return defaultEndpoints;
|
|
9941
10992
|
}
|
|
9942
10993
|
});
|
|
10994
|
+
Object.defineProperty(exports, "defaultLLMDeliveryPathSchema", {
|
|
10995
|
+
enumerable: true,
|
|
10996
|
+
get: function() {
|
|
10997
|
+
return defaultLLMDeliveryPathSchema;
|
|
10998
|
+
}
|
|
10999
|
+
});
|
|
9943
11000
|
Object.defineProperty(exports, "defaultModels", {
|
|
9944
11001
|
enumerable: true,
|
|
9945
11002
|
get: function() {
|
|
@@ -10276,6 +11333,12 @@ Object.defineProperty(exports, "getAllEffectivePermissions", {
|
|
|
10276
11333
|
return getAllEffectivePermissions;
|
|
10277
11334
|
}
|
|
10278
11335
|
});
|
|
11336
|
+
Object.defineProperty(exports, "getAllowedCodeApprovalModes", {
|
|
11337
|
+
enumerable: true,
|
|
11338
|
+
get: function() {
|
|
11339
|
+
return getAllowedCodeApprovalModes;
|
|
11340
|
+
}
|
|
11341
|
+
});
|
|
10279
11342
|
Object.defineProperty(exports, "getAvailablePlugins", {
|
|
10280
11343
|
enumerable: true,
|
|
10281
11344
|
get: function() {
|
|
@@ -10312,6 +11375,12 @@ Object.defineProperty(exports, "getDefaultParamsEndpoint", {
|
|
|
10312
11375
|
return getDefaultParamsEndpoint;
|
|
10313
11376
|
}
|
|
10314
11377
|
});
|
|
11378
|
+
Object.defineProperty(exports, "getDocumentFileExtension", {
|
|
11379
|
+
enumerable: true,
|
|
11380
|
+
get: function() {
|
|
11381
|
+
return getDocumentFileExtension;
|
|
11382
|
+
}
|
|
11383
|
+
});
|
|
10315
11384
|
Object.defineProperty(exports, "getEffectivePermissions", {
|
|
10316
11385
|
enumerable: true,
|
|
10317
11386
|
get: function() {
|
|
@@ -10486,18 +11555,6 @@ Object.defineProperty(exports, "hasProcessMCPServerConfig", {
|
|
|
10486
11555
|
return hasProcessMCPServerConfig;
|
|
10487
11556
|
}
|
|
10488
11557
|
});
|
|
10489
|
-
Object.defineProperty(exports, "hostImageIdSuffix", {
|
|
10490
|
-
enumerable: true,
|
|
10491
|
-
get: function() {
|
|
10492
|
-
return hostImageIdSuffix;
|
|
10493
|
-
}
|
|
10494
|
-
});
|
|
10495
|
-
Object.defineProperty(exports, "hostImageNamePrefix", {
|
|
10496
|
-
enumerable: true,
|
|
10497
|
-
get: function() {
|
|
10498
|
-
return hostImageNamePrefix;
|
|
10499
|
-
}
|
|
10500
|
-
});
|
|
10501
11558
|
Object.defineProperty(exports, "imageDetailNumeric", {
|
|
10502
11559
|
enumerable: true,
|
|
10503
11560
|
get: function() {
|
|
@@ -10594,18 +11651,72 @@ Object.defineProperty(exports, "isBedrockDocumentType", {
|
|
|
10594
11651
|
return isBedrockDocumentType;
|
|
10595
11652
|
}
|
|
10596
11653
|
});
|
|
11654
|
+
Object.defineProperty(exports, "isCodeEnvironmentMode", {
|
|
11655
|
+
enumerable: true,
|
|
11656
|
+
get: function() {
|
|
11657
|
+
return isCodeEnvironmentMode;
|
|
11658
|
+
}
|
|
11659
|
+
});
|
|
11660
|
+
Object.defineProperty(exports, "isCodeWorkspaceEnvironment", {
|
|
11661
|
+
enumerable: true,
|
|
11662
|
+
get: function() {
|
|
11663
|
+
return isCodeWorkspaceEnvironment;
|
|
11664
|
+
}
|
|
11665
|
+
});
|
|
11666
|
+
Object.defineProperty(exports, "isCodeWorkspaceSelection", {
|
|
11667
|
+
enumerable: true,
|
|
11668
|
+
get: function() {
|
|
11669
|
+
return isCodeWorkspaceSelection;
|
|
11670
|
+
}
|
|
11671
|
+
});
|
|
11672
|
+
Object.defineProperty(exports, "isCodeWorkspaceSelectionErrorReason", {
|
|
11673
|
+
enumerable: true,
|
|
11674
|
+
get: function() {
|
|
11675
|
+
return isCodeWorkspaceSelectionErrorReason;
|
|
11676
|
+
}
|
|
11677
|
+
});
|
|
11678
|
+
Object.defineProperty(exports, "isCodeWorkspaceSelections", {
|
|
11679
|
+
enumerable: true,
|
|
11680
|
+
get: function() {
|
|
11681
|
+
return isCodeWorkspaceSelections;
|
|
11682
|
+
}
|
|
11683
|
+
});
|
|
10597
11684
|
Object.defineProperty(exports, "isDocumentSupportedProvider", {
|
|
10598
11685
|
enumerable: true,
|
|
10599
11686
|
get: function() {
|
|
10600
11687
|
return isDocumentSupportedProvider;
|
|
10601
11688
|
}
|
|
10602
11689
|
});
|
|
11690
|
+
Object.defineProperty(exports, "isExplicitMimeConfig", {
|
|
11691
|
+
enumerable: true,
|
|
11692
|
+
get: function() {
|
|
11693
|
+
return isExplicitMimeConfig;
|
|
11694
|
+
}
|
|
11695
|
+
});
|
|
10603
11696
|
Object.defineProperty(exports, "isImageVisionTool", {
|
|
10604
11697
|
enumerable: true,
|
|
10605
11698
|
get: function() {
|
|
10606
11699
|
return isImageVisionTool;
|
|
10607
11700
|
}
|
|
10608
11701
|
});
|
|
11702
|
+
Object.defineProperty(exports, "isKnownProviderIdentifier", {
|
|
11703
|
+
enumerable: true,
|
|
11704
|
+
get: function() {
|
|
11705
|
+
return isKnownProviderIdentifier;
|
|
11706
|
+
}
|
|
11707
|
+
});
|
|
11708
|
+
Object.defineProperty(exports, "isMediaSupportedProvider", {
|
|
11709
|
+
enumerable: true,
|
|
11710
|
+
get: function() {
|
|
11711
|
+
return isMediaSupportedProvider;
|
|
11712
|
+
}
|
|
11713
|
+
});
|
|
11714
|
+
Object.defineProperty(exports, "isMessageFileUpload", {
|
|
11715
|
+
enumerable: true,
|
|
11716
|
+
get: function() {
|
|
11717
|
+
return isMessageFileUpload;
|
|
11718
|
+
}
|
|
11719
|
+
});
|
|
10609
11720
|
Object.defineProperty(exports, "isMythosClassModel", {
|
|
10610
11721
|
enumerable: true,
|
|
10611
11722
|
get: function() {
|
|
@@ -10648,6 +11759,18 @@ Object.defineProperty(exports, "isRemoteOidcUrlAllowed", {
|
|
|
10648
11759
|
return isRemoteOidcUrlAllowed;
|
|
10649
11760
|
}
|
|
10650
11761
|
});
|
|
11762
|
+
Object.defineProperty(exports, "isRepositoryInstructionDescriptor", {
|
|
11763
|
+
enumerable: true,
|
|
11764
|
+
get: function() {
|
|
11765
|
+
return isRepositoryInstructionDescriptor;
|
|
11766
|
+
}
|
|
11767
|
+
});
|
|
11768
|
+
Object.defineProperty(exports, "isResponsesApiUpload", {
|
|
11769
|
+
enumerable: true,
|
|
11770
|
+
get: function() {
|
|
11771
|
+
return isResponsesApiUpload;
|
|
11772
|
+
}
|
|
11773
|
+
});
|
|
10651
11774
|
Object.defineProperty(exports, "isSecureCodeEnvironmentControlURL", {
|
|
10652
11775
|
enumerable: true,
|
|
10653
11776
|
get: function() {
|
|
@@ -10660,6 +11783,12 @@ Object.defineProperty(exports, "isSensitiveEnvVar", {
|
|
|
10660
11783
|
return isSensitiveEnvVar;
|
|
10661
11784
|
}
|
|
10662
11785
|
});
|
|
11786
|
+
Object.defineProperty(exports, "isSpeechProviderConfigured", {
|
|
11787
|
+
enumerable: true,
|
|
11788
|
+
get: function() {
|
|
11789
|
+
return isSpeechProviderConfigured;
|
|
11790
|
+
}
|
|
11791
|
+
});
|
|
10663
11792
|
Object.defineProperty(exports, "isUUID", {
|
|
10664
11793
|
enumerable: true,
|
|
10665
11794
|
get: function() {
|
|
@@ -10672,6 +11801,18 @@ Object.defineProperty(exports, "langfuseConfigSchema", {
|
|
|
10672
11801
|
return langfuseConfigSchema;
|
|
10673
11802
|
}
|
|
10674
11803
|
});
|
|
11804
|
+
Object.defineProperty(exports, "langfuseTraceConfigSchema", {
|
|
11805
|
+
enumerable: true,
|
|
11806
|
+
get: function() {
|
|
11807
|
+
return langfuseTraceConfigSchema;
|
|
11808
|
+
}
|
|
11809
|
+
});
|
|
11810
|
+
Object.defineProperty(exports, "listConfiguredSpeechProviders", {
|
|
11811
|
+
enumerable: true,
|
|
11812
|
+
get: function() {
|
|
11813
|
+
return listConfiguredSpeechProviders;
|
|
11814
|
+
}
|
|
11815
|
+
});
|
|
10675
11816
|
Object.defineProperty(exports, "loginPage", {
|
|
10676
11817
|
enumerable: true,
|
|
10677
11818
|
get: function() {
|
|
@@ -10690,6 +11831,18 @@ Object.defineProperty(exports, "mbToBytes", {
|
|
|
10690
11831
|
return mbToBytes;
|
|
10691
11832
|
}
|
|
10692
11833
|
});
|
|
11834
|
+
Object.defineProperty(exports, "mcpRefreshDefaults", {
|
|
11835
|
+
enumerable: true,
|
|
11836
|
+
get: function() {
|
|
11837
|
+
return mcpRefreshDefaults;
|
|
11838
|
+
}
|
|
11839
|
+
});
|
|
11840
|
+
Object.defineProperty(exports, "mediaSupportedProviders", {
|
|
11841
|
+
enumerable: true,
|
|
11842
|
+
get: function() {
|
|
11843
|
+
return mediaSupportedProviders;
|
|
11844
|
+
}
|
|
11845
|
+
});
|
|
10693
11846
|
Object.defineProperty(exports, "megabyte", {
|
|
10694
11847
|
enumerable: true,
|
|
10695
11848
|
get: function() {
|
|
@@ -10810,6 +11963,12 @@ Object.defineProperty(exports, "openAISettings", {
|
|
|
10810
11963
|
return openAISettings;
|
|
10811
11964
|
}
|
|
10812
11965
|
});
|
|
11966
|
+
Object.defineProperty(exports, "openIdDiscoverySchema", {
|
|
11967
|
+
enumerable: true,
|
|
11968
|
+
get: function() {
|
|
11969
|
+
return openIdDiscoverySchema;
|
|
11970
|
+
}
|
|
11971
|
+
});
|
|
10813
11972
|
Object.defineProperty(exports, "openRouterSchema", {
|
|
10814
11973
|
enumerable: true,
|
|
10815
11974
|
get: function() {
|
|
@@ -10840,6 +11999,18 @@ Object.defineProperty(exports, "permissionEntrySchema", {
|
|
|
10840
11999
|
return permissionEntrySchema;
|
|
10841
12000
|
}
|
|
10842
12001
|
});
|
|
12002
|
+
Object.defineProperty(exports, "permissionWriteAttemptsSchema", {
|
|
12003
|
+
enumerable: true,
|
|
12004
|
+
get: function() {
|
|
12005
|
+
return permissionWriteAttemptsSchema;
|
|
12006
|
+
}
|
|
12007
|
+
});
|
|
12008
|
+
Object.defineProperty(exports, "prefersResponsesApiByModel", {
|
|
12009
|
+
enumerable: true,
|
|
12010
|
+
get: function() {
|
|
12011
|
+
return prefersResponsesApiByModel;
|
|
12012
|
+
}
|
|
12013
|
+
});
|
|
10843
12014
|
Object.defineProperty(exports, "principalSchema", {
|
|
10844
12015
|
enumerable: true,
|
|
10845
12016
|
get: function() {
|
|
@@ -10918,6 +12089,24 @@ Object.defineProperty(exports, "resolveAllowedStatefulCodeEnvironments", {
|
|
|
10918
12089
|
return resolveAllowedStatefulCodeEnvironments;
|
|
10919
12090
|
}
|
|
10920
12091
|
});
|
|
12092
|
+
Object.defineProperty(exports, "resolveCodeApprovalMode", {
|
|
12093
|
+
enumerable: true,
|
|
12094
|
+
get: function() {
|
|
12095
|
+
return resolveCodeApprovalMode;
|
|
12096
|
+
}
|
|
12097
|
+
});
|
|
12098
|
+
Object.defineProperty(exports, "resolveCodePermissionDecision", {
|
|
12099
|
+
enumerable: true,
|
|
12100
|
+
get: function() {
|
|
12101
|
+
return resolveCodePermissionDecision;
|
|
12102
|
+
}
|
|
12103
|
+
});
|
|
12104
|
+
Object.defineProperty(exports, "resolveEffectiveUseResponsesApi", {
|
|
12105
|
+
enumerable: true,
|
|
12106
|
+
get: function() {
|
|
12107
|
+
return resolveEffectiveUseResponsesApi;
|
|
12108
|
+
}
|
|
12109
|
+
});
|
|
10921
12110
|
Object.defineProperty(exports, "resolveEndpointType", {
|
|
10922
12111
|
enumerable: true,
|
|
10923
12112
|
get: function() {
|
|
@@ -10930,12 +12119,30 @@ Object.defineProperty(exports, "resolveModelSpecEndpoint", {
|
|
|
10930
12119
|
return resolveModelSpecEndpoint;
|
|
10931
12120
|
}
|
|
10932
12121
|
});
|
|
12122
|
+
Object.defineProperty(exports, "resolveSandboxFilename", {
|
|
12123
|
+
enumerable: true,
|
|
12124
|
+
get: function() {
|
|
12125
|
+
return resolveSandboxFilename;
|
|
12126
|
+
}
|
|
12127
|
+
});
|
|
10933
12128
|
Object.defineProperty(exports, "resolveStatefulCodeEnvironment", {
|
|
10934
12129
|
enumerable: true,
|
|
10935
12130
|
get: function() {
|
|
10936
12131
|
return resolveStatefulCodeEnvironment;
|
|
10937
12132
|
}
|
|
10938
12133
|
});
|
|
12134
|
+
Object.defineProperty(exports, "resolveTraceViewerConfig", {
|
|
12135
|
+
enumerable: true,
|
|
12136
|
+
get: function() {
|
|
12137
|
+
return resolveTraceViewerConfig;
|
|
12138
|
+
}
|
|
12139
|
+
});
|
|
12140
|
+
Object.defineProperty(exports, "resolveUseResponsesApi", {
|
|
12141
|
+
enumerable: true,
|
|
12142
|
+
get: function() {
|
|
12143
|
+
return resolveUseResponsesApi;
|
|
12144
|
+
}
|
|
12145
|
+
});
|
|
10939
12146
|
Object.defineProperty(exports, "resourcePermissionsResponseSchema", {
|
|
10940
12147
|
enumerable: true,
|
|
10941
12148
|
get: function() {
|
|
@@ -11218,6 +12425,18 @@ Object.defineProperty(exports, "toolArgumentFilterFieldSchema", {
|
|
|
11218
12425
|
return toolArgumentFilterFieldSchema;
|
|
11219
12426
|
}
|
|
11220
12427
|
});
|
|
12428
|
+
Object.defineProperty(exports, "traceViewerDefaults", {
|
|
12429
|
+
enumerable: true,
|
|
12430
|
+
get: function() {
|
|
12431
|
+
return traceViewerDefaults;
|
|
12432
|
+
}
|
|
12433
|
+
});
|
|
12434
|
+
Object.defineProperty(exports, "traceViewerLimits", {
|
|
12435
|
+
enumerable: true,
|
|
12436
|
+
get: function() {
|
|
12437
|
+
return traceViewerLimits;
|
|
12438
|
+
}
|
|
12439
|
+
});
|
|
11221
12440
|
Object.defineProperty(exports, "transactionsSchema", {
|
|
11222
12441
|
enumerable: true,
|
|
11223
12442
|
get: function() {
|
|
@@ -11351,4 +12570,4 @@ Object.defineProperty(exports, "webSearchSchema", {
|
|
|
11351
12570
|
}
|
|
11352
12571
|
});
|
|
11353
12572
|
|
|
11354
|
-
//# sourceMappingURL=data-service-
|
|
12573
|
+
//# sourceMappingURL=data-service-CUG1qdeC.js.map
|