librechat-data-provider 0.8.407 → 0.8.501

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.
@@ -1,7 +1,19 @@
1
1
  import { z } from 'zod';
2
2
  import * as s from './schemas';
3
+ export declare function resolveThinkingDisplay(model: string, explicit?: s.ThinkingDisplay | string | null): s.ThinkingDisplayWireValue | undefined;
3
4
  /** Checks if a model supports adaptive thinking (Opus 4.6+, Sonnet 4.6+) */
4
5
  export declare function supportsAdaptiveThinking(model: string): boolean;
6
+ /**
7
+ * Checks if a model omits `thinking` content from responses by default.
8
+ *
9
+ * Starting with Claude Opus 4.7, the Messages API returns empty `thinking`
10
+ * blocks unless the request explicitly opts in via `thinking.display =
11
+ * "summarized"`. This helper narrows the opt-in to Opus 4.7+ (and any future
12
+ * major Opus version) so older adaptive-thinking models are left untouched.
13
+ *
14
+ * See https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7#thinking-content-omitted-by-default
15
+ */
16
+ export declare function omitsThinkingByDefault(model: string): boolean;
5
17
  /** Checks if a model qualifies for the context-1m beta header (Sonnet 4+, Opus 4.6+, Opus 5+) */
6
18
  export declare function supportsContext1m(model: string): boolean;
7
19
  export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pick<{
@@ -131,6 +143,7 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
131
143
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.Verbosity>>>;
132
144
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
133
145
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.AnthropicEffort>>>;
146
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.ThinkingDisplay>>>;
134
147
  web_search: z.ZodOptional<z.ZodBoolean>;
135
148
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
136
149
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -198,7 +211,8 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
198
211
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
199
212
  resendImages: z.ZodOptional<z.ZodBoolean>;
200
213
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
201
- }, "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "system" | "thinking" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, "strip", z.ZodTypeAny, {
214
+ }, "thinking" | "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "system" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "thinkingDisplay" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, "strip", z.ZodTypeAny, {
215
+ thinking?: boolean | undefined;
202
216
  modelLabel?: string | null | undefined;
203
217
  model?: string | null | undefined;
204
218
  promptPrefix?: string | null | undefined;
@@ -209,12 +223,12 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
209
223
  maxContextTokens?: number | undefined;
210
224
  promptCache?: boolean | undefined;
211
225
  system?: string | undefined;
212
- thinking?: boolean | undefined;
213
226
  thinkingBudget?: number | undefined;
214
227
  artifacts?: string | undefined;
215
228
  resendFiles?: boolean | undefined;
216
229
  reasoning_effort?: s.ReasoningEffort | null | undefined;
217
230
  effort?: s.AnthropicEffort | null | undefined;
231
+ thinkingDisplay?: s.ThinkingDisplay | null | undefined;
218
232
  region?: string | undefined;
219
233
  maxTokens?: number | undefined;
220
234
  additionalModelRequestFields?: (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
@@ -247,6 +261,7 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
247
261
  spec?: string | null | undefined;
248
262
  iconURL?: string | null | undefined;
249
263
  }, {
264
+ thinking?: boolean | undefined;
250
265
  modelLabel?: string | null | undefined;
251
266
  model?: string | null | undefined;
252
267
  promptPrefix?: string | null | undefined;
@@ -257,12 +272,12 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
257
272
  maxContextTokens?: string | number | undefined;
258
273
  promptCache?: boolean | undefined;
259
274
  system?: string | undefined;
260
- thinking?: boolean | undefined;
261
275
  thinkingBudget?: string | number | undefined;
262
276
  artifacts?: string | undefined;
263
277
  resendFiles?: boolean | undefined;
264
278
  reasoning_effort?: s.ReasoningEffort | null | undefined;
265
279
  effort?: s.AnthropicEffort | null | undefined;
280
+ thinkingDisplay?: s.ThinkingDisplay | null | undefined;
266
281
  region?: string | undefined;
267
282
  maxTokens?: string | number | undefined;
268
283
  additionalModelRequestFields?: (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
@@ -295,6 +310,7 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
295
310
  spec?: string | null | undefined;
296
311
  iconURL?: string | null | undefined;
297
312
  }>, Partial<{
313
+ thinking?: boolean | undefined;
298
314
  modelLabel?: string | null | undefined;
299
315
  model?: string | null | undefined;
300
316
  promptPrefix?: string | null | undefined;
@@ -305,12 +321,12 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
305
321
  maxContextTokens?: number | undefined;
306
322
  promptCache?: boolean | undefined;
307
323
  system?: string | undefined;
308
- thinking?: boolean | undefined;
309
324
  thinkingBudget?: number | undefined;
310
325
  artifacts?: string | undefined;
311
326
  resendFiles?: boolean | undefined;
312
327
  reasoning_effort?: s.ReasoningEffort | null | undefined;
313
328
  effort?: s.AnthropicEffort | null | undefined;
329
+ thinkingDisplay?: s.ThinkingDisplay | null | undefined;
314
330
  region?: string | undefined;
315
331
  maxTokens?: number | undefined;
316
332
  additionalModelRequestFields?: (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
@@ -343,6 +359,7 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
343
359
  spec?: string | null | undefined;
344
360
  iconURL?: string | null | undefined;
345
361
  }>, {
362
+ thinking?: boolean | undefined;
346
363
  modelLabel?: string | null | undefined;
347
364
  model?: string | null | undefined;
348
365
  promptPrefix?: string | null | undefined;
@@ -353,12 +370,12 @@ export declare const bedrockInputSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
353
370
  maxContextTokens?: string | number | undefined;
354
371
  promptCache?: boolean | undefined;
355
372
  system?: string | undefined;
356
- thinking?: boolean | undefined;
357
373
  thinkingBudget?: string | number | undefined;
358
374
  artifacts?: string | undefined;
359
375
  resendFiles?: boolean | undefined;
360
376
  reasoning_effort?: s.ReasoningEffort | null | undefined;
361
377
  effort?: s.AnthropicEffort | null | undefined;
378
+ thinkingDisplay?: s.ThinkingDisplay | null | undefined;
362
379
  region?: string | undefined;
363
380
  maxTokens?: string | number | undefined;
364
381
  additionalModelRequestFields?: (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
@@ -519,6 +536,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
519
536
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.Verbosity>>>;
520
537
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
521
538
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.AnthropicEffort>>>;
539
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.ThinkingDisplay>>>;
522
540
  web_search: z.ZodOptional<z.ZodBoolean>;
523
541
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
524
542
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -586,7 +604,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
586
604
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
587
605
  resendImages: z.ZodOptional<z.ZodBoolean>;
588
606
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
589
- }, "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinking" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, "strip", z.ZodAny, z.objectOutputType<Pick<{
607
+ }, "thinking" | "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "thinkingDisplay" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, "strip", z.ZodAny, z.objectOutputType<Pick<{
590
608
  conversationId: z.ZodNullable<z.ZodString>;
591
609
  endpoint: z.ZodNullable<z.ZodNativeEnum<typeof s.EModelEndpoint>>;
592
610
  endpointType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof s.EModelEndpoint>>>;
@@ -713,6 +731,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
713
731
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.Verbosity>>>;
714
732
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
715
733
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.AnthropicEffort>>>;
734
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.ThinkingDisplay>>>;
716
735
  web_search: z.ZodOptional<z.ZodBoolean>;
717
736
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
718
737
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -780,7 +799,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
780
799
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
781
800
  resendImages: z.ZodOptional<z.ZodBoolean>;
782
801
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
783
- }, "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinking" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, z.ZodAny, "strip">, z.objectInputType<Pick<{
802
+ }, "thinking" | "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "thinkingDisplay" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, z.ZodAny, "strip">, z.objectInputType<Pick<{
784
803
  conversationId: z.ZodNullable<z.ZodString>;
785
804
  endpoint: z.ZodNullable<z.ZodNativeEnum<typeof s.EModelEndpoint>>;
786
805
  endpointType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof s.EModelEndpoint>>>;
@@ -907,6 +926,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
907
926
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.Verbosity>>>;
908
927
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
909
928
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.AnthropicEffort>>>;
929
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.ThinkingDisplay>>>;
910
930
  web_search: z.ZodOptional<z.ZodBoolean>;
911
931
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
912
932
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -974,7 +994,8 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
974
994
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
975
995
  resendImages: z.ZodOptional<z.ZodBoolean>;
976
996
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
977
- }, "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinking" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, z.ZodAny, "strip">>, Partial<{
997
+ }, "thinking" | "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "thinkingDisplay" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, z.ZodAny, "strip">>, Partial<{
998
+ thinking?: boolean | undefined;
978
999
  modelLabel?: string | null | undefined;
979
1000
  model?: string | null | undefined;
980
1001
  promptPrefix?: string | null | undefined;
@@ -985,12 +1006,12 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
985
1006
  maxContextTokens?: number | undefined;
986
1007
  promptCache?: boolean | undefined;
987
1008
  system?: string | undefined;
988
- thinking?: boolean | undefined;
989
1009
  thinkingBudget?: number | undefined;
990
1010
  artifacts?: string | undefined;
991
1011
  resendFiles?: boolean | undefined;
992
1012
  reasoning_effort?: s.ReasoningEffort | null | undefined;
993
1013
  effort?: s.AnthropicEffort | null | undefined;
1014
+ thinkingDisplay?: s.ThinkingDisplay | null | undefined;
994
1015
  region?: string | undefined;
995
1016
  maxTokens?: number | undefined;
996
1017
  additionalModelRequestFields?: (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
@@ -1149,6 +1170,7 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
1149
1170
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.Verbosity>>>;
1150
1171
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
1151
1172
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.AnthropicEffort>>>;
1173
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof s.ThinkingDisplay>>>;
1152
1174
  web_search: z.ZodOptional<z.ZodBoolean>;
1153
1175
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
1154
1176
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -1216,5 +1238,5 @@ export declare const bedrockInputParser: z.ZodCatch<z.ZodEffects<z.ZodObject<Pic
1216
1238
  fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
1217
1239
  resendImages: z.ZodOptional<z.ZodBoolean>;
1218
1240
  chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1219
- }, "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinking" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, z.ZodAny, "strip">>>;
1241
+ }, "thinking" | "modelLabel" | "model" | "promptPrefix" | "temperature" | "topP" | "topK" | "maxOutputTokens" | "maxContextTokens" | "promptCache" | "thinkingBudget" | "artifacts" | "resendFiles" | "reasoning_effort" | "effort" | "thinkingDisplay" | "region" | "maxTokens" | "additionalModelRequestFields" | "stop" | "greeting" | "spec" | "iconURL">, z.ZodAny, "strip">>>;
1220
1242
  export declare const bedrockOutputParser: (data: Record<string, unknown>) => Record<string, unknown>;
@@ -1900,6 +1900,7 @@ export type TStartupConfig = {
1900
1900
  sharePointPickerGraphScope?: string;
1901
1901
  sharePointPickerSharePointScope?: string;
1902
1902
  openidReuseTokens?: boolean;
1903
+ allowAccountDeletion: boolean;
1903
1904
  minPasswordLength?: number;
1904
1905
  webSearch?: {
1905
1906
  searchProvider?: SearchProviders;
@@ -2250,16 +2251,34 @@ export declare const memorySchema: z.ZodObject<{
2250
2251
  } | undefined;
2251
2252
  }>;
2252
2253
  export type TMemoryConfig = DeepPartial<z.infer<typeof memorySchema>>;
2253
- export declare const summarizationTriggerSchema: z.ZodObject<{
2254
- type: z.ZodEnum<["token_count"]>;
2254
+ export declare const summarizationTriggerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2255
+ type: z.ZodLiteral<"token_ratio">;
2255
2256
  value: z.ZodNumber;
2256
2257
  }, "strip", z.ZodTypeAny, {
2257
2258
  value: number;
2258
- type: "token_count";
2259
+ type: "token_ratio";
2259
2260
  }, {
2260
2261
  value: number;
2261
- type: "token_count";
2262
- }>;
2262
+ type: "token_ratio";
2263
+ }>, z.ZodObject<{
2264
+ type: z.ZodLiteral<"remaining_tokens">;
2265
+ value: z.ZodNumber;
2266
+ }, "strip", z.ZodTypeAny, {
2267
+ value: number;
2268
+ type: "remaining_tokens";
2269
+ }, {
2270
+ value: number;
2271
+ type: "remaining_tokens";
2272
+ }>, z.ZodObject<{
2273
+ type: z.ZodLiteral<"messages_to_refine">;
2274
+ value: z.ZodNumber;
2275
+ }, "strip", z.ZodTypeAny, {
2276
+ value: number;
2277
+ type: "messages_to_refine";
2278
+ }, {
2279
+ value: number;
2280
+ type: "messages_to_refine";
2281
+ }>]>;
2263
2282
  export declare const contextPruningSchema: z.ZodObject<{
2264
2283
  enabled: z.ZodOptional<z.ZodBoolean>;
2265
2284
  keepLastAssistants: z.ZodOptional<z.ZodNumber>;
@@ -2284,16 +2303,34 @@ export declare const summarizationConfigSchema: z.ZodObject<{
2284
2303
  provider: z.ZodOptional<z.ZodString>;
2285
2304
  model: z.ZodOptional<z.ZodString>;
2286
2305
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
2287
- trigger: z.ZodOptional<z.ZodObject<{
2288
- type: z.ZodEnum<["token_count"]>;
2306
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2307
+ type: z.ZodLiteral<"token_ratio">;
2289
2308
  value: z.ZodNumber;
2290
2309
  }, "strip", z.ZodTypeAny, {
2291
2310
  value: number;
2292
- type: "token_count";
2311
+ type: "token_ratio";
2293
2312
  }, {
2294
2313
  value: number;
2295
- type: "token_count";
2296
- }>>;
2314
+ type: "token_ratio";
2315
+ }>, z.ZodObject<{
2316
+ type: z.ZodLiteral<"remaining_tokens">;
2317
+ value: z.ZodNumber;
2318
+ }, "strip", z.ZodTypeAny, {
2319
+ value: number;
2320
+ type: "remaining_tokens";
2321
+ }, {
2322
+ value: number;
2323
+ type: "remaining_tokens";
2324
+ }>, z.ZodObject<{
2325
+ type: z.ZodLiteral<"messages_to_refine">;
2326
+ value: z.ZodNumber;
2327
+ }, "strip", z.ZodTypeAny, {
2328
+ value: number;
2329
+ type: "messages_to_refine";
2330
+ }, {
2331
+ value: number;
2332
+ type: "messages_to_refine";
2333
+ }>]>>;
2297
2334
  prompt: z.ZodOptional<z.ZodString>;
2298
2335
  updatePrompt: z.ZodOptional<z.ZodString>;
2299
2336
  reserveRatio: z.ZodOptional<z.ZodNumber>;
@@ -2325,7 +2362,13 @@ export declare const summarizationConfigSchema: z.ZodObject<{
2325
2362
  parameters?: Record<string, string | number | boolean | null> | undefined;
2326
2363
  trigger?: {
2327
2364
  value: number;
2328
- type: "token_count";
2365
+ type: "token_ratio";
2366
+ } | {
2367
+ value: number;
2368
+ type: "remaining_tokens";
2369
+ } | {
2370
+ value: number;
2371
+ type: "messages_to_refine";
2329
2372
  } | undefined;
2330
2373
  updatePrompt?: string | undefined;
2331
2374
  reserveRatio?: number | undefined;
@@ -2345,7 +2388,13 @@ export declare const summarizationConfigSchema: z.ZodObject<{
2345
2388
  parameters?: Record<string, string | number | boolean | null> | undefined;
2346
2389
  trigger?: {
2347
2390
  value: number;
2348
- type: "token_count";
2391
+ type: "token_ratio";
2392
+ } | {
2393
+ value: number;
2394
+ type: "remaining_tokens";
2395
+ } | {
2396
+ value: number;
2397
+ type: "messages_to_refine";
2349
2398
  } | undefined;
2350
2399
  updatePrompt?: string | undefined;
2351
2400
  reserveRatio?: number | undefined;
@@ -2997,16 +3046,34 @@ export declare const configSchema: z.ZodObject<{
2997
3046
  provider: z.ZodOptional<z.ZodString>;
2998
3047
  model: z.ZodOptional<z.ZodString>;
2999
3048
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
3000
- trigger: z.ZodOptional<z.ZodObject<{
3001
- type: z.ZodEnum<["token_count"]>;
3049
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3050
+ type: z.ZodLiteral<"token_ratio">;
3002
3051
  value: z.ZodNumber;
3003
3052
  }, "strip", z.ZodTypeAny, {
3004
3053
  value: number;
3005
- type: "token_count";
3054
+ type: "token_ratio";
3006
3055
  }, {
3007
3056
  value: number;
3008
- type: "token_count";
3009
- }>>;
3057
+ type: "token_ratio";
3058
+ }>, z.ZodObject<{
3059
+ type: z.ZodLiteral<"remaining_tokens">;
3060
+ value: z.ZodNumber;
3061
+ }, "strip", z.ZodTypeAny, {
3062
+ value: number;
3063
+ type: "remaining_tokens";
3064
+ }, {
3065
+ value: number;
3066
+ type: "remaining_tokens";
3067
+ }>, z.ZodObject<{
3068
+ type: z.ZodLiteral<"messages_to_refine">;
3069
+ value: z.ZodNumber;
3070
+ }, "strip", z.ZodTypeAny, {
3071
+ value: number;
3072
+ type: "messages_to_refine";
3073
+ }, {
3074
+ value: number;
3075
+ type: "messages_to_refine";
3076
+ }>]>>;
3010
3077
  prompt: z.ZodOptional<z.ZodString>;
3011
3078
  updatePrompt: z.ZodOptional<z.ZodString>;
3012
3079
  reserveRatio: z.ZodOptional<z.ZodNumber>;
@@ -3038,7 +3105,13 @@ export declare const configSchema: z.ZodObject<{
3038
3105
  parameters?: Record<string, string | number | boolean | null> | undefined;
3039
3106
  trigger?: {
3040
3107
  value: number;
3041
- type: "token_count";
3108
+ type: "token_ratio";
3109
+ } | {
3110
+ value: number;
3111
+ type: "remaining_tokens";
3112
+ } | {
3113
+ value: number;
3114
+ type: "messages_to_refine";
3042
3115
  } | undefined;
3043
3116
  updatePrompt?: string | undefined;
3044
3117
  reserveRatio?: number | undefined;
@@ -3058,7 +3131,13 @@ export declare const configSchema: z.ZodObject<{
3058
3131
  parameters?: Record<string, string | number | boolean | null> | undefined;
3059
3132
  trigger?: {
3060
3133
  value: number;
3061
- type: "token_count";
3134
+ type: "token_ratio";
3135
+ } | {
3136
+ value: number;
3137
+ type: "remaining_tokens";
3138
+ } | {
3139
+ value: number;
3140
+ type: "messages_to_refine";
3062
3141
  } | undefined;
3063
3142
  updatePrompt?: string | undefined;
3064
3143
  reserveRatio?: number | undefined;
@@ -4949,6 +5028,7 @@ export declare const configSchema: z.ZodObject<{
4949
5028
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").Verbosity>>>;
4950
5029
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
4951
5030
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").AnthropicEffort>>>;
5031
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").ThinkingDisplay>>>;
4952
5032
  web_search: z.ZodOptional<z.ZodBoolean>;
4953
5033
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
4954
5034
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -5074,6 +5154,7 @@ export declare const configSchema: z.ZodObject<{
5074
5154
  verbosity?: import("./schemas").Verbosity | null | undefined;
5075
5155
  useResponsesApi?: boolean | undefined;
5076
5156
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5157
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5077
5158
  web_search?: boolean | undefined;
5078
5159
  disableStreaming?: boolean | undefined;
5079
5160
  assistant_id?: string | undefined;
@@ -5165,6 +5246,7 @@ export declare const configSchema: z.ZodObject<{
5165
5246
  verbosity?: import("./schemas").Verbosity | null | undefined;
5166
5247
  useResponsesApi?: boolean | undefined;
5167
5248
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5249
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5168
5250
  web_search?: boolean | undefined;
5169
5251
  disableStreaming?: boolean | undefined;
5170
5252
  assistant_id?: string | undefined;
@@ -5274,6 +5356,7 @@ export declare const configSchema: z.ZodObject<{
5274
5356
  verbosity?: import("./schemas").Verbosity | null | undefined;
5275
5357
  useResponsesApi?: boolean | undefined;
5276
5358
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5359
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5277
5360
  web_search?: boolean | undefined;
5278
5361
  disableStreaming?: boolean | undefined;
5279
5362
  assistant_id?: string | undefined;
@@ -5383,6 +5466,7 @@ export declare const configSchema: z.ZodObject<{
5383
5466
  verbosity?: import("./schemas").Verbosity | null | undefined;
5384
5467
  useResponsesApi?: boolean | undefined;
5385
5468
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5469
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5386
5470
  web_search?: boolean | undefined;
5387
5471
  disableStreaming?: boolean | undefined;
5388
5472
  assistant_id?: string | undefined;
@@ -5497,6 +5581,7 @@ export declare const configSchema: z.ZodObject<{
5497
5581
  verbosity?: import("./schemas").Verbosity | null | undefined;
5498
5582
  useResponsesApi?: boolean | undefined;
5499
5583
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5584
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5500
5585
  web_search?: boolean | undefined;
5501
5586
  disableStreaming?: boolean | undefined;
5502
5587
  assistant_id?: string | undefined;
@@ -5609,6 +5694,7 @@ export declare const configSchema: z.ZodObject<{
5609
5694
  verbosity?: import("./schemas").Verbosity | null | undefined;
5610
5695
  useResponsesApi?: boolean | undefined;
5611
5696
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5697
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5612
5698
  web_search?: boolean | undefined;
5613
5699
  disableStreaming?: boolean | undefined;
5614
5700
  assistant_id?: string | undefined;
@@ -7770,7 +7856,13 @@ export declare const configSchema: z.ZodObject<{
7770
7856
  parameters?: Record<string, string | number | boolean | null> | undefined;
7771
7857
  trigger?: {
7772
7858
  value: number;
7773
- type: "token_count";
7859
+ type: "token_ratio";
7860
+ } | {
7861
+ value: number;
7862
+ type: "remaining_tokens";
7863
+ } | {
7864
+ value: number;
7865
+ type: "messages_to_refine";
7774
7866
  } | undefined;
7775
7867
  updatePrompt?: string | undefined;
7776
7868
  reserveRatio?: number | undefined;
@@ -8411,6 +8503,7 @@ export declare const configSchema: z.ZodObject<{
8411
8503
  verbosity?: import("./schemas").Verbosity | null | undefined;
8412
8504
  useResponsesApi?: boolean | undefined;
8413
8505
  effort?: import("./schemas").AnthropicEffort | null | undefined;
8506
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
8414
8507
  web_search?: boolean | undefined;
8415
8508
  disableStreaming?: boolean | undefined;
8416
8509
  assistant_id?: string | undefined;
@@ -8539,7 +8632,13 @@ export declare const configSchema: z.ZodObject<{
8539
8632
  parameters?: Record<string, string | number | boolean | null> | undefined;
8540
8633
  trigger?: {
8541
8634
  value: number;
8542
- type: "token_count";
8635
+ type: "token_ratio";
8636
+ } | {
8637
+ value: number;
8638
+ type: "remaining_tokens";
8639
+ } | {
8640
+ value: number;
8641
+ type: "messages_to_refine";
8543
8642
  } | undefined;
8544
8643
  updatePrompt?: string | undefined;
8545
8644
  reserveRatio?: number | undefined;
@@ -9247,6 +9346,7 @@ export declare const configSchema: z.ZodObject<{
9247
9346
  verbosity?: import("./schemas").Verbosity | null | undefined;
9248
9347
  useResponsesApi?: boolean | undefined;
9249
9348
  effort?: import("./schemas").AnthropicEffort | null | undefined;
9349
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
9250
9350
  web_search?: boolean | undefined;
9251
9351
  disableStreaming?: boolean | undefined;
9252
9352
  assistant_id?: string | undefined;
@@ -9588,16 +9688,34 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
9588
9688
  provider: z.ZodOptional<z.ZodString>;
9589
9689
  model: z.ZodOptional<z.ZodString>;
9590
9690
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
9591
- trigger: z.ZodOptional<z.ZodObject<{
9592
- type: z.ZodEnum<["token_count"]>;
9691
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
9692
+ type: z.ZodLiteral<"token_ratio">;
9593
9693
  value: z.ZodNumber;
9594
9694
  }, "strip", z.ZodTypeAny, {
9595
9695
  value: number;
9596
- type: "token_count";
9696
+ type: "token_ratio";
9597
9697
  }, {
9598
9698
  value: number;
9599
- type: "token_count";
9600
- }>>;
9699
+ type: "token_ratio";
9700
+ }>, z.ZodObject<{
9701
+ type: z.ZodLiteral<"remaining_tokens">;
9702
+ value: z.ZodNumber;
9703
+ }, "strip", z.ZodTypeAny, {
9704
+ value: number;
9705
+ type: "remaining_tokens";
9706
+ }, {
9707
+ value: number;
9708
+ type: "remaining_tokens";
9709
+ }>, z.ZodObject<{
9710
+ type: z.ZodLiteral<"messages_to_refine">;
9711
+ value: z.ZodNumber;
9712
+ }, "strip", z.ZodTypeAny, {
9713
+ value: number;
9714
+ type: "messages_to_refine";
9715
+ }, {
9716
+ value: number;
9717
+ type: "messages_to_refine";
9718
+ }>]>>;
9601
9719
  prompt: z.ZodOptional<z.ZodString>;
9602
9720
  updatePrompt: z.ZodOptional<z.ZodString>;
9603
9721
  reserveRatio: z.ZodOptional<z.ZodNumber>;
@@ -9629,7 +9747,13 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
9629
9747
  parameters?: Record<string, string | number | boolean | null> | undefined;
9630
9748
  trigger?: {
9631
9749
  value: number;
9632
- type: "token_count";
9750
+ type: "token_ratio";
9751
+ } | {
9752
+ value: number;
9753
+ type: "remaining_tokens";
9754
+ } | {
9755
+ value: number;
9756
+ type: "messages_to_refine";
9633
9757
  } | undefined;
9634
9758
  updatePrompt?: string | undefined;
9635
9759
  reserveRatio?: number | undefined;
@@ -9649,7 +9773,13 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
9649
9773
  parameters?: Record<string, string | number | boolean | null> | undefined;
9650
9774
  trigger?: {
9651
9775
  value: number;
9652
- type: "token_count";
9776
+ type: "token_ratio";
9777
+ } | {
9778
+ value: number;
9779
+ type: "remaining_tokens";
9780
+ } | {
9781
+ value: number;
9782
+ type: "messages_to_refine";
9653
9783
  } | undefined;
9654
9784
  updatePrompt?: string | undefined;
9655
9785
  reserveRatio?: number | undefined;
@@ -11540,6 +11670,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11540
11670
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").Verbosity>>>;
11541
11671
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
11542
11672
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").AnthropicEffort>>>;
11673
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").ThinkingDisplay>>>;
11543
11674
  web_search: z.ZodOptional<z.ZodBoolean>;
11544
11675
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
11545
11676
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -11665,6 +11796,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11665
11796
  verbosity?: import("./schemas").Verbosity | null | undefined;
11666
11797
  useResponsesApi?: boolean | undefined;
11667
11798
  effort?: import("./schemas").AnthropicEffort | null | undefined;
11799
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11668
11800
  web_search?: boolean | undefined;
11669
11801
  disableStreaming?: boolean | undefined;
11670
11802
  assistant_id?: string | undefined;
@@ -11756,6 +11888,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11756
11888
  verbosity?: import("./schemas").Verbosity | null | undefined;
11757
11889
  useResponsesApi?: boolean | undefined;
11758
11890
  effort?: import("./schemas").AnthropicEffort | null | undefined;
11891
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11759
11892
  web_search?: boolean | undefined;
11760
11893
  disableStreaming?: boolean | undefined;
11761
11894
  assistant_id?: string | undefined;
@@ -11865,6 +11998,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11865
11998
  verbosity?: import("./schemas").Verbosity | null | undefined;
11866
11999
  useResponsesApi?: boolean | undefined;
11867
12000
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12001
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11868
12002
  web_search?: boolean | undefined;
11869
12003
  disableStreaming?: boolean | undefined;
11870
12004
  assistant_id?: string | undefined;
@@ -11974,6 +12108,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11974
12108
  verbosity?: import("./schemas").Verbosity | null | undefined;
11975
12109
  useResponsesApi?: boolean | undefined;
11976
12110
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12111
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11977
12112
  web_search?: boolean | undefined;
11978
12113
  disableStreaming?: boolean | undefined;
11979
12114
  assistant_id?: string | undefined;
@@ -12088,6 +12223,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
12088
12223
  verbosity?: import("./schemas").Verbosity | null | undefined;
12089
12224
  useResponsesApi?: boolean | undefined;
12090
12225
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12226
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
12091
12227
  web_search?: boolean | undefined;
12092
12228
  disableStreaming?: boolean | undefined;
12093
12229
  assistant_id?: string | undefined;
@@ -12200,6 +12336,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
12200
12336
  verbosity?: import("./schemas").Verbosity | null | undefined;
12201
12337
  useResponsesApi?: boolean | undefined;
12202
12338
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12339
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
12203
12340
  web_search?: boolean | undefined;
12204
12341
  disableStreaming?: boolean | undefined;
12205
12342
  assistant_id?: string | undefined;
@@ -14694,9 +14831,9 @@ export declare enum TTSProviders {
14694
14831
  /** Enum for app-wide constants */
14695
14832
  export declare enum Constants {
14696
14833
  /** Key for the app's version. */
14697
- VERSION = "v0.8.4",
14834
+ VERSION = "v0.8.5",
14698
14835
  /** Key for the Custom Config's version (librechat.yaml). */
14699
- CONFIG_VERSION = "1.3.7",
14836
+ CONFIG_VERSION = "1.3.9",
14700
14837
  /** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
14701
14838
  NO_PARENT = "00000000-0000-0000-0000-000000000000",
14702
14839
  /** Standard value to use whatever the submission prelim. `responseMessageId` is */
@@ -13,13 +13,8 @@ import * as permissions from './accessPermissions';
13
13
  export declare function revokeUserKey(name: string): Promise<unknown>;
14
14
  export declare function revokeAllUserKeys(): Promise<unknown>;
15
15
  export declare function deleteUser(payload?: t.TDeleteUserRequest): Promise<unknown>;
16
- export type FavoriteItem = {
17
- agentId?: string;
18
- model?: string;
19
- endpoint?: string;
20
- };
21
- export declare function getFavorites(): Promise<FavoriteItem[]>;
22
- export declare function updateFavorites(favorites: FavoriteItem[]): Promise<FavoriteItem[]>;
16
+ export declare function getFavorites(): Promise<q.TUserFavorite[]>;
17
+ export declare function updateFavorites(favorites: q.TUserFavorite[]): Promise<q.TUserFavorite[]>;
23
18
  export declare function getSharedMessages(shareId: string): Promise<t.TSharedMessagesResponse>;
24
19
  export declare const listSharedLinks: (params: q.SharedLinksListParams) => Promise<q.SharedLinksResponse>;
25
20
  export declare function getSharedLink(conversationId: string): Promise<t.TSharedLinkGetResponse>;
@@ -255,6 +255,8 @@ export declare const fileConfigSchema: z.ZodObject<{
255
255
  export type TFileConfig = z.infer<typeof fileConfigSchema>;
256
256
  /** Helper function to safely convert string patterns to RegExp objects */
257
257
  export declare const convertStringsToRegex: (patterns: string[]) => RegExp[];
258
+ /** Detects whether the given MIME type patterns accept all file types (e.g., `.*` or `.+`). */
259
+ export declare const isPermissiveMimeConfig: (types?: RegExp[]) => boolean;
258
260
  export declare function getEndpointFileConfig(params: {
259
261
  fileConfig?: FileConfig | null;
260
262
  endpoint?: string | null;