librechat-data-provider 0.8.300 → 0.8.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react-query/index.es.js +1 -1
- package/dist/react-query/index.es.js.map +1 -1
- package/package.json +3 -3
- package/specs/api-endpoints.spec.ts +86 -0
- package/specs/bedrock.spec.ts +170 -0
- package/specs/headers-helpers.spec.ts +24 -0
- package/specs/parsers.spec.ts +14 -13
- package/specs/request-interceptor.spec.ts +299 -0
- package/src/api-endpoints.ts +19 -0
- package/src/bedrock.ts +28 -7
- package/src/config.ts +10 -2
- package/src/file-config.spec.ts +113 -0
- package/src/file-config.ts +54 -3
- package/src/headers-helpers.ts +6 -2
- package/src/index.ts +1 -1
- package/src/mcp.ts +3 -0
- package/src/parameterSettings.ts +88 -2
- package/src/parsers.ts +8 -8
- package/src/request.ts +12 -6
- package/src/schemas.ts +24 -0
- package/src/types/files.ts +1 -0
- package/src/types.ts +1 -0
package/src/schemas.ts
CHANGED
|
@@ -49,6 +49,7 @@ export enum Providers {
|
|
|
49
49
|
export const documentSupportedProviders = new Set<string>([
|
|
50
50
|
EModelEndpoint.anthropic,
|
|
51
51
|
EModelEndpoint.openAI,
|
|
52
|
+
EModelEndpoint.bedrock,
|
|
52
53
|
EModelEndpoint.custom,
|
|
53
54
|
// handled in AttachFileMenu and DragDropModal since azureOpenAI only supports documents with Use Responses API set to true
|
|
54
55
|
// EModelEndpoint.azureOpenAI,
|
|
@@ -184,6 +185,12 @@ export enum AnthropicEffort {
|
|
|
184
185
|
max = 'max',
|
|
185
186
|
}
|
|
186
187
|
|
|
188
|
+
export enum BedrockReasoningConfig {
|
|
189
|
+
low = 'low',
|
|
190
|
+
medium = 'medium',
|
|
191
|
+
high = 'high',
|
|
192
|
+
}
|
|
193
|
+
|
|
187
194
|
export enum ReasoningSummary {
|
|
188
195
|
none = '',
|
|
189
196
|
auto = 'auto',
|
|
@@ -198,6 +205,14 @@ export enum Verbosity {
|
|
|
198
205
|
high = 'high',
|
|
199
206
|
}
|
|
200
207
|
|
|
208
|
+
export enum ThinkingLevel {
|
|
209
|
+
unset = '',
|
|
210
|
+
minimal = 'minimal',
|
|
211
|
+
low = 'low',
|
|
212
|
+
medium = 'medium',
|
|
213
|
+
high = 'high',
|
|
214
|
+
}
|
|
215
|
+
|
|
201
216
|
export const imageDetailNumeric = {
|
|
202
217
|
[ImageDetail.low]: 0,
|
|
203
218
|
[ImageDetail.auto]: 1,
|
|
@@ -215,6 +230,7 @@ export const eReasoningEffortSchema = z.nativeEnum(ReasoningEffort);
|
|
|
215
230
|
export const eAnthropicEffortSchema = z.nativeEnum(AnthropicEffort);
|
|
216
231
|
export const eReasoningSummarySchema = z.nativeEnum(ReasoningSummary);
|
|
217
232
|
export const eVerbositySchema = z.nativeEnum(Verbosity);
|
|
233
|
+
export const eThinkingLevelSchema = z.nativeEnum(ThinkingLevel);
|
|
218
234
|
|
|
219
235
|
export const defaultAssistantFormValues = {
|
|
220
236
|
assistant: '',
|
|
@@ -359,6 +375,9 @@ export const googleSettings = {
|
|
|
359
375
|
*/
|
|
360
376
|
default: -1 as const,
|
|
361
377
|
},
|
|
378
|
+
thinkingLevel: {
|
|
379
|
+
default: ThinkingLevel.unset as const,
|
|
380
|
+
},
|
|
362
381
|
};
|
|
363
382
|
|
|
364
383
|
const ANTHROPIC_MAX_OUTPUT = 128000 as const;
|
|
@@ -543,6 +562,7 @@ export const tPluginAuthConfigSchema = z.object({
|
|
|
543
562
|
authField: z.string(),
|
|
544
563
|
label: z.string(),
|
|
545
564
|
description: z.string(),
|
|
565
|
+
optional: z.boolean().optional(),
|
|
546
566
|
});
|
|
547
567
|
|
|
548
568
|
export type TPluginAuthConfig = z.infer<typeof tPluginAuthConfigSchema>;
|
|
@@ -714,6 +734,7 @@ export const tConversationSchema = z.object({
|
|
|
714
734
|
system: z.string().optional(),
|
|
715
735
|
thinking: z.boolean().optional(),
|
|
716
736
|
thinkingBudget: coerceNumber.optional(),
|
|
737
|
+
thinkingLevel: eThinkingLevelSchema.optional(),
|
|
717
738
|
stream: z.boolean().optional(),
|
|
718
739
|
/* artifacts */
|
|
719
740
|
artifacts: z.string().optional(),
|
|
@@ -860,6 +881,7 @@ export const tQueryParamsSchema = tConversationSchema
|
|
|
860
881
|
promptCache: true,
|
|
861
882
|
thinking: true,
|
|
862
883
|
thinkingBudget: true,
|
|
884
|
+
thinkingLevel: true,
|
|
863
885
|
effort: true,
|
|
864
886
|
/** @endpoints bedrock */
|
|
865
887
|
region: true,
|
|
@@ -935,6 +957,7 @@ export const googleBaseSchema = tConversationSchema.pick({
|
|
|
935
957
|
topK: true,
|
|
936
958
|
thinking: true,
|
|
937
959
|
thinkingBudget: true,
|
|
960
|
+
thinkingLevel: true,
|
|
938
961
|
web_search: true,
|
|
939
962
|
fileTokenLimit: true,
|
|
940
963
|
iconURL: true,
|
|
@@ -966,6 +989,7 @@ export const googleGenConfigSchema = z
|
|
|
966
989
|
.object({
|
|
967
990
|
includeThoughts: z.boolean().optional(),
|
|
968
991
|
thinkingBudget: coerceNumber.optional(),
|
|
992
|
+
thinkingLevel: z.string().optional(),
|
|
969
993
|
})
|
|
970
994
|
.optional(),
|
|
971
995
|
web_search: z.boolean().optional(),
|
package/src/types/files.ts
CHANGED