librechat-data-provider 0.8.500 → 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>;
@@ -2251,16 +2251,34 @@ export declare const memorySchema: z.ZodObject<{
2251
2251
  } | undefined;
2252
2252
  }>;
2253
2253
  export type TMemoryConfig = DeepPartial<z.infer<typeof memorySchema>>;
2254
- export declare const summarizationTriggerSchema: z.ZodObject<{
2255
- type: z.ZodEnum<["token_count"]>;
2254
+ export declare const summarizationTriggerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2255
+ type: z.ZodLiteral<"token_ratio">;
2256
2256
  value: z.ZodNumber;
2257
2257
  }, "strip", z.ZodTypeAny, {
2258
2258
  value: number;
2259
- type: "token_count";
2259
+ type: "token_ratio";
2260
2260
  }, {
2261
2261
  value: number;
2262
- type: "token_count";
2263
- }>;
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
+ }>]>;
2264
2282
  export declare const contextPruningSchema: z.ZodObject<{
2265
2283
  enabled: z.ZodOptional<z.ZodBoolean>;
2266
2284
  keepLastAssistants: z.ZodOptional<z.ZodNumber>;
@@ -2285,16 +2303,34 @@ export declare const summarizationConfigSchema: z.ZodObject<{
2285
2303
  provider: z.ZodOptional<z.ZodString>;
2286
2304
  model: z.ZodOptional<z.ZodString>;
2287
2305
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
2288
- trigger: z.ZodOptional<z.ZodObject<{
2289
- type: z.ZodEnum<["token_count"]>;
2306
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2307
+ type: z.ZodLiteral<"token_ratio">;
2290
2308
  value: z.ZodNumber;
2291
2309
  }, "strip", z.ZodTypeAny, {
2292
2310
  value: number;
2293
- type: "token_count";
2311
+ type: "token_ratio";
2294
2312
  }, {
2295
2313
  value: number;
2296
- type: "token_count";
2297
- }>>;
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
+ }>]>>;
2298
2334
  prompt: z.ZodOptional<z.ZodString>;
2299
2335
  updatePrompt: z.ZodOptional<z.ZodString>;
2300
2336
  reserveRatio: z.ZodOptional<z.ZodNumber>;
@@ -2326,7 +2362,13 @@ export declare const summarizationConfigSchema: z.ZodObject<{
2326
2362
  parameters?: Record<string, string | number | boolean | null> | undefined;
2327
2363
  trigger?: {
2328
2364
  value: number;
2329
- type: "token_count";
2365
+ type: "token_ratio";
2366
+ } | {
2367
+ value: number;
2368
+ type: "remaining_tokens";
2369
+ } | {
2370
+ value: number;
2371
+ type: "messages_to_refine";
2330
2372
  } | undefined;
2331
2373
  updatePrompt?: string | undefined;
2332
2374
  reserveRatio?: number | undefined;
@@ -2346,7 +2388,13 @@ export declare const summarizationConfigSchema: z.ZodObject<{
2346
2388
  parameters?: Record<string, string | number | boolean | null> | undefined;
2347
2389
  trigger?: {
2348
2390
  value: number;
2349
- type: "token_count";
2391
+ type: "token_ratio";
2392
+ } | {
2393
+ value: number;
2394
+ type: "remaining_tokens";
2395
+ } | {
2396
+ value: number;
2397
+ type: "messages_to_refine";
2350
2398
  } | undefined;
2351
2399
  updatePrompt?: string | undefined;
2352
2400
  reserveRatio?: number | undefined;
@@ -2998,16 +3046,34 @@ export declare const configSchema: z.ZodObject<{
2998
3046
  provider: z.ZodOptional<z.ZodString>;
2999
3047
  model: z.ZodOptional<z.ZodString>;
3000
3048
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
3001
- trigger: z.ZodOptional<z.ZodObject<{
3002
- type: z.ZodEnum<["token_count"]>;
3049
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3050
+ type: z.ZodLiteral<"token_ratio">;
3003
3051
  value: z.ZodNumber;
3004
3052
  }, "strip", z.ZodTypeAny, {
3005
3053
  value: number;
3006
- type: "token_count";
3054
+ type: "token_ratio";
3007
3055
  }, {
3008
3056
  value: number;
3009
- type: "token_count";
3010
- }>>;
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
+ }>]>>;
3011
3077
  prompt: z.ZodOptional<z.ZodString>;
3012
3078
  updatePrompt: z.ZodOptional<z.ZodString>;
3013
3079
  reserveRatio: z.ZodOptional<z.ZodNumber>;
@@ -3039,7 +3105,13 @@ export declare const configSchema: z.ZodObject<{
3039
3105
  parameters?: Record<string, string | number | boolean | null> | undefined;
3040
3106
  trigger?: {
3041
3107
  value: number;
3042
- type: "token_count";
3108
+ type: "token_ratio";
3109
+ } | {
3110
+ value: number;
3111
+ type: "remaining_tokens";
3112
+ } | {
3113
+ value: number;
3114
+ type: "messages_to_refine";
3043
3115
  } | undefined;
3044
3116
  updatePrompt?: string | undefined;
3045
3117
  reserveRatio?: number | undefined;
@@ -3059,7 +3131,13 @@ export declare const configSchema: z.ZodObject<{
3059
3131
  parameters?: Record<string, string | number | boolean | null> | undefined;
3060
3132
  trigger?: {
3061
3133
  value: number;
3062
- type: "token_count";
3134
+ type: "token_ratio";
3135
+ } | {
3136
+ value: number;
3137
+ type: "remaining_tokens";
3138
+ } | {
3139
+ value: number;
3140
+ type: "messages_to_refine";
3063
3141
  } | undefined;
3064
3142
  updatePrompt?: string | undefined;
3065
3143
  reserveRatio?: number | undefined;
@@ -4950,6 +5028,7 @@ export declare const configSchema: z.ZodObject<{
4950
5028
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").Verbosity>>>;
4951
5029
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
4952
5030
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").AnthropicEffort>>>;
5031
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").ThinkingDisplay>>>;
4953
5032
  web_search: z.ZodOptional<z.ZodBoolean>;
4954
5033
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
4955
5034
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -5075,6 +5154,7 @@ export declare const configSchema: z.ZodObject<{
5075
5154
  verbosity?: import("./schemas").Verbosity | null | undefined;
5076
5155
  useResponsesApi?: boolean | undefined;
5077
5156
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5157
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5078
5158
  web_search?: boolean | undefined;
5079
5159
  disableStreaming?: boolean | undefined;
5080
5160
  assistant_id?: string | undefined;
@@ -5166,6 +5246,7 @@ export declare const configSchema: z.ZodObject<{
5166
5246
  verbosity?: import("./schemas").Verbosity | null | undefined;
5167
5247
  useResponsesApi?: boolean | undefined;
5168
5248
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5249
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5169
5250
  web_search?: boolean | undefined;
5170
5251
  disableStreaming?: boolean | undefined;
5171
5252
  assistant_id?: string | undefined;
@@ -5275,6 +5356,7 @@ export declare const configSchema: z.ZodObject<{
5275
5356
  verbosity?: import("./schemas").Verbosity | null | undefined;
5276
5357
  useResponsesApi?: boolean | undefined;
5277
5358
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5359
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5278
5360
  web_search?: boolean | undefined;
5279
5361
  disableStreaming?: boolean | undefined;
5280
5362
  assistant_id?: string | undefined;
@@ -5384,6 +5466,7 @@ export declare const configSchema: z.ZodObject<{
5384
5466
  verbosity?: import("./schemas").Verbosity | null | undefined;
5385
5467
  useResponsesApi?: boolean | undefined;
5386
5468
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5469
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5387
5470
  web_search?: boolean | undefined;
5388
5471
  disableStreaming?: boolean | undefined;
5389
5472
  assistant_id?: string | undefined;
@@ -5498,6 +5581,7 @@ export declare const configSchema: z.ZodObject<{
5498
5581
  verbosity?: import("./schemas").Verbosity | null | undefined;
5499
5582
  useResponsesApi?: boolean | undefined;
5500
5583
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5584
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5501
5585
  web_search?: boolean | undefined;
5502
5586
  disableStreaming?: boolean | undefined;
5503
5587
  assistant_id?: string | undefined;
@@ -5610,6 +5694,7 @@ export declare const configSchema: z.ZodObject<{
5610
5694
  verbosity?: import("./schemas").Verbosity | null | undefined;
5611
5695
  useResponsesApi?: boolean | undefined;
5612
5696
  effort?: import("./schemas").AnthropicEffort | null | undefined;
5697
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
5613
5698
  web_search?: boolean | undefined;
5614
5699
  disableStreaming?: boolean | undefined;
5615
5700
  assistant_id?: string | undefined;
@@ -7771,7 +7856,13 @@ export declare const configSchema: z.ZodObject<{
7771
7856
  parameters?: Record<string, string | number | boolean | null> | undefined;
7772
7857
  trigger?: {
7773
7858
  value: number;
7774
- type: "token_count";
7859
+ type: "token_ratio";
7860
+ } | {
7861
+ value: number;
7862
+ type: "remaining_tokens";
7863
+ } | {
7864
+ value: number;
7865
+ type: "messages_to_refine";
7775
7866
  } | undefined;
7776
7867
  updatePrompt?: string | undefined;
7777
7868
  reserveRatio?: number | undefined;
@@ -8412,6 +8503,7 @@ export declare const configSchema: z.ZodObject<{
8412
8503
  verbosity?: import("./schemas").Verbosity | null | undefined;
8413
8504
  useResponsesApi?: boolean | undefined;
8414
8505
  effort?: import("./schemas").AnthropicEffort | null | undefined;
8506
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
8415
8507
  web_search?: boolean | undefined;
8416
8508
  disableStreaming?: boolean | undefined;
8417
8509
  assistant_id?: string | undefined;
@@ -8540,7 +8632,13 @@ export declare const configSchema: z.ZodObject<{
8540
8632
  parameters?: Record<string, string | number | boolean | null> | undefined;
8541
8633
  trigger?: {
8542
8634
  value: number;
8543
- type: "token_count";
8635
+ type: "token_ratio";
8636
+ } | {
8637
+ value: number;
8638
+ type: "remaining_tokens";
8639
+ } | {
8640
+ value: number;
8641
+ type: "messages_to_refine";
8544
8642
  } | undefined;
8545
8643
  updatePrompt?: string | undefined;
8546
8644
  reserveRatio?: number | undefined;
@@ -9248,6 +9346,7 @@ export declare const configSchema: z.ZodObject<{
9248
9346
  verbosity?: import("./schemas").Verbosity | null | undefined;
9249
9347
  useResponsesApi?: boolean | undefined;
9250
9348
  effort?: import("./schemas").AnthropicEffort | null | undefined;
9349
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
9251
9350
  web_search?: boolean | undefined;
9252
9351
  disableStreaming?: boolean | undefined;
9253
9352
  assistant_id?: string | undefined;
@@ -9589,16 +9688,34 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
9589
9688
  provider: z.ZodOptional<z.ZodString>;
9590
9689
  model: z.ZodOptional<z.ZodString>;
9591
9690
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
9592
- trigger: z.ZodOptional<z.ZodObject<{
9593
- type: z.ZodEnum<["token_count"]>;
9691
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
9692
+ type: z.ZodLiteral<"token_ratio">;
9594
9693
  value: z.ZodNumber;
9595
9694
  }, "strip", z.ZodTypeAny, {
9596
9695
  value: number;
9597
- type: "token_count";
9696
+ type: "token_ratio";
9598
9697
  }, {
9599
9698
  value: number;
9600
- type: "token_count";
9601
- }>>;
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
+ }>]>>;
9602
9719
  prompt: z.ZodOptional<z.ZodString>;
9603
9720
  updatePrompt: z.ZodOptional<z.ZodString>;
9604
9721
  reserveRatio: z.ZodOptional<z.ZodNumber>;
@@ -9630,7 +9747,13 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
9630
9747
  parameters?: Record<string, string | number | boolean | null> | undefined;
9631
9748
  trigger?: {
9632
9749
  value: number;
9633
- type: "token_count";
9750
+ type: "token_ratio";
9751
+ } | {
9752
+ value: number;
9753
+ type: "remaining_tokens";
9754
+ } | {
9755
+ value: number;
9756
+ type: "messages_to_refine";
9634
9757
  } | undefined;
9635
9758
  updatePrompt?: string | undefined;
9636
9759
  reserveRatio?: number | undefined;
@@ -9650,7 +9773,13 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
9650
9773
  parameters?: Record<string, string | number | boolean | null> | undefined;
9651
9774
  trigger?: {
9652
9775
  value: number;
9653
- type: "token_count";
9776
+ type: "token_ratio";
9777
+ } | {
9778
+ value: number;
9779
+ type: "remaining_tokens";
9780
+ } | {
9781
+ value: number;
9782
+ type: "messages_to_refine";
9654
9783
  } | undefined;
9655
9784
  updatePrompt?: string | undefined;
9656
9785
  reserveRatio?: number | undefined;
@@ -11541,6 +11670,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11541
11670
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").Verbosity>>>;
11542
11671
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
11543
11672
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").AnthropicEffort>>>;
11673
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").ThinkingDisplay>>>;
11544
11674
  web_search: z.ZodOptional<z.ZodBoolean>;
11545
11675
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
11546
11676
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -11666,6 +11796,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11666
11796
  verbosity?: import("./schemas").Verbosity | null | undefined;
11667
11797
  useResponsesApi?: boolean | undefined;
11668
11798
  effort?: import("./schemas").AnthropicEffort | null | undefined;
11799
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11669
11800
  web_search?: boolean | undefined;
11670
11801
  disableStreaming?: boolean | undefined;
11671
11802
  assistant_id?: string | undefined;
@@ -11757,6 +11888,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11757
11888
  verbosity?: import("./schemas").Verbosity | null | undefined;
11758
11889
  useResponsesApi?: boolean | undefined;
11759
11890
  effort?: import("./schemas").AnthropicEffort | null | undefined;
11891
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11760
11892
  web_search?: boolean | undefined;
11761
11893
  disableStreaming?: boolean | undefined;
11762
11894
  assistant_id?: string | undefined;
@@ -11866,6 +11998,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11866
11998
  verbosity?: import("./schemas").Verbosity | null | undefined;
11867
11999
  useResponsesApi?: boolean | undefined;
11868
12000
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12001
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11869
12002
  web_search?: boolean | undefined;
11870
12003
  disableStreaming?: boolean | undefined;
11871
12004
  assistant_id?: string | undefined;
@@ -11975,6 +12108,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
11975
12108
  verbosity?: import("./schemas").Verbosity | null | undefined;
11976
12109
  useResponsesApi?: boolean | undefined;
11977
12110
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12111
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
11978
12112
  web_search?: boolean | undefined;
11979
12113
  disableStreaming?: boolean | undefined;
11980
12114
  assistant_id?: string | undefined;
@@ -12089,6 +12223,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
12089
12223
  verbosity?: import("./schemas").Verbosity | null | undefined;
12090
12224
  useResponsesApi?: boolean | undefined;
12091
12225
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12226
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
12092
12227
  web_search?: boolean | undefined;
12093
12228
  disableStreaming?: boolean | undefined;
12094
12229
  assistant_id?: string | undefined;
@@ -12201,6 +12336,7 @@ export declare const getConfigDefaults: () => ExtractDefaults<{
12201
12336
  verbosity?: import("./schemas").Verbosity | null | undefined;
12202
12337
  useResponsesApi?: boolean | undefined;
12203
12338
  effort?: import("./schemas").AnthropicEffort | null | undefined;
12339
+ thinkingDisplay?: import("./schemas").ThinkingDisplay | null | undefined;
12204
12340
  web_search?: boolean | undefined;
12205
12341
  disableStreaming?: boolean | undefined;
12206
12342
  assistant_id?: string | undefined;
@@ -14695,9 +14831,9 @@ export declare enum TTSProviders {
14695
14831
  /** Enum for app-wide constants */
14696
14832
  export declare enum Constants {
14697
14833
  /** Key for the app's version. */
14698
- VERSION = "v0.8.5-rc1",
14834
+ VERSION = "v0.8.5",
14699
14835
  /** Key for the Custom Config's version (librechat.yaml). */
14700
- CONFIG_VERSION = "1.3.8",
14836
+ CONFIG_VERSION = "1.3.9",
14701
14837
  /** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
14702
14838
  NO_PARENT = "00000000-0000-0000-0000-000000000000",
14703
14839
  /** Standard value to use whatever the submission prelim. `responseMessageId` is */
@@ -220,6 +220,7 @@ export declare const generateOpenAISchema: (customOpenAI: OpenAISettings) => z.Z
220
220
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").Verbosity>>>;
221
221
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
222
222
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").AnthropicEffort>>>;
223
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").ThinkingDisplay>>>;
223
224
  web_search: z.ZodOptional<z.ZodBoolean>;
224
225
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
225
226
  assistant_id: z.ZodOptional<z.ZodString>;
@@ -459,6 +460,7 @@ export declare const generateGoogleSchema: (customGoogle: GoogleSettings) => z.Z
459
460
  verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").Verbosity>>>;
460
461
  useResponsesApi: z.ZodOptional<z.ZodBoolean>;
461
462
  effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").AnthropicEffort>>>;
463
+ thinkingDisplay: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("./schemas").ThinkingDisplay>>>;
462
464
  web_search: z.ZodOptional<z.ZodBoolean>;
463
465
  disableStreaming: z.ZodOptional<z.ZodBoolean>;
464
466
  assistant_id: z.ZodOptional<z.ZodString>;