librechat-data-provider 0.7.82 → 0.7.85

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.
@@ -0,0 +1,726 @@
1
+ import {
2
+ ImageDetail,
3
+ EModelEndpoint,
4
+ openAISettings,
5
+ googleSettings,
6
+ ReasoningEffort,
7
+ BedrockProviders,
8
+ anthropicSettings,
9
+ } from './types';
10
+ import { SettingDefinition, SettingsConfiguration } from './generate';
11
+
12
+ // Base definitions
13
+ const baseDefinitions: Record<string, SettingDefinition> = {
14
+ model: {
15
+ key: 'model',
16
+ label: 'com_ui_model',
17
+ labelCode: true,
18
+ type: 'string',
19
+ component: 'dropdown',
20
+ optionType: 'model',
21
+ selectPlaceholder: 'com_ui_select_model',
22
+ searchPlaceholder: 'com_ui_select_search_model',
23
+ searchPlaceholderCode: true,
24
+ selectPlaceholderCode: true,
25
+ columnSpan: 4,
26
+ },
27
+ temperature: {
28
+ key: 'temperature',
29
+ label: 'com_endpoint_temperature',
30
+ labelCode: true,
31
+ description: 'com_endpoint_openai_temp',
32
+ descriptionCode: true,
33
+ type: 'number',
34
+ component: 'slider',
35
+ optionType: 'model',
36
+ columnSpan: 4,
37
+ },
38
+ topP: {
39
+ key: 'topP',
40
+ label: 'com_endpoint_top_p',
41
+ labelCode: true,
42
+ description: 'com_endpoint_anthropic_topp',
43
+ descriptionCode: true,
44
+ type: 'number',
45
+ component: 'slider',
46
+ optionType: 'model',
47
+ columnSpan: 4,
48
+ },
49
+ stop: {
50
+ key: 'stop',
51
+ label: 'com_endpoint_stop',
52
+ labelCode: true,
53
+ description: 'com_endpoint_openai_stop',
54
+ descriptionCode: true,
55
+ placeholder: 'com_endpoint_stop_placeholder',
56
+ placeholderCode: true,
57
+ type: 'array',
58
+ default: [],
59
+ component: 'tags',
60
+ optionType: 'conversation',
61
+ minTags: 0,
62
+ maxTags: 4,
63
+ },
64
+ imageDetail: {
65
+ key: 'imageDetail',
66
+ label: 'com_endpoint_plug_image_detail',
67
+ labelCode: true,
68
+ description: 'com_endpoint_openai_detail',
69
+ descriptionCode: true,
70
+ type: 'enum',
71
+ default: ImageDetail.auto,
72
+ component: 'slider',
73
+ options: [ImageDetail.low, ImageDetail.auto, ImageDetail.high],
74
+ optionType: 'conversation',
75
+ columnSpan: 2,
76
+ },
77
+ };
78
+
79
+ const createDefinition = (
80
+ base: Partial<SettingDefinition>,
81
+ overrides: Partial<SettingDefinition>,
82
+ ): SettingDefinition => {
83
+ return { ...base, ...overrides } as SettingDefinition;
84
+ };
85
+
86
+ const librechat: Record<string, SettingDefinition> = {
87
+ modelLabel: {
88
+ key: 'modelLabel',
89
+ label: 'com_endpoint_custom_name',
90
+ labelCode: true,
91
+ type: 'string',
92
+ default: '',
93
+ component: 'input',
94
+ placeholder: 'com_endpoint_openai_custom_name_placeholder',
95
+ placeholderCode: true,
96
+ optionType: 'conversation',
97
+ },
98
+ maxContextTokens: {
99
+ key: 'maxContextTokens',
100
+ label: 'com_endpoint_context_tokens',
101
+ labelCode: true,
102
+ type: 'number',
103
+ component: 'input',
104
+ placeholder: 'com_nav_theme_system',
105
+ placeholderCode: true,
106
+ description: 'com_endpoint_context_info',
107
+ descriptionCode: true,
108
+ optionType: 'model',
109
+ columnSpan: 2,
110
+ },
111
+ resendFiles: {
112
+ key: 'resendFiles',
113
+ label: 'com_endpoint_plug_resend_files',
114
+ labelCode: true,
115
+ description: 'com_endpoint_openai_resend_files',
116
+ descriptionCode: true,
117
+ type: 'boolean',
118
+ default: true,
119
+ component: 'switch',
120
+ optionType: 'conversation',
121
+ showDefault: false,
122
+ columnSpan: 2,
123
+ },
124
+ promptPrefix: {
125
+ key: 'promptPrefix',
126
+ label: 'com_endpoint_prompt_prefix',
127
+ labelCode: true,
128
+ type: 'string',
129
+ default: '',
130
+ component: 'textarea',
131
+ placeholder: 'com_endpoint_openai_prompt_prefix_placeholder',
132
+ placeholderCode: true,
133
+ optionType: 'model',
134
+ },
135
+ };
136
+
137
+ const openAIParams: Record<string, SettingDefinition> = {
138
+ chatGptLabel: {
139
+ ...librechat.modelLabel,
140
+ key: 'chatGptLabel',
141
+ },
142
+ promptPrefix: librechat.promptPrefix,
143
+ temperature: createDefinition(baseDefinitions.temperature, {
144
+ default: openAISettings.temperature.default,
145
+ range: {
146
+ min: openAISettings.temperature.min,
147
+ max: openAISettings.temperature.max,
148
+ step: openAISettings.temperature.step,
149
+ },
150
+ }),
151
+ top_p: createDefinition(baseDefinitions.topP, {
152
+ key: 'top_p',
153
+ default: openAISettings.top_p.default,
154
+ range: {
155
+ min: openAISettings.top_p.min,
156
+ max: openAISettings.top_p.max,
157
+ step: openAISettings.top_p.step,
158
+ },
159
+ }),
160
+ frequency_penalty: {
161
+ key: 'frequency_penalty',
162
+ label: 'com_endpoint_frequency_penalty',
163
+ labelCode: true,
164
+ description: 'com_endpoint_openai_freq',
165
+ descriptionCode: true,
166
+ type: 'number',
167
+ default: openAISettings.frequency_penalty.default,
168
+ range: {
169
+ min: openAISettings.frequency_penalty.min,
170
+ max: openAISettings.frequency_penalty.max,
171
+ step: openAISettings.frequency_penalty.step,
172
+ },
173
+ component: 'slider',
174
+ optionType: 'model',
175
+ columnSpan: 4,
176
+ },
177
+ presence_penalty: {
178
+ key: 'presence_penalty',
179
+ label: 'com_endpoint_presence_penalty',
180
+ labelCode: true,
181
+ description: 'com_endpoint_openai_pres',
182
+ descriptionCode: true,
183
+ type: 'number',
184
+ default: openAISettings.presence_penalty.default,
185
+ range: {
186
+ min: openAISettings.presence_penalty.min,
187
+ max: openAISettings.presence_penalty.max,
188
+ step: openAISettings.presence_penalty.step,
189
+ },
190
+ component: 'slider',
191
+ optionType: 'model',
192
+ columnSpan: 4,
193
+ },
194
+ max_tokens: {
195
+ key: 'max_tokens',
196
+ label: 'com_endpoint_max_output_tokens',
197
+ labelCode: true,
198
+ type: 'number',
199
+ component: 'input',
200
+ description: 'com_endpoint_openai_max_tokens',
201
+ descriptionCode: true,
202
+ placeholder: 'com_nav_theme_system',
203
+ placeholderCode: true,
204
+ optionType: 'model',
205
+ columnSpan: 2,
206
+ },
207
+ reasoning_effort: {
208
+ key: 'reasoning_effort',
209
+ label: 'com_endpoint_reasoning_effort',
210
+ labelCode: true,
211
+ description: 'com_endpoint_openai_reasoning_effort',
212
+ descriptionCode: true,
213
+ type: 'enum',
214
+ default: ReasoningEffort.medium,
215
+ component: 'slider',
216
+ options: [ReasoningEffort.low, ReasoningEffort.medium, ReasoningEffort.high],
217
+ optionType: 'model',
218
+ columnSpan: 4,
219
+ },
220
+ };
221
+
222
+ const anthropic: Record<string, SettingDefinition> = {
223
+ maxOutputTokens: {
224
+ key: 'maxOutputTokens',
225
+ label: 'com_endpoint_max_output_tokens',
226
+ labelCode: true,
227
+ type: 'number',
228
+ component: 'input',
229
+ description: 'com_endpoint_anthropic_maxoutputtokens',
230
+ descriptionCode: true,
231
+ placeholder: 'com_nav_theme_system',
232
+ placeholderCode: true,
233
+ range: {
234
+ min: anthropicSettings.maxOutputTokens.min,
235
+ max: anthropicSettings.maxOutputTokens.max,
236
+ step: anthropicSettings.maxOutputTokens.step,
237
+ },
238
+ optionType: 'model',
239
+ columnSpan: 2,
240
+ },
241
+ temperature: createDefinition(baseDefinitions.temperature, {
242
+ default: anthropicSettings.temperature.default,
243
+ range: {
244
+ min: anthropicSettings.temperature.min,
245
+ max: anthropicSettings.temperature.max,
246
+ step: anthropicSettings.temperature.step,
247
+ },
248
+ }),
249
+ topP: createDefinition(baseDefinitions.topP, {
250
+ default: anthropicSettings.topP.default,
251
+ range: {
252
+ min: anthropicSettings.topP.min,
253
+ max: anthropicSettings.topP.max,
254
+ step: anthropicSettings.topP.step,
255
+ },
256
+ }),
257
+ topK: {
258
+ key: 'topK',
259
+ label: 'com_endpoint_top_k',
260
+ labelCode: true,
261
+ description: 'com_endpoint_anthropic_topk',
262
+ descriptionCode: true,
263
+ type: 'number',
264
+ default: anthropicSettings.topK.default,
265
+ range: {
266
+ min: anthropicSettings.topK.min,
267
+ max: anthropicSettings.topK.max,
268
+ step: anthropicSettings.topK.step,
269
+ },
270
+ component: 'slider',
271
+ optionType: 'model',
272
+ columnSpan: 4,
273
+ },
274
+ promptCache: {
275
+ key: 'promptCache',
276
+ label: 'com_endpoint_prompt_cache',
277
+ labelCode: true,
278
+ description: 'com_endpoint_anthropic_prompt_cache',
279
+ descriptionCode: true,
280
+ type: 'boolean',
281
+ default: anthropicSettings.promptCache.default,
282
+ component: 'switch',
283
+ optionType: 'conversation',
284
+ showDefault: false,
285
+ columnSpan: 2,
286
+ },
287
+ thinking: {
288
+ key: 'thinking',
289
+ label: 'com_endpoint_thinking',
290
+ labelCode: true,
291
+ description: 'com_endpoint_anthropic_thinking',
292
+ descriptionCode: true,
293
+ type: 'boolean',
294
+ default: anthropicSettings.thinking.default,
295
+ component: 'switch',
296
+ optionType: 'conversation',
297
+ showDefault: false,
298
+ columnSpan: 2,
299
+ },
300
+ thinkingBudget: {
301
+ key: 'thinkingBudget',
302
+ label: 'com_endpoint_thinking_budget',
303
+ labelCode: true,
304
+ description: 'com_endpoint_anthropic_thinking_budget',
305
+ descriptionCode: true,
306
+ type: 'number',
307
+ component: 'input',
308
+ default: anthropicSettings.thinkingBudget.default,
309
+ range: {
310
+ min: anthropicSettings.thinkingBudget.min,
311
+ max: anthropicSettings.thinkingBudget.max,
312
+ step: anthropicSettings.thinkingBudget.step,
313
+ },
314
+ optionType: 'conversation',
315
+ columnSpan: 2,
316
+ },
317
+ };
318
+
319
+ const bedrock: Record<string, SettingDefinition> = {
320
+ system: {
321
+ key: 'system',
322
+ label: 'com_endpoint_prompt_prefix',
323
+ labelCode: true,
324
+ type: 'string',
325
+ default: '',
326
+ component: 'textarea',
327
+ placeholder: 'com_endpoint_openai_prompt_prefix_placeholder',
328
+ placeholderCode: true,
329
+ optionType: 'model',
330
+ },
331
+ region: {
332
+ key: 'region',
333
+ type: 'string',
334
+ label: 'com_ui_region',
335
+ labelCode: true,
336
+ component: 'combobox',
337
+ optionType: 'conversation',
338
+ selectPlaceholder: 'com_ui_select_region',
339
+ searchPlaceholder: 'com_ui_select_search_region',
340
+ searchPlaceholderCode: true,
341
+ selectPlaceholderCode: true,
342
+ columnSpan: 2,
343
+ },
344
+ maxTokens: {
345
+ key: 'maxTokens',
346
+ label: 'com_endpoint_max_output_tokens',
347
+ labelCode: true,
348
+ type: 'number',
349
+ component: 'input',
350
+ placeholder: 'com_endpoint_anthropic_maxoutputtokens',
351
+ placeholderCode: true,
352
+ optionType: 'model',
353
+ columnSpan: 2,
354
+ },
355
+ temperature: createDefinition(baseDefinitions.temperature, {
356
+ default: 1,
357
+ range: { min: 0, max: 1, step: 0.01 },
358
+ }),
359
+ topK: createDefinition(anthropic.topK, {
360
+ range: { min: 0, max: 500, step: 1 },
361
+ }),
362
+ topP: createDefinition(baseDefinitions.topP, {
363
+ default: 0.999,
364
+ range: { min: 0, max: 1, step: 0.01 },
365
+ }),
366
+ };
367
+
368
+ const mistral: Record<string, SettingDefinition> = {
369
+ temperature: createDefinition(baseDefinitions.temperature, {
370
+ default: 0.7,
371
+ range: { min: 0, max: 1, step: 0.01 },
372
+ }),
373
+ topP: createDefinition(baseDefinitions.topP, {
374
+ range: { min: 0, max: 1, step: 0.01 },
375
+ }),
376
+ };
377
+
378
+ const cohere: Record<string, SettingDefinition> = {
379
+ temperature: createDefinition(baseDefinitions.temperature, {
380
+ default: 0.3,
381
+ range: { min: 0, max: 1, step: 0.01 },
382
+ }),
383
+ topP: createDefinition(baseDefinitions.topP, {
384
+ default: 0.75,
385
+ range: { min: 0.01, max: 0.99, step: 0.01 },
386
+ }),
387
+ };
388
+
389
+ const meta: Record<string, SettingDefinition> = {
390
+ temperature: createDefinition(baseDefinitions.temperature, {
391
+ default: 0.5,
392
+ range: { min: 0, max: 1, step: 0.01 },
393
+ }),
394
+ topP: createDefinition(baseDefinitions.topP, {
395
+ default: 0.9,
396
+ range: { min: 0, max: 1, step: 0.01 },
397
+ }),
398
+ };
399
+
400
+ const google: Record<string, SettingDefinition> = {
401
+ temperature: createDefinition(baseDefinitions.temperature, {
402
+ default: googleSettings.temperature.default,
403
+ range: {
404
+ min: googleSettings.temperature.min,
405
+ max: googleSettings.temperature.max,
406
+ step: googleSettings.temperature.step,
407
+ },
408
+ }),
409
+ topP: createDefinition(baseDefinitions.topP, {
410
+ default: googleSettings.topP.default,
411
+ range: {
412
+ min: googleSettings.topP.min,
413
+ max: googleSettings.topP.max,
414
+ step: googleSettings.topP.step,
415
+ },
416
+ }),
417
+ topK: {
418
+ key: 'topK',
419
+ label: 'com_endpoint_top_k',
420
+ labelCode: true,
421
+ description: 'com_endpoint_google_topk',
422
+ descriptionCode: true,
423
+ type: 'number',
424
+ default: googleSettings.topK.default,
425
+ range: {
426
+ min: googleSettings.topK.min,
427
+ max: googleSettings.topK.max,
428
+ step: googleSettings.topK.step,
429
+ },
430
+ component: 'slider',
431
+ optionType: 'model',
432
+ columnSpan: 4,
433
+ },
434
+ maxOutputTokens: {
435
+ key: 'maxOutputTokens',
436
+ label: 'com_endpoint_max_output_tokens',
437
+ labelCode: true,
438
+ type: 'number',
439
+ component: 'input',
440
+ description: 'com_endpoint_google_maxoutputtokens',
441
+ descriptionCode: true,
442
+ placeholder: 'com_nav_theme_system',
443
+ placeholderCode: true,
444
+ default: googleSettings.maxOutputTokens.default,
445
+ range: {
446
+ min: googleSettings.maxOutputTokens.min,
447
+ max: googleSettings.maxOutputTokens.max,
448
+ step: googleSettings.maxOutputTokens.step,
449
+ },
450
+ optionType: 'model',
451
+ columnSpan: 2,
452
+ },
453
+ };
454
+
455
+ const googleConfig: SettingsConfiguration = [
456
+ librechat.modelLabel,
457
+ librechat.promptPrefix,
458
+ librechat.maxContextTokens,
459
+ google.maxOutputTokens,
460
+ google.temperature,
461
+ google.topP,
462
+ google.topK,
463
+ librechat.resendFiles,
464
+ ];
465
+
466
+ const googleCol1: SettingsConfiguration = [
467
+ baseDefinitions.model as SettingDefinition,
468
+ librechat.modelLabel,
469
+ librechat.promptPrefix,
470
+ ];
471
+
472
+ const googleCol2: SettingsConfiguration = [
473
+ librechat.maxContextTokens,
474
+ google.maxOutputTokens,
475
+ google.temperature,
476
+ google.topP,
477
+ google.topK,
478
+ librechat.resendFiles,
479
+ ];
480
+
481
+ const openAI: SettingsConfiguration = [
482
+ librechat.modelLabel,
483
+ librechat.promptPrefix,
484
+ librechat.maxContextTokens,
485
+ openAIParams.max_tokens,
486
+ openAIParams.temperature,
487
+ openAIParams.top_p,
488
+ openAIParams.frequency_penalty,
489
+ openAIParams.presence_penalty,
490
+ baseDefinitions.stop,
491
+ librechat.resendFiles,
492
+ baseDefinitions.imageDetail,
493
+ openAIParams.reasoning_effort,
494
+ ];
495
+
496
+ const openAICol1: SettingsConfiguration = [
497
+ baseDefinitions.model as SettingDefinition,
498
+ librechat.modelLabel,
499
+ librechat.promptPrefix,
500
+ ];
501
+
502
+ const openAICol2: SettingsConfiguration = [
503
+ librechat.maxContextTokens,
504
+ openAIParams.max_tokens,
505
+ openAIParams.temperature,
506
+ openAIParams.top_p,
507
+ openAIParams.frequency_penalty,
508
+ openAIParams.presence_penalty,
509
+ baseDefinitions.stop,
510
+ openAIParams.reasoning_effort,
511
+ librechat.resendFiles,
512
+ baseDefinitions.imageDetail,
513
+ ];
514
+
515
+ const anthropicConfig: SettingsConfiguration = [
516
+ librechat.modelLabel,
517
+ librechat.promptPrefix,
518
+ librechat.maxContextTokens,
519
+ anthropic.maxOutputTokens,
520
+ anthropic.temperature,
521
+ anthropic.topP,
522
+ anthropic.topK,
523
+ librechat.resendFiles,
524
+ anthropic.promptCache,
525
+ anthropic.thinking,
526
+ anthropic.thinkingBudget,
527
+ ];
528
+
529
+ const anthropicCol1: SettingsConfiguration = [
530
+ baseDefinitions.model as SettingDefinition,
531
+ librechat.modelLabel,
532
+ librechat.promptPrefix,
533
+ ];
534
+
535
+ const anthropicCol2: SettingsConfiguration = [
536
+ librechat.maxContextTokens,
537
+ anthropic.maxOutputTokens,
538
+ anthropic.temperature,
539
+ anthropic.topP,
540
+ anthropic.topK,
541
+ librechat.resendFiles,
542
+ anthropic.promptCache,
543
+ anthropic.thinking,
544
+ anthropic.thinkingBudget,
545
+ ];
546
+
547
+ const bedrockAnthropic: SettingsConfiguration = [
548
+ librechat.modelLabel,
549
+ bedrock.system,
550
+ librechat.maxContextTokens,
551
+ bedrock.maxTokens,
552
+ bedrock.temperature,
553
+ bedrock.topP,
554
+ bedrock.topK,
555
+ baseDefinitions.stop,
556
+ librechat.resendFiles,
557
+ bedrock.region,
558
+ anthropic.thinking,
559
+ anthropic.thinkingBudget,
560
+ ];
561
+
562
+ const bedrockMistral: SettingsConfiguration = [
563
+ librechat.modelLabel,
564
+ librechat.promptPrefix,
565
+ librechat.maxContextTokens,
566
+ bedrock.maxTokens,
567
+ mistral.temperature,
568
+ mistral.topP,
569
+ librechat.resendFiles,
570
+ bedrock.region,
571
+ ];
572
+
573
+ const bedrockCohere: SettingsConfiguration = [
574
+ librechat.modelLabel,
575
+ librechat.promptPrefix,
576
+ librechat.maxContextTokens,
577
+ bedrock.maxTokens,
578
+ cohere.temperature,
579
+ cohere.topP,
580
+ librechat.resendFiles,
581
+ bedrock.region,
582
+ ];
583
+
584
+ const bedrockGeneral: SettingsConfiguration = [
585
+ librechat.modelLabel,
586
+ librechat.promptPrefix,
587
+ librechat.maxContextTokens,
588
+ meta.temperature,
589
+ meta.topP,
590
+ librechat.resendFiles,
591
+ bedrock.region,
592
+ ];
593
+
594
+ const bedrockAnthropicCol1: SettingsConfiguration = [
595
+ baseDefinitions.model as SettingDefinition,
596
+ librechat.modelLabel,
597
+ bedrock.system,
598
+ baseDefinitions.stop,
599
+ ];
600
+
601
+ const bedrockAnthropicCol2: SettingsConfiguration = [
602
+ librechat.maxContextTokens,
603
+ bedrock.maxTokens,
604
+ bedrock.temperature,
605
+ bedrock.topP,
606
+ bedrock.topK,
607
+ librechat.resendFiles,
608
+ bedrock.region,
609
+ anthropic.thinking,
610
+ anthropic.thinkingBudget,
611
+ ];
612
+
613
+ const bedrockMistralCol1: SettingsConfiguration = [
614
+ baseDefinitions.model as SettingDefinition,
615
+ librechat.modelLabel,
616
+ librechat.promptPrefix,
617
+ ];
618
+
619
+ const bedrockMistralCol2: SettingsConfiguration = [
620
+ librechat.maxContextTokens,
621
+ bedrock.maxTokens,
622
+ mistral.temperature,
623
+ mistral.topP,
624
+ librechat.resendFiles,
625
+ bedrock.region,
626
+ ];
627
+
628
+ const bedrockCohereCol1: SettingsConfiguration = [
629
+ baseDefinitions.model as SettingDefinition,
630
+ librechat.modelLabel,
631
+ librechat.promptPrefix,
632
+ ];
633
+
634
+ const bedrockCohereCol2: SettingsConfiguration = [
635
+ librechat.maxContextTokens,
636
+ bedrock.maxTokens,
637
+ cohere.temperature,
638
+ cohere.topP,
639
+ librechat.resendFiles,
640
+ bedrock.region,
641
+ ];
642
+
643
+ const bedrockGeneralCol1: SettingsConfiguration = [
644
+ baseDefinitions.model as SettingDefinition,
645
+ librechat.modelLabel,
646
+ librechat.promptPrefix,
647
+ ];
648
+
649
+ const bedrockGeneralCol2: SettingsConfiguration = [
650
+ librechat.maxContextTokens,
651
+ meta.temperature,
652
+ meta.topP,
653
+ librechat.resendFiles,
654
+ bedrock.region,
655
+ ];
656
+
657
+ export const paramSettings: Record<string, SettingsConfiguration | undefined> = {
658
+ [EModelEndpoint.openAI]: openAI,
659
+ [EModelEndpoint.azureOpenAI]: openAI,
660
+ [EModelEndpoint.custom]: openAI,
661
+ [EModelEndpoint.anthropic]: anthropicConfig,
662
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Anthropic}`]: bedrockAnthropic,
663
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.MistralAI}`]: bedrockMistral,
664
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Cohere}`]: bedrockCohere,
665
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Meta}`]: bedrockGeneral,
666
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.AI21}`]: bedrockGeneral,
667
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Amazon}`]: bedrockGeneral,
668
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.DeepSeek}`]: bedrockGeneral,
669
+ [EModelEndpoint.google]: googleConfig,
670
+ };
671
+
672
+ const openAIColumns = {
673
+ col1: openAICol1,
674
+ col2: openAICol2,
675
+ };
676
+
677
+ const bedrockGeneralColumns = {
678
+ col1: bedrockGeneralCol1,
679
+ col2: bedrockGeneralCol2,
680
+ };
681
+
682
+ export const presetSettings: Record<
683
+ string,
684
+ | {
685
+ col1: SettingsConfiguration;
686
+ col2: SettingsConfiguration;
687
+ }
688
+ | undefined
689
+ > = {
690
+ [EModelEndpoint.openAI]: openAIColumns,
691
+ [EModelEndpoint.azureOpenAI]: openAIColumns,
692
+ [EModelEndpoint.custom]: openAIColumns,
693
+ [EModelEndpoint.anthropic]: {
694
+ col1: anthropicCol1,
695
+ col2: anthropicCol2,
696
+ },
697
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Anthropic}`]: {
698
+ col1: bedrockAnthropicCol1,
699
+ col2: bedrockAnthropicCol2,
700
+ },
701
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.MistralAI}`]: {
702
+ col1: bedrockMistralCol1,
703
+ col2: bedrockMistralCol2,
704
+ },
705
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Cohere}`]: {
706
+ col1: bedrockCohereCol1,
707
+ col2: bedrockCohereCol2,
708
+ },
709
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Meta}`]: bedrockGeneralColumns,
710
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.AI21}`]: bedrockGeneralColumns,
711
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.Amazon}`]: bedrockGeneralColumns,
712
+ [`${EModelEndpoint.bedrock}-${BedrockProviders.DeepSeek}`]: bedrockGeneralColumns,
713
+ [EModelEndpoint.google]: {
714
+ col1: googleCol1,
715
+ col2: googleCol2,
716
+ },
717
+ };
718
+
719
+ export const agentParamSettings: Record<string, SettingsConfiguration | undefined> = Object.entries(
720
+ presetSettings,
721
+ ).reduce<Record<string, SettingsConfiguration | undefined>>((acc, [key, value]) => {
722
+ if (value) {
723
+ acc[key] = value.col2;
724
+ }
725
+ return acc;
726
+ }, {});