librechat-data-provider 0.7.71 → 0.7.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "librechat-data-provider",
3
- "version": "0.7.71",
3
+ "version": "0.7.73",
4
4
  "description": "data services for librechat apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
package/src/config.ts CHANGED
@@ -168,6 +168,7 @@ export enum AgentCapabilities {
168
168
  artifacts = 'artifacts',
169
169
  actions = 'actions',
170
170
  tools = 'tools',
171
+ chain = 'chain',
171
172
  ocr = 'ocr',
172
173
  }
173
174
 
@@ -234,6 +235,7 @@ export const agentsEndpointSChema = baseEndpointSchema.merge(
234
235
  /* agents specific */
235
236
  recursionLimit: z.number().optional(),
236
237
  disableBuilder: z.boolean().optional(),
238
+ maxRecursionLimit: z.number().optional(),
237
239
  capabilities: z
238
240
  .array(z.nativeEnum(AgentCapabilities))
239
241
  .optional()
@@ -244,6 +246,7 @@ export const agentsEndpointSChema = baseEndpointSchema.merge(
244
246
  AgentCapabilities.actions,
245
247
  AgentCapabilities.tools,
246
248
  AgentCapabilities.ocr,
249
+ AgentCapabilities.chain,
247
250
  ]),
248
251
  }),
249
252
  );
@@ -827,28 +830,29 @@ export const supportsBalanceCheck = {
827
830
  };
828
831
 
829
832
  export const visionModels = [
830
- 'grok-3',
831
- 'grok-2-vision',
833
+ 'qwen-vl',
832
834
  'grok-vision',
833
- 'gpt-4.5',
834
- 'gpt-4o',
835
+ 'grok-2-vision',
836
+ 'grok-3',
835
837
  'gpt-4o-mini',
836
- 'o1',
838
+ 'gpt-4o',
837
839
  'gpt-4-turbo',
838
840
  'gpt-4-vision',
841
+ 'o1',
842
+ 'gpt-4.5',
839
843
  'llava',
840
844
  'llava-13b',
841
845
  'gemini-pro-vision',
842
846
  'claude-3',
843
- 'gemini-2.0',
844
- 'gemini-1.5',
845
847
  'gemini-exp',
848
+ 'gemini-1.5',
849
+ 'gemini-2.0',
846
850
  'moondream',
847
851
  'llama3.2-vision',
848
- 'llama-3.2-90b-vision',
849
852
  'llama-3.2-11b-vision',
850
- 'llama-3-2-90b-vision',
851
853
  'llama-3-2-11b-vision',
854
+ 'llama-3.2-90b-vision',
855
+ 'llama-3-2-90b-vision',
852
856
  ];
853
857
  export enum VisionModes {
854
858
  generative = 'generative',
@@ -1190,7 +1194,7 @@ export enum Constants {
1190
1194
  /** Key for the app's version. */
1191
1195
  VERSION = 'v0.7.7',
1192
1196
  /** Key for the Custom Config's version (librechat.yaml). */
1193
- CONFIG_VERSION = '1.2.2',
1197
+ CONFIG_VERSION = '1.2.3',
1194
1198
  /** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
1195
1199
  NO_PARENT = '00000000-0000-0000-0000-000000000000',
1196
1200
  /** Standard value for the initial conversationId before a request is sent */
package/src/mcp.ts CHANGED
@@ -85,3 +85,26 @@ export const MCPOptionsSchema = z.union([
85
85
  ]);
86
86
 
87
87
  export const MCPServersSchema = z.record(z.string(), MCPOptionsSchema);
88
+
89
+ export type MCPOptions = z.infer<typeof MCPOptionsSchema>;
90
+
91
+ /**
92
+ * Recursively processes an object to replace environment variables in string values
93
+ * @param {MCPOptions} obj - The object to process
94
+ * @returns {MCPOptions} - The processed object with environment variables replaced
95
+ */
96
+ export function processMCPEnv(obj: MCPOptions): MCPOptions {
97
+ if (obj === null || obj === undefined) {
98
+ return obj;
99
+ }
100
+
101
+ if ('env' in obj && obj.env) {
102
+ const processedEnv: Record<string, string> = {};
103
+ for (const [key, value] of Object.entries(obj.env)) {
104
+ processedEnv[key] = extractEnvVariable(value);
105
+ }
106
+ obj.env = processedEnv;
107
+ }
108
+
109
+ return obj;
110
+ }
package/src/schemas.ts CHANGED
@@ -47,6 +47,7 @@ export enum BedrockProviders {
47
47
  Meta = 'meta',
48
48
  MistralAI = 'mistral',
49
49
  StabilityAI = 'stability',
50
+ DeepSeek = 'deepseek',
50
51
  }
51
52
 
52
53
  export const getModelKey = (endpoint: EModelEndpoint | string, model: string) => {
@@ -157,6 +158,7 @@ export const defaultAgentFormValues = {
157
158
  projectIds: [],
158
159
  artifacts: '',
159
160
  isCollaborative: false,
161
+ recursion_limit: undefined,
160
162
  [Tools.execute_code]: false,
161
163
  [Tools.file_search]: false,
162
164
  };
@@ -19,6 +19,15 @@ export namespace Agents {
19
19
  tool_call_ids?: string[];
20
20
  };
21
21
 
22
+ export type AgentUpdate = {
23
+ type: ContentTypes.AGENT_UPDATE;
24
+ agent_update: {
25
+ index: number;
26
+ runId: string;
27
+ agentId: string;
28
+ };
29
+ };
30
+
22
31
  export type MessageContentImageUrl = {
23
32
  type: ContentTypes.IMAGE_URL;
24
33
  image_url: string | { url: string; detail?: ImageDetail };
@@ -26,6 +35,7 @@ export namespace Agents {
26
35
 
27
36
  export type MessageContentComplex =
28
37
  | ReasoningContentText
38
+ | AgentUpdate
29
39
  | MessageContentText
30
40
  | MessageContentImageUrl
31
41
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -159,12 +169,7 @@ export namespace Agents {
159
169
  index: number; // #new
160
170
  stepIndex?: number; // #new
161
171
  stepDetails: StepDetails;
162
- usage: null | {
163
- // Define usage structure if it's ever non-null
164
- // prompt_tokens: number; // #new
165
- // completion_tokens: number; // #new
166
- // total_tokens: number; // #new
167
- };
172
+ usage: null | object;
168
173
  };
169
174
  /**
170
175
  * Represents a run step delta i.e. any changed fields on a run step during
@@ -222,6 +222,7 @@ export type Agent = {
222
222
  end_after_tools?: boolean;
223
223
  hide_sequential_outputs?: boolean;
224
224
  artifacts?: ArtifactModes;
225
+ recursion_limit?: number;
225
226
  };
226
227
 
227
228
  export type TAgentsMap = Record<string, Agent | undefined>;
@@ -236,7 +237,10 @@ export type AgentCreateParams = {
236
237
  provider: AgentProvider;
237
238
  model: string | null;
238
239
  model_parameters: AgentModelParameters;
239
- } & Pick<Agent, 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs' | 'artifacts'>;
240
+ } & Pick<
241
+ Agent,
242
+ 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs' | 'artifacts' | 'recursion_limit'
243
+ >;
240
244
 
241
245
  export type AgentUpdateParams = {
242
246
  name?: string | null;
@@ -252,7 +256,10 @@ export type AgentUpdateParams = {
252
256
  projectIds?: string[];
253
257
  removeProjectIds?: string[];
254
258
  isCollaborative?: boolean;
255
- } & Pick<Agent, 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs' | 'artifacts'>;
259
+ } & Pick<
260
+ Agent,
261
+ 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs' | 'artifacts' | 'recursion_limit'
262
+ >;
256
263
 
257
264
  export type AgentListParams = {
258
265
  limit?: number;
@@ -455,6 +462,7 @@ export type TMessageContentParts =
455
462
  PartMetadata;
456
463
  }
457
464
  | { type: ContentTypes.IMAGE_FILE; image_file: ImageFile & PartMetadata }
465
+ | Agents.AgentUpdate
458
466
  | Agents.MessageContentImageUrl;
459
467
 
460
468
  export type StreamContentData = TMessageContentParts & {
package/src/types/runs.ts CHANGED
@@ -5,6 +5,7 @@ export enum ContentTypes {
5
5
  TOOL_CALL = 'tool_call',
6
6
  IMAGE_FILE = 'image_file',
7
7
  IMAGE_URL = 'image_url',
8
+ AGENT_UPDATE = 'agent_update',
8
9
  ERROR = 'error',
9
10
  }
10
11