librechat-data-provider 0.8.402 → 0.8.403

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.
Files changed (103) hide show
  1. package/dist/types/accessPermissions.d.ts +744 -0
  2. package/dist/types/actions.d.ts +118 -0
  3. package/dist/types/api-endpoints.d.ts +149 -0
  4. package/dist/types/artifacts.d.ts +97 -0
  5. package/dist/types/azure.d.ts +22 -0
  6. package/dist/types/bedrock.d.ts +1220 -0
  7. package/dist/types/config.d.ts +13916 -0
  8. package/dist/types/config.spec.d.ts +1 -0
  9. package/dist/types/createPayload.d.ts +5 -0
  10. package/dist/types/data-service.d.ts +284 -0
  11. package/dist/types/feedback.d.ts +36 -0
  12. package/dist/types/file-config.d.ts +263 -0
  13. package/dist/types/file-config.spec.d.ts +1 -0
  14. package/dist/types/generate.d.ts +597 -0
  15. package/dist/types/headers-helpers.d.ts +2 -0
  16. package/{src/index.ts → dist/types/index.d.ts} +0 -15
  17. package/dist/types/keys.d.ts +92 -0
  18. package/dist/types/mcp.d.ts +2760 -0
  19. package/dist/types/messages.d.ts +10 -0
  20. package/dist/types/models.d.ts +1677 -0
  21. package/dist/types/parameterSettings.d.ts +69 -0
  22. package/dist/types/parsers.d.ts +110 -0
  23. package/dist/types/permissions.d.ts +522 -0
  24. package/dist/types/react-query/react-query-service.d.ts +85 -0
  25. package/dist/types/request.d.ts +25 -0
  26. package/dist/types/roles.d.ts +554 -0
  27. package/dist/types/roles.spec.d.ts +1 -0
  28. package/dist/types/schemas.d.ts +4815 -0
  29. package/dist/types/schemas.spec.d.ts +1 -0
  30. package/dist/types/types/agents.d.ts +433 -0
  31. package/dist/types/types/assistants.d.ts +547 -0
  32. package/dist/types/types/files.d.ts +172 -0
  33. package/dist/types/types/graph.d.ts +135 -0
  34. package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
  35. package/dist/types/types/mutations.d.ts +209 -0
  36. package/dist/types/types/queries.d.ts +169 -0
  37. package/dist/types/types/runs.d.ts +36 -0
  38. package/dist/types/types/web.d.ts +520 -0
  39. package/dist/types/types.d.ts +503 -0
  40. package/dist/types/utils.d.ts +12 -0
  41. package/package.json +4 -1
  42. package/babel.config.js +0 -4
  43. package/check_updates.sh +0 -52
  44. package/jest.config.js +0 -19
  45. package/react-query/package-lock.json +0 -292
  46. package/react-query/package.json +0 -10
  47. package/rollup.config.js +0 -74
  48. package/server-rollup.config.js +0 -40
  49. package/specs/actions.spec.ts +0 -2533
  50. package/specs/api-endpoints-subdir.spec.ts +0 -140
  51. package/specs/api-endpoints.spec.ts +0 -74
  52. package/specs/azure.spec.ts +0 -844
  53. package/specs/bedrock.spec.ts +0 -862
  54. package/specs/filetypes.spec.ts +0 -175
  55. package/specs/generate.spec.ts +0 -770
  56. package/specs/headers-helpers.spec.ts +0 -24
  57. package/specs/mcp.spec.ts +0 -147
  58. package/specs/openapiSpecs.ts +0 -524
  59. package/specs/parsers.spec.ts +0 -601
  60. package/specs/request-interceptor.spec.ts +0 -304
  61. package/specs/utils.spec.ts +0 -196
  62. package/src/accessPermissions.ts +0 -346
  63. package/src/actions.ts +0 -813
  64. package/src/api-endpoints.ts +0 -440
  65. package/src/artifacts.ts +0 -3104
  66. package/src/azure.ts +0 -328
  67. package/src/bedrock.ts +0 -425
  68. package/src/config.spec.ts +0 -315
  69. package/src/config.ts +0 -2006
  70. package/src/createPayload.ts +0 -46
  71. package/src/data-service.ts +0 -1087
  72. package/src/feedback.ts +0 -141
  73. package/src/file-config.spec.ts +0 -1248
  74. package/src/file-config.ts +0 -764
  75. package/src/generate.ts +0 -634
  76. package/src/headers-helpers.ts +0 -13
  77. package/src/keys.ts +0 -99
  78. package/src/mcp.ts +0 -271
  79. package/src/messages.ts +0 -50
  80. package/src/models.ts +0 -69
  81. package/src/parameterSettings.ts +0 -1111
  82. package/src/parsers.ts +0 -563
  83. package/src/permissions.ts +0 -188
  84. package/src/react-query/react-query-service.ts +0 -566
  85. package/src/request.ts +0 -171
  86. package/src/roles.spec.ts +0 -132
  87. package/src/roles.ts +0 -225
  88. package/src/schemas.spec.ts +0 -355
  89. package/src/schemas.ts +0 -1234
  90. package/src/types/agents.ts +0 -470
  91. package/src/types/assistants.ts +0 -654
  92. package/src/types/files.ts +0 -191
  93. package/src/types/graph.ts +0 -145
  94. package/src/types/mutations.ts +0 -422
  95. package/src/types/queries.ts +0 -208
  96. package/src/types/runs.ts +0 -40
  97. package/src/types/web.ts +0 -588
  98. package/src/types.ts +0 -676
  99. package/src/utils.ts +0 -85
  100. package/tsconfig.json +0 -28
  101. package/tsconfig.spec.json +0 -10
  102. /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
  103. /package/{src/types/index.ts → dist/types/types/index.d.ts} +0 -0
@@ -1,1111 +0,0 @@
1
- import {
2
- Verbosity,
3
- ImageDetail,
4
- ThinkingLevel,
5
- EModelEndpoint,
6
- openAISettings,
7
- googleSettings,
8
- ReasoningEffort,
9
- AnthropicEffort,
10
- ReasoningSummary,
11
- BedrockProviders,
12
- anthropicSettings,
13
- } from './types';
14
- import { SettingDefinition, SettingsConfiguration } from './generate';
15
-
16
- // Base definitions
17
- const baseDefinitions: Record<string, SettingDefinition> = {
18
- model: {
19
- key: 'model',
20
- label: 'com_ui_model',
21
- labelCode: true,
22
- type: 'string',
23
- component: 'dropdown',
24
- optionType: 'model',
25
- selectPlaceholder: 'com_ui_select_model',
26
- searchPlaceholder: 'com_ui_select_search_model',
27
- searchPlaceholderCode: true,
28
- selectPlaceholderCode: true,
29
- columnSpan: 4,
30
- },
31
- temperature: {
32
- key: 'temperature',
33
- label: 'com_endpoint_temperature',
34
- labelCode: true,
35
- description: 'com_endpoint_openai_temp',
36
- descriptionCode: true,
37
- type: 'number',
38
- component: 'slider',
39
- optionType: 'model',
40
- columnSpan: 4,
41
- },
42
- topP: {
43
- key: 'topP',
44
- label: 'com_endpoint_top_p',
45
- labelCode: true,
46
- description: 'com_endpoint_anthropic_topp',
47
- descriptionCode: true,
48
- type: 'number',
49
- component: 'slider',
50
- optionType: 'model',
51
- columnSpan: 4,
52
- },
53
- stop: {
54
- key: 'stop',
55
- label: 'com_endpoint_stop',
56
- labelCode: true,
57
- description: 'com_endpoint_openai_stop',
58
- descriptionCode: true,
59
- placeholder: 'com_endpoint_stop_placeholder',
60
- placeholderCode: true,
61
- type: 'array',
62
- default: [],
63
- component: 'tags',
64
- optionType: 'conversation',
65
- minTags: 0,
66
- maxTags: 4,
67
- },
68
- imageDetail: {
69
- key: 'imageDetail',
70
- label: 'com_endpoint_plug_image_detail',
71
- labelCode: true,
72
- description: 'com_endpoint_openai_detail',
73
- descriptionCode: true,
74
- type: 'enum',
75
- default: ImageDetail.auto,
76
- component: 'slider',
77
- options: [ImageDetail.low, ImageDetail.auto, ImageDetail.high],
78
- enumMappings: {
79
- [ImageDetail.low]: 'com_ui_low',
80
- [ImageDetail.auto]: 'com_ui_auto',
81
- [ImageDetail.high]: 'com_ui_high',
82
- },
83
- optionType: 'conversation',
84
- columnSpan: 2,
85
- },
86
- };
87
-
88
- const createDefinition = (
89
- base: Partial<SettingDefinition>,
90
- overrides: Partial<SettingDefinition>,
91
- ): SettingDefinition => {
92
- return { ...base, ...overrides } as SettingDefinition;
93
- };
94
-
95
- export const librechat = {
96
- modelLabel: {
97
- key: 'modelLabel',
98
- label: 'com_endpoint_custom_name',
99
- labelCode: true,
100
- type: 'string',
101
- default: '',
102
- component: 'input',
103
- placeholder: 'com_endpoint_openai_custom_name_placeholder',
104
- placeholderCode: true,
105
- optionType: 'conversation',
106
- } as const,
107
- maxContextTokens: {
108
- key: 'maxContextTokens',
109
- label: 'com_endpoint_context_tokens',
110
- labelCode: true,
111
- type: 'number',
112
- component: 'input',
113
- placeholder: 'com_nav_theme_system',
114
- placeholderCode: true,
115
- description: 'com_endpoint_context_info',
116
- descriptionCode: true,
117
- optionType: 'model',
118
- columnSpan: 2,
119
- } as const,
120
- resendFiles: {
121
- key: 'resendFiles',
122
- label: 'com_endpoint_plug_resend_files',
123
- labelCode: true,
124
- description: 'com_endpoint_openai_resend_files',
125
- descriptionCode: true,
126
- type: 'boolean',
127
- default: true,
128
- component: 'switch',
129
- optionType: 'conversation',
130
- showDefault: false,
131
- columnSpan: 2,
132
- } as const,
133
- promptPrefix: {
134
- key: 'promptPrefix',
135
- label: 'com_endpoint_prompt_prefix',
136
- labelCode: true,
137
- type: 'string',
138
- default: '',
139
- component: 'textarea',
140
- placeholder: 'com_endpoint_openai_prompt_prefix_placeholder',
141
- placeholderCode: true,
142
- optionType: 'model',
143
- } as const,
144
- fileTokenLimit: {
145
- key: 'fileTokenLimit',
146
- label: 'com_ui_file_token_limit',
147
- labelCode: true,
148
- description: 'com_ui_file_token_limit_desc',
149
- descriptionCode: true,
150
- placeholder: 'com_nav_theme_system',
151
- placeholderCode: true,
152
- type: 'number',
153
- component: 'input',
154
- columnSpan: 2,
155
- } as const,
156
- };
157
-
158
- const openAIParams: Record<string, SettingDefinition> = {
159
- chatGptLabel: {
160
- ...librechat.modelLabel,
161
- key: 'chatGptLabel',
162
- },
163
- promptPrefix: librechat.promptPrefix,
164
- temperature: createDefinition(baseDefinitions.temperature, {
165
- default: openAISettings.temperature.default,
166
- range: {
167
- min: openAISettings.temperature.min,
168
- max: openAISettings.temperature.max,
169
- step: openAISettings.temperature.step,
170
- },
171
- }),
172
- top_p: createDefinition(baseDefinitions.topP, {
173
- key: 'top_p',
174
- default: openAISettings.top_p.default,
175
- range: {
176
- min: openAISettings.top_p.min,
177
- max: openAISettings.top_p.max,
178
- step: openAISettings.top_p.step,
179
- },
180
- }),
181
- frequency_penalty: {
182
- key: 'frequency_penalty',
183
- label: 'com_endpoint_frequency_penalty',
184
- labelCode: true,
185
- description: 'com_endpoint_openai_freq',
186
- descriptionCode: true,
187
- type: 'number',
188
- default: openAISettings.frequency_penalty.default,
189
- range: {
190
- min: openAISettings.frequency_penalty.min,
191
- max: openAISettings.frequency_penalty.max,
192
- step: openAISettings.frequency_penalty.step,
193
- },
194
- component: 'slider',
195
- optionType: 'model',
196
- columnSpan: 4,
197
- },
198
- presence_penalty: {
199
- key: 'presence_penalty',
200
- label: 'com_endpoint_presence_penalty',
201
- labelCode: true,
202
- description: 'com_endpoint_openai_pres',
203
- descriptionCode: true,
204
- type: 'number',
205
- default: openAISettings.presence_penalty.default,
206
- range: {
207
- min: openAISettings.presence_penalty.min,
208
- max: openAISettings.presence_penalty.max,
209
- step: openAISettings.presence_penalty.step,
210
- },
211
- component: 'slider',
212
- optionType: 'model',
213
- columnSpan: 4,
214
- },
215
- max_tokens: {
216
- key: 'max_tokens',
217
- label: 'com_endpoint_max_output_tokens',
218
- labelCode: true,
219
- type: 'number',
220
- component: 'input',
221
- description: 'com_endpoint_openai_max_tokens',
222
- descriptionCode: true,
223
- placeholder: 'com_nav_theme_system',
224
- placeholderCode: true,
225
- optionType: 'model',
226
- columnSpan: 2,
227
- },
228
- reasoning_effort: {
229
- key: 'reasoning_effort',
230
- label: 'com_endpoint_reasoning_effort',
231
- labelCode: true,
232
- description: 'com_endpoint_openai_reasoning_effort',
233
- descriptionCode: true,
234
- type: 'enum',
235
- default: ReasoningEffort.unset,
236
- component: 'slider',
237
- options: [
238
- ReasoningEffort.unset,
239
- ReasoningEffort.none,
240
- ReasoningEffort.minimal,
241
- ReasoningEffort.low,
242
- ReasoningEffort.medium,
243
- ReasoningEffort.high,
244
- ReasoningEffort.xhigh,
245
- ],
246
- enumMappings: {
247
- [ReasoningEffort.unset]: 'com_ui_auto',
248
- [ReasoningEffort.none]: 'com_ui_none',
249
- [ReasoningEffort.minimal]: 'com_ui_minimal',
250
- [ReasoningEffort.low]: 'com_ui_low',
251
- [ReasoningEffort.medium]: 'com_ui_medium',
252
- [ReasoningEffort.high]: 'com_ui_high',
253
- [ReasoningEffort.xhigh]: 'com_ui_xhigh',
254
- },
255
- optionType: 'model',
256
- columnSpan: 4,
257
- },
258
- useResponsesApi: {
259
- key: 'useResponsesApi',
260
- label: 'com_endpoint_use_responses_api',
261
- labelCode: true,
262
- description: 'com_endpoint_openai_use_responses_api',
263
- descriptionCode: true,
264
- type: 'boolean',
265
- default: false,
266
- component: 'switch',
267
- optionType: 'model',
268
- showDefault: false,
269
- columnSpan: 2,
270
- },
271
- web_search: {
272
- key: 'web_search',
273
- label: 'com_ui_web_search',
274
- labelCode: true,
275
- description: 'com_endpoint_openai_use_web_search',
276
- descriptionCode: true,
277
- type: 'boolean',
278
- default: false,
279
- component: 'switch',
280
- optionType: 'model',
281
- showDefault: false,
282
- columnSpan: 2,
283
- },
284
- reasoning_summary: {
285
- key: 'reasoning_summary',
286
- label: 'com_endpoint_reasoning_summary',
287
- labelCode: true,
288
- description: 'com_endpoint_openai_reasoning_summary',
289
- descriptionCode: true,
290
- type: 'enum',
291
- default: ReasoningSummary.none,
292
- component: 'slider',
293
- options: [
294
- ReasoningSummary.none,
295
- ReasoningSummary.auto,
296
- ReasoningSummary.concise,
297
- ReasoningSummary.detailed,
298
- ],
299
- enumMappings: {
300
- [ReasoningSummary.none]: 'com_ui_unset',
301
- [ReasoningSummary.auto]: 'com_ui_auto',
302
- [ReasoningSummary.concise]: 'com_ui_concise',
303
- [ReasoningSummary.detailed]: 'com_ui_detailed',
304
- },
305
- optionType: 'model',
306
- columnSpan: 4,
307
- },
308
- verbosity: {
309
- key: 'verbosity',
310
- label: 'com_endpoint_verbosity',
311
- labelCode: true,
312
- description: 'com_endpoint_openai_verbosity',
313
- descriptionCode: true,
314
- type: 'enum',
315
- default: Verbosity.none,
316
- component: 'slider',
317
- options: [Verbosity.none, Verbosity.low, Verbosity.medium, Verbosity.high],
318
- enumMappings: {
319
- [Verbosity.none]: 'com_ui_none',
320
- [Verbosity.low]: 'com_ui_low',
321
- [Verbosity.medium]: 'com_ui_medium',
322
- [Verbosity.high]: 'com_ui_high',
323
- },
324
- optionType: 'model',
325
- columnSpan: 4,
326
- },
327
- disableStreaming: {
328
- key: 'disableStreaming',
329
- label: 'com_endpoint_disable_streaming_label',
330
- labelCode: true,
331
- description: 'com_endpoint_disable_streaming',
332
- descriptionCode: true,
333
- type: 'boolean',
334
- default: false,
335
- component: 'switch',
336
- optionType: 'model',
337
- showDefault: false,
338
- columnSpan: 2,
339
- } as const,
340
- };
341
-
342
- const anthropic: Record<string, SettingDefinition> = {
343
- maxOutputTokens: {
344
- key: 'maxOutputTokens',
345
- label: 'com_endpoint_max_output_tokens',
346
- labelCode: true,
347
- type: 'number',
348
- component: 'input',
349
- description: 'com_endpoint_anthropic_maxoutputtokens',
350
- descriptionCode: true,
351
- placeholder: 'com_nav_theme_system',
352
- placeholderCode: true,
353
- range: {
354
- min: anthropicSettings.maxOutputTokens.min,
355
- max: anthropicSettings.maxOutputTokens.max,
356
- step: anthropicSettings.maxOutputTokens.step,
357
- },
358
- optionType: 'model',
359
- columnSpan: 2,
360
- },
361
- temperature: createDefinition(baseDefinitions.temperature, {
362
- default: anthropicSettings.temperature.default,
363
- range: {
364
- min: anthropicSettings.temperature.min,
365
- max: anthropicSettings.temperature.max,
366
- step: anthropicSettings.temperature.step,
367
- },
368
- }),
369
- topP: createDefinition(baseDefinitions.topP, {
370
- default: anthropicSettings.topP.default,
371
- range: {
372
- min: anthropicSettings.topP.min,
373
- max: anthropicSettings.topP.max,
374
- step: anthropicSettings.topP.step,
375
- },
376
- }),
377
- topK: {
378
- key: 'topK',
379
- label: 'com_endpoint_top_k',
380
- labelCode: true,
381
- description: 'com_endpoint_anthropic_topk',
382
- descriptionCode: true,
383
- type: 'number',
384
- default: anthropicSettings.topK.default,
385
- range: {
386
- min: anthropicSettings.topK.min,
387
- max: anthropicSettings.topK.max,
388
- step: anthropicSettings.topK.step,
389
- },
390
- component: 'slider',
391
- optionType: 'model',
392
- columnSpan: 4,
393
- },
394
- promptCache: {
395
- key: 'promptCache',
396
- label: 'com_endpoint_prompt_cache',
397
- labelCode: true,
398
- description: 'com_endpoint_anthropic_prompt_cache',
399
- descriptionCode: true,
400
- type: 'boolean',
401
- default: anthropicSettings.promptCache.default,
402
- component: 'switch',
403
- optionType: 'conversation',
404
- showDefault: false,
405
- columnSpan: 2,
406
- },
407
- thinking: {
408
- key: 'thinking',
409
- label: 'com_endpoint_thinking',
410
- labelCode: true,
411
- description: 'com_endpoint_anthropic_thinking',
412
- descriptionCode: true,
413
- type: 'boolean',
414
- default: anthropicSettings.thinking.default,
415
- component: 'switch',
416
- optionType: 'conversation',
417
- showDefault: false,
418
- columnSpan: 2,
419
- },
420
- thinkingBudget: {
421
- key: 'thinkingBudget',
422
- label: 'com_endpoint_thinking_budget',
423
- labelCode: true,
424
- description: 'com_endpoint_anthropic_thinking_budget',
425
- descriptionCode: true,
426
- type: 'number',
427
- component: 'input',
428
- default: anthropicSettings.thinkingBudget.default,
429
- range: {
430
- min: anthropicSettings.thinkingBudget.min,
431
- max: anthropicSettings.thinkingBudget.max,
432
- step: anthropicSettings.thinkingBudget.step,
433
- },
434
- optionType: 'conversation',
435
- columnSpan: 2,
436
- },
437
- web_search: {
438
- key: 'web_search',
439
- label: 'com_ui_web_search',
440
- labelCode: true,
441
- description: 'com_endpoint_anthropic_use_web_search',
442
- descriptionCode: true,
443
- type: 'boolean',
444
- default: anthropicSettings.web_search.default,
445
- component: 'switch',
446
- optionType: 'conversation',
447
- showDefault: false,
448
- columnSpan: 2,
449
- },
450
- effort: {
451
- key: 'effort',
452
- label: 'com_endpoint_effort',
453
- labelCode: true,
454
- description: 'com_endpoint_anthropic_effort',
455
- descriptionCode: true,
456
- type: 'enum',
457
- default: anthropicSettings.effort.default,
458
- component: 'slider',
459
- options: anthropicSettings.effort.options,
460
- enumMappings: {
461
- [AnthropicEffort.unset]: 'com_ui_auto',
462
- [AnthropicEffort.low]: 'com_ui_low',
463
- [AnthropicEffort.medium]: 'com_ui_medium',
464
- [AnthropicEffort.high]: 'com_ui_high',
465
- [AnthropicEffort.max]: 'com_ui_max',
466
- },
467
- optionType: 'model',
468
- columnSpan: 4,
469
- },
470
- };
471
-
472
- const bedrock: Record<string, SettingDefinition> = {
473
- system: {
474
- key: 'system',
475
- label: 'com_endpoint_prompt_prefix',
476
- labelCode: true,
477
- type: 'string',
478
- default: '',
479
- component: 'textarea',
480
- placeholder: 'com_endpoint_openai_prompt_prefix_placeholder',
481
- placeholderCode: true,
482
- optionType: 'model',
483
- },
484
- region: {
485
- key: 'region',
486
- type: 'string',
487
- label: 'com_ui_region',
488
- labelCode: true,
489
- component: 'combobox',
490
- optionType: 'conversation',
491
- selectPlaceholder: 'com_ui_select_region',
492
- searchPlaceholder: 'com_ui_select_search_region',
493
- searchPlaceholderCode: true,
494
- selectPlaceholderCode: true,
495
- columnSpan: 2,
496
- },
497
- maxTokens: {
498
- key: 'maxTokens',
499
- label: 'com_endpoint_max_output_tokens',
500
- labelCode: true,
501
- type: 'number',
502
- component: 'input',
503
- description: 'com_endpoint_anthropic_maxoutputtokens',
504
- descriptionCode: true,
505
- placeholder: 'com_nav_theme_system',
506
- placeholderCode: true,
507
- optionType: 'model',
508
- columnSpan: 2,
509
- },
510
- temperature: createDefinition(baseDefinitions.temperature, {
511
- default: 1,
512
- range: { min: 0, max: 1, step: 0.01 },
513
- }),
514
- topK: createDefinition(anthropic.topK, {
515
- range: { min: 0, max: 500, step: 1 },
516
- }),
517
- topP: createDefinition(baseDefinitions.topP, {
518
- default: 0.999,
519
- range: { min: 0, max: 1, step: 0.01 },
520
- }),
521
- promptCache: {
522
- key: 'promptCache',
523
- label: 'com_endpoint_prompt_cache',
524
- labelCode: true,
525
- type: 'boolean',
526
- description: 'com_endpoint_anthropic_prompt_cache',
527
- descriptionCode: true,
528
- default: true,
529
- component: 'switch',
530
- optionType: 'conversation',
531
- showDefault: false,
532
- columnSpan: 2,
533
- },
534
- reasoning_effort: {
535
- key: 'reasoning_effort',
536
- label: 'com_endpoint_reasoning_effort',
537
- labelCode: true,
538
- description: 'com_endpoint_bedrock_reasoning_effort',
539
- descriptionCode: true,
540
- type: 'enum',
541
- default: ReasoningEffort.unset,
542
- component: 'slider',
543
- options: [
544
- ReasoningEffort.unset,
545
- ReasoningEffort.low,
546
- ReasoningEffort.medium,
547
- ReasoningEffort.high,
548
- ],
549
- enumMappings: {
550
- [ReasoningEffort.unset]: 'com_ui_off',
551
- [ReasoningEffort.low]: 'com_ui_low',
552
- [ReasoningEffort.medium]: 'com_ui_medium',
553
- [ReasoningEffort.high]: 'com_ui_high',
554
- },
555
- optionType: 'model',
556
- columnSpan: 4,
557
- },
558
- };
559
-
560
- const mistral: Record<string, SettingDefinition> = {
561
- temperature: createDefinition(baseDefinitions.temperature, {
562
- default: 0.7,
563
- range: { min: 0, max: 1, step: 0.01 },
564
- }),
565
- topP: createDefinition(baseDefinitions.topP, {
566
- range: { min: 0, max: 1, step: 0.01 },
567
- }),
568
- };
569
-
570
- const cohere: Record<string, SettingDefinition> = {
571
- temperature: createDefinition(baseDefinitions.temperature, {
572
- default: 0.3,
573
- range: { min: 0, max: 1, step: 0.01 },
574
- }),
575
- topP: createDefinition(baseDefinitions.topP, {
576
- default: 0.75,
577
- range: { min: 0.01, max: 0.99, step: 0.01 },
578
- }),
579
- };
580
-
581
- const meta: Record<string, SettingDefinition> = {
582
- temperature: createDefinition(baseDefinitions.temperature, {
583
- default: 0.5,
584
- range: { min: 0, max: 1, step: 0.01 },
585
- }),
586
- topP: createDefinition(baseDefinitions.topP, {
587
- default: 0.9,
588
- range: { min: 0, max: 1, step: 0.01 },
589
- }),
590
- };
591
-
592
- const google: Record<string, SettingDefinition> = {
593
- temperature: createDefinition(baseDefinitions.temperature, {
594
- default: googleSettings.temperature.default,
595
- range: {
596
- min: googleSettings.temperature.min,
597
- max: googleSettings.temperature.max,
598
- step: googleSettings.temperature.step,
599
- },
600
- }),
601
- topP: createDefinition(baseDefinitions.topP, {
602
- default: googleSettings.topP.default,
603
- range: {
604
- min: googleSettings.topP.min,
605
- max: googleSettings.topP.max,
606
- step: googleSettings.topP.step,
607
- },
608
- }),
609
- topK: {
610
- key: 'topK',
611
- label: 'com_endpoint_top_k',
612
- labelCode: true,
613
- description: 'com_endpoint_google_topk',
614
- descriptionCode: true,
615
- type: 'number',
616
- default: googleSettings.topK.default,
617
- range: {
618
- min: googleSettings.topK.min,
619
- max: googleSettings.topK.max,
620
- step: googleSettings.topK.step,
621
- },
622
- component: 'slider',
623
- optionType: 'model',
624
- columnSpan: 4,
625
- },
626
- maxOutputTokens: {
627
- key: 'maxOutputTokens',
628
- label: 'com_endpoint_max_output_tokens',
629
- labelCode: true,
630
- type: 'number',
631
- component: 'input',
632
- description: 'com_endpoint_google_maxoutputtokens',
633
- descriptionCode: true,
634
- placeholder: 'com_nav_theme_system',
635
- placeholderCode: true,
636
- default: googleSettings.maxOutputTokens.default,
637
- range: {
638
- min: googleSettings.maxOutputTokens.min,
639
- max: googleSettings.maxOutputTokens.max,
640
- step: googleSettings.maxOutputTokens.step,
641
- },
642
- optionType: 'model',
643
- columnSpan: 2,
644
- },
645
- thinking: {
646
- key: 'thinking',
647
- label: 'com_endpoint_thinking',
648
- labelCode: true,
649
- description: 'com_endpoint_google_thinking',
650
- descriptionCode: true,
651
- type: 'boolean',
652
- default: googleSettings.thinking.default,
653
- component: 'switch',
654
- optionType: 'conversation',
655
- showDefault: false,
656
- columnSpan: 2,
657
- },
658
- thinkingBudget: {
659
- key: 'thinkingBudget',
660
- label: 'com_endpoint_thinking_budget',
661
- labelCode: true,
662
- description: 'com_endpoint_google_thinking_budget',
663
- descriptionCode: true,
664
- placeholder: 'com_ui_auto',
665
- placeholderCode: true,
666
- type: 'number',
667
- component: 'input',
668
- range: {
669
- min: googleSettings.thinkingBudget.min,
670
- max: googleSettings.thinkingBudget.max,
671
- step: googleSettings.thinkingBudget.step,
672
- },
673
- optionType: 'conversation',
674
- columnSpan: 2,
675
- },
676
- thinkingLevel: {
677
- key: 'thinkingLevel',
678
- label: 'com_endpoint_thinking_level',
679
- labelCode: true,
680
- description: 'com_endpoint_google_thinking_level',
681
- descriptionCode: true,
682
- type: 'enum',
683
- default: ThinkingLevel.unset,
684
- component: 'slider',
685
- options: [
686
- ThinkingLevel.unset,
687
- ThinkingLevel.minimal,
688
- ThinkingLevel.low,
689
- ThinkingLevel.medium,
690
- ThinkingLevel.high,
691
- ],
692
- enumMappings: {
693
- [ThinkingLevel.unset]: 'com_ui_auto',
694
- [ThinkingLevel.minimal]: 'com_ui_minimal',
695
- [ThinkingLevel.low]: 'com_ui_low',
696
- [ThinkingLevel.medium]: 'com_ui_medium',
697
- [ThinkingLevel.high]: 'com_ui_high',
698
- },
699
- optionType: 'conversation',
700
- columnSpan: 4,
701
- },
702
- web_search: {
703
- key: 'web_search',
704
- label: 'com_endpoint_use_search_grounding',
705
- labelCode: true,
706
- description: 'com_endpoint_google_use_search_grounding',
707
- descriptionCode: true,
708
- type: 'boolean',
709
- default: false,
710
- component: 'switch',
711
- optionType: 'model',
712
- showDefault: false,
713
- columnSpan: 2,
714
- },
715
- };
716
-
717
- const googleConfig: SettingsConfiguration = [
718
- librechat.modelLabel,
719
- librechat.promptPrefix,
720
- librechat.maxContextTokens,
721
- google.maxOutputTokens,
722
- google.temperature,
723
- google.topP,
724
- google.topK,
725
- librechat.resendFiles,
726
- google.thinking,
727
- google.thinkingBudget,
728
- google.thinkingLevel,
729
- google.web_search,
730
- librechat.fileTokenLimit,
731
- ];
732
-
733
- const googleCol1: SettingsConfiguration = [
734
- baseDefinitions.model as SettingDefinition,
735
- librechat.modelLabel,
736
- librechat.promptPrefix,
737
- ];
738
-
739
- const googleCol2: SettingsConfiguration = [
740
- librechat.maxContextTokens,
741
- google.maxOutputTokens,
742
- google.temperature,
743
- google.topP,
744
- google.topK,
745
- librechat.resendFiles,
746
- google.thinking,
747
- google.thinkingBudget,
748
- google.thinkingLevel,
749
- google.web_search,
750
- librechat.fileTokenLimit,
751
- ];
752
-
753
- const openAI: SettingsConfiguration = [
754
- librechat.modelLabel,
755
- librechat.promptPrefix,
756
- librechat.maxContextTokens,
757
- openAIParams.max_tokens,
758
- openAIParams.temperature,
759
- openAIParams.top_p,
760
- openAIParams.frequency_penalty,
761
- openAIParams.presence_penalty,
762
- baseDefinitions.stop,
763
- librechat.resendFiles,
764
- baseDefinitions.imageDetail,
765
- openAIParams.web_search,
766
- openAIParams.reasoning_effort,
767
- openAIParams.useResponsesApi,
768
- openAIParams.reasoning_summary,
769
- openAIParams.verbosity,
770
- openAIParams.disableStreaming,
771
- librechat.fileTokenLimit,
772
- ];
773
-
774
- const openAICol1: SettingsConfiguration = [
775
- baseDefinitions.model as SettingDefinition,
776
- librechat.modelLabel,
777
- librechat.promptPrefix,
778
- ];
779
-
780
- const openAICol2: SettingsConfiguration = [
781
- librechat.maxContextTokens,
782
- openAIParams.max_tokens,
783
- openAIParams.temperature,
784
- openAIParams.top_p,
785
- openAIParams.frequency_penalty,
786
- openAIParams.presence_penalty,
787
- baseDefinitions.stop,
788
- librechat.resendFiles,
789
- baseDefinitions.imageDetail,
790
- openAIParams.reasoning_effort,
791
- openAIParams.reasoning_summary,
792
- openAIParams.verbosity,
793
- openAIParams.useResponsesApi,
794
- openAIParams.web_search,
795
- openAIParams.disableStreaming,
796
- librechat.fileTokenLimit,
797
- ];
798
-
799
- const anthropicConfig: SettingsConfiguration = [
800
- librechat.modelLabel,
801
- librechat.promptPrefix,
802
- librechat.maxContextTokens,
803
- anthropic.maxOutputTokens,
804
- anthropic.temperature,
805
- anthropic.topP,
806
- anthropic.topK,
807
- librechat.resendFiles,
808
- anthropic.promptCache,
809
- anthropic.thinking,
810
- anthropic.thinkingBudget,
811
- anthropic.effort,
812
- anthropic.web_search,
813
- librechat.fileTokenLimit,
814
- ];
815
-
816
- const anthropicCol1: SettingsConfiguration = [
817
- baseDefinitions.model as SettingDefinition,
818
- librechat.modelLabel,
819
- librechat.promptPrefix,
820
- ];
821
-
822
- const anthropicCol2: SettingsConfiguration = [
823
- librechat.maxContextTokens,
824
- anthropic.maxOutputTokens,
825
- anthropic.temperature,
826
- anthropic.topP,
827
- anthropic.topK,
828
- librechat.resendFiles,
829
- anthropic.promptCache,
830
- anthropic.thinking,
831
- anthropic.thinkingBudget,
832
- anthropic.effort,
833
- anthropic.web_search,
834
- librechat.fileTokenLimit,
835
- ];
836
-
837
- const bedrockAnthropic: SettingsConfiguration = [
838
- librechat.modelLabel,
839
- bedrock.system,
840
- librechat.maxContextTokens,
841
- bedrock.maxTokens,
842
- bedrock.temperature,
843
- bedrock.topP,
844
- bedrock.topK,
845
- baseDefinitions.stop,
846
- librechat.resendFiles,
847
- bedrock.region,
848
- bedrock.promptCache,
849
- anthropic.thinking,
850
- anthropic.thinkingBudget,
851
- anthropic.effort,
852
- librechat.fileTokenLimit,
853
- ];
854
-
855
- const bedrockMistral: SettingsConfiguration = [
856
- librechat.modelLabel,
857
- librechat.promptPrefix,
858
- librechat.maxContextTokens,
859
- bedrock.maxTokens,
860
- mistral.temperature,
861
- mistral.topP,
862
- librechat.resendFiles,
863
- bedrock.region,
864
- librechat.fileTokenLimit,
865
- ];
866
-
867
- const bedrockCohere: SettingsConfiguration = [
868
- librechat.modelLabel,
869
- librechat.promptPrefix,
870
- librechat.maxContextTokens,
871
- bedrock.maxTokens,
872
- cohere.temperature,
873
- cohere.topP,
874
- librechat.resendFiles,
875
- bedrock.region,
876
- librechat.fileTokenLimit,
877
- ];
878
-
879
- const bedrockGeneral: SettingsConfiguration = [
880
- librechat.modelLabel,
881
- librechat.promptPrefix,
882
- librechat.maxContextTokens,
883
- meta.temperature,
884
- meta.topP,
885
- librechat.resendFiles,
886
- bedrock.region,
887
- bedrock.promptCache,
888
- librechat.fileTokenLimit,
889
- ];
890
-
891
- const bedrockAnthropicCol1: SettingsConfiguration = [
892
- baseDefinitions.model as SettingDefinition,
893
- librechat.modelLabel,
894
- bedrock.system,
895
- baseDefinitions.stop,
896
- ];
897
-
898
- const bedrockAnthropicCol2: SettingsConfiguration = [
899
- librechat.maxContextTokens,
900
- bedrock.maxTokens,
901
- bedrock.temperature,
902
- bedrock.topP,
903
- bedrock.topK,
904
- librechat.resendFiles,
905
- bedrock.region,
906
- bedrock.promptCache,
907
- anthropic.thinking,
908
- anthropic.thinkingBudget,
909
- anthropic.effort,
910
- librechat.fileTokenLimit,
911
- ];
912
-
913
- const bedrockMistralCol1: SettingsConfiguration = [
914
- baseDefinitions.model as SettingDefinition,
915
- librechat.modelLabel,
916
- librechat.promptPrefix,
917
- ];
918
-
919
- const bedrockMistralCol2: SettingsConfiguration = [
920
- librechat.maxContextTokens,
921
- bedrock.maxTokens,
922
- mistral.temperature,
923
- mistral.topP,
924
- librechat.resendFiles,
925
- bedrock.region,
926
- librechat.fileTokenLimit,
927
- ];
928
-
929
- const bedrockCohereCol1: SettingsConfiguration = [
930
- baseDefinitions.model as SettingDefinition,
931
- librechat.modelLabel,
932
- librechat.promptPrefix,
933
- ];
934
-
935
- const bedrockCohereCol2: SettingsConfiguration = [
936
- librechat.maxContextTokens,
937
- bedrock.maxTokens,
938
- cohere.temperature,
939
- cohere.topP,
940
- librechat.resendFiles,
941
- bedrock.region,
942
- librechat.fileTokenLimit,
943
- ];
944
-
945
- const bedrockGeneralCol1: SettingsConfiguration = [
946
- baseDefinitions.model as SettingDefinition,
947
- librechat.modelLabel,
948
- librechat.promptPrefix,
949
- ];
950
-
951
- const bedrockGeneralCol2: SettingsConfiguration = [
952
- librechat.maxContextTokens,
953
- meta.temperature,
954
- meta.topP,
955
- librechat.resendFiles,
956
- bedrock.region,
957
- bedrock.promptCache,
958
- librechat.fileTokenLimit,
959
- ];
960
-
961
- const bedrockZAI: SettingsConfiguration = [
962
- librechat.modelLabel,
963
- librechat.promptPrefix,
964
- librechat.maxContextTokens,
965
- meta.temperature,
966
- meta.topP,
967
- librechat.resendFiles,
968
- bedrock.region,
969
- bedrock.reasoning_effort,
970
- librechat.fileTokenLimit,
971
- ];
972
-
973
- const bedrockZAICol1: SettingsConfiguration = [
974
- baseDefinitions.model as SettingDefinition,
975
- librechat.modelLabel,
976
- librechat.promptPrefix,
977
- ];
978
-
979
- const bedrockZAICol2: SettingsConfiguration = [
980
- librechat.maxContextTokens,
981
- meta.temperature,
982
- meta.topP,
983
- librechat.resendFiles,
984
- bedrock.region,
985
- bedrock.reasoning_effort,
986
- librechat.fileTokenLimit,
987
- ];
988
-
989
- const bedrockMoonshot: SettingsConfiguration = [
990
- librechat.modelLabel,
991
- bedrock.system,
992
- librechat.maxContextTokens,
993
- createDefinition(bedrock.maxTokens, {
994
- default: 16384,
995
- }),
996
- bedrock.temperature,
997
- bedrock.topP,
998
- baseDefinitions.stop,
999
- librechat.resendFiles,
1000
- bedrock.region,
1001
- bedrock.reasoning_effort,
1002
- librechat.fileTokenLimit,
1003
- ];
1004
-
1005
- const bedrockMoonshotCol1: SettingsConfiguration = [
1006
- baseDefinitions.model as SettingDefinition,
1007
- librechat.modelLabel,
1008
- bedrock.system,
1009
- baseDefinitions.stop,
1010
- ];
1011
-
1012
- const bedrockMoonshotCol2: SettingsConfiguration = [
1013
- librechat.maxContextTokens,
1014
- createDefinition(bedrock.maxTokens, {
1015
- default: 16384,
1016
- }),
1017
- bedrock.temperature,
1018
- bedrock.topP,
1019
- librechat.resendFiles,
1020
- bedrock.region,
1021
- bedrock.reasoning_effort,
1022
- librechat.fileTokenLimit,
1023
- ];
1024
-
1025
- export const paramSettings: Record<string, SettingsConfiguration | undefined> = {
1026
- [EModelEndpoint.openAI]: openAI,
1027
- [EModelEndpoint.azureOpenAI]: openAI,
1028
- [EModelEndpoint.custom]: openAI,
1029
- [EModelEndpoint.anthropic]: anthropicConfig,
1030
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Anthropic}`]: bedrockAnthropic,
1031
- [`${EModelEndpoint.bedrock}-${BedrockProviders.MistralAI}`]: bedrockMistral,
1032
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Cohere}`]: bedrockCohere,
1033
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Meta}`]: bedrockGeneral,
1034
- [`${EModelEndpoint.bedrock}-${BedrockProviders.AI21}`]: bedrockGeneral,
1035
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Amazon}`]: bedrockGeneral,
1036
- [`${EModelEndpoint.bedrock}-${BedrockProviders.DeepSeek}`]: bedrockGeneral,
1037
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Moonshot}`]: bedrockMoonshot,
1038
- [`${EModelEndpoint.bedrock}-${BedrockProviders.MoonshotAI}`]: bedrockMoonshot,
1039
- [`${EModelEndpoint.bedrock}-${BedrockProviders.OpenAI}`]: bedrockGeneral,
1040
- [`${EModelEndpoint.bedrock}-${BedrockProviders.ZAI}`]: bedrockZAI,
1041
- [EModelEndpoint.google]: googleConfig,
1042
- };
1043
-
1044
- const openAIColumns = {
1045
- col1: openAICol1,
1046
- col2: openAICol2,
1047
- };
1048
-
1049
- const bedrockGeneralColumns = {
1050
- col1: bedrockGeneralCol1,
1051
- col2: bedrockGeneralCol2,
1052
- };
1053
-
1054
- export const presetSettings: Record<
1055
- string,
1056
- | {
1057
- col1: SettingsConfiguration;
1058
- col2: SettingsConfiguration;
1059
- }
1060
- | undefined
1061
- > = {
1062
- [EModelEndpoint.openAI]: openAIColumns,
1063
- [EModelEndpoint.azureOpenAI]: openAIColumns,
1064
- [EModelEndpoint.custom]: openAIColumns,
1065
- [EModelEndpoint.anthropic]: {
1066
- col1: anthropicCol1,
1067
- col2: anthropicCol2,
1068
- },
1069
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Anthropic}`]: {
1070
- col1: bedrockAnthropicCol1,
1071
- col2: bedrockAnthropicCol2,
1072
- },
1073
- [`${EModelEndpoint.bedrock}-${BedrockProviders.MistralAI}`]: {
1074
- col1: bedrockMistralCol1,
1075
- col2: bedrockMistralCol2,
1076
- },
1077
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Cohere}`]: {
1078
- col1: bedrockCohereCol1,
1079
- col2: bedrockCohereCol2,
1080
- },
1081
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Meta}`]: bedrockGeneralColumns,
1082
- [`${EModelEndpoint.bedrock}-${BedrockProviders.AI21}`]: bedrockGeneralColumns,
1083
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Amazon}`]: bedrockGeneralColumns,
1084
- [`${EModelEndpoint.bedrock}-${BedrockProviders.DeepSeek}`]: bedrockGeneralColumns,
1085
- [`${EModelEndpoint.bedrock}-${BedrockProviders.Moonshot}`]: {
1086
- col1: bedrockMoonshotCol1,
1087
- col2: bedrockMoonshotCol2,
1088
- },
1089
- [`${EModelEndpoint.bedrock}-${BedrockProviders.MoonshotAI}`]: {
1090
- col1: bedrockMoonshotCol1,
1091
- col2: bedrockMoonshotCol2,
1092
- },
1093
- [`${EModelEndpoint.bedrock}-${BedrockProviders.OpenAI}`]: bedrockGeneralColumns,
1094
- [`${EModelEndpoint.bedrock}-${BedrockProviders.ZAI}`]: {
1095
- col1: bedrockZAICol1,
1096
- col2: bedrockZAICol2,
1097
- },
1098
- [EModelEndpoint.google]: {
1099
- col1: googleCol1,
1100
- col2: googleCol2,
1101
- },
1102
- };
1103
-
1104
- export const agentParamSettings: Record<string, SettingsConfiguration | undefined> = Object.entries(
1105
- presetSettings,
1106
- ).reduce<Record<string, SettingsConfiguration | undefined>>((acc, [key, value]) => {
1107
- if (value) {
1108
- acc[key] = value.col2;
1109
- }
1110
- return acc;
1111
- }, {});