librechat-data-provider 0.8.403 → 0.8.404

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.
@@ -2041,6 +2041,301 @@ export declare const tQueryParamsSchema: z.ZodObject<Pick<{
2041
2041
  spec?: string | null | undefined;
2042
2042
  fileTokenLimit?: string | number | undefined;
2043
2043
  }>;
2044
+ /** Narrowed preset schema for use in model specs — omits system/DB/deprecated fields */
2045
+ export declare const tModelSpecPresetSchema: z.ZodObject<Omit<{
2046
+ parentMessageId: z.ZodOptional<z.ZodString>;
2047
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2048
+ iconURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2049
+ user: z.ZodOptional<z.ZodString>;
2050
+ context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2051
+ endpointType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof EModelEndpoint>>>;
2052
+ isArchived: z.ZodOptional<z.ZodBoolean>;
2053
+ messages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2054
+ tools: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
2055
+ name: z.ZodString;
2056
+ pluginKey: z.ZodString;
2057
+ description: z.ZodOptional<z.ZodString>;
2058
+ icon: z.ZodOptional<z.ZodString>;
2059
+ authConfig: z.ZodOptional<z.ZodArray<z.ZodObject<{
2060
+ authField: z.ZodString;
2061
+ label: z.ZodString;
2062
+ description: z.ZodString;
2063
+ optional: z.ZodOptional<z.ZodBoolean>;
2064
+ }, "strip", z.ZodTypeAny, {
2065
+ description: string;
2066
+ authField: string;
2067
+ label: string;
2068
+ optional?: boolean | undefined;
2069
+ }, {
2070
+ description: string;
2071
+ authField: string;
2072
+ label: string;
2073
+ optional?: boolean | undefined;
2074
+ }>, "many">>;
2075
+ authenticated: z.ZodOptional<z.ZodBoolean>;
2076
+ chatMenu: z.ZodOptional<z.ZodBoolean>;
2077
+ isButton: z.ZodOptional<z.ZodBoolean>;
2078
+ toolkit: z.ZodOptional<z.ZodBoolean>;
2079
+ }, "strip", z.ZodTypeAny, {
2080
+ name: string;
2081
+ pluginKey: string;
2082
+ description?: string | undefined;
2083
+ icon?: string | undefined;
2084
+ authConfig?: {
2085
+ description: string;
2086
+ authField: string;
2087
+ label: string;
2088
+ optional?: boolean | undefined;
2089
+ }[] | undefined;
2090
+ authenticated?: boolean | undefined;
2091
+ chatMenu?: boolean | undefined;
2092
+ isButton?: boolean | undefined;
2093
+ toolkit?: boolean | undefined;
2094
+ }, {
2095
+ name: string;
2096
+ pluginKey: string;
2097
+ description?: string | undefined;
2098
+ icon?: string | undefined;
2099
+ authConfig?: {
2100
+ description: string;
2101
+ authField: string;
2102
+ label: string;
2103
+ optional?: boolean | undefined;
2104
+ }[] | undefined;
2105
+ authenticated?: boolean | undefined;
2106
+ chatMenu?: boolean | undefined;
2107
+ isButton?: boolean | undefined;
2108
+ toolkit?: boolean | undefined;
2109
+ }>, "many">, z.ZodArray<z.ZodString, "many">]>>;
2110
+ modelLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2111
+ userLabel: z.ZodOptional<z.ZodString>;
2112
+ promptPrefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2113
+ temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2114
+ topP: z.ZodOptional<z.ZodNumber>;
2115
+ topK: z.ZodOptional<z.ZodNumber>;
2116
+ top_p: z.ZodOptional<z.ZodNumber>;
2117
+ frequency_penalty: z.ZodOptional<z.ZodNumber>;
2118
+ presence_penalty: z.ZodOptional<z.ZodNumber>;
2119
+ maxOutputTokens: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>>;
2120
+ maxContextTokens: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
2121
+ max_tokens: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
2122
+ promptCache: z.ZodOptional<z.ZodBoolean>;
2123
+ system: z.ZodOptional<z.ZodString>;
2124
+ thinking: z.ZodOptional<z.ZodBoolean>;
2125
+ thinkingBudget: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
2126
+ thinkingLevel: z.ZodOptional<z.ZodNativeEnum<typeof ThinkingLevel>>;
2127
+ stream: z.ZodOptional<z.ZodBoolean>;
2128
+ artifacts: z.ZodOptional<z.ZodString>;
2129
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
2130
+ input: z.ZodObject<{
2131
+ content: z.ZodString;
2132
+ }, "strip", z.ZodTypeAny, {
2133
+ content: string;
2134
+ }, {
2135
+ content: string;
2136
+ }>;
2137
+ output: z.ZodObject<{
2138
+ content: z.ZodString;
2139
+ }, "strip", z.ZodTypeAny, {
2140
+ content: string;
2141
+ }, {
2142
+ content: string;
2143
+ }>;
2144
+ }, "strip", z.ZodTypeAny, {
2145
+ input: {
2146
+ content: string;
2147
+ };
2148
+ output: {
2149
+ content: string;
2150
+ };
2151
+ }, {
2152
+ input: {
2153
+ content: string;
2154
+ };
2155
+ output: {
2156
+ content: string;
2157
+ };
2158
+ }>, "many">>;
2159
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2160
+ resendFiles: z.ZodOptional<z.ZodBoolean>;
2161
+ file_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2162
+ imageDetail: z.ZodOptional<z.ZodNativeEnum<typeof ImageDetail>>;
2163
+ reasoning_effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof ReasoningEffort>>>;
2164
+ reasoning_summary: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof ReasoningSummary>>>;
2165
+ verbosity: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof Verbosity>>>;
2166
+ useResponsesApi: z.ZodOptional<z.ZodBoolean>;
2167
+ effort: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof AnthropicEffort>>>;
2168
+ web_search: z.ZodOptional<z.ZodBoolean>;
2169
+ disableStreaming: z.ZodOptional<z.ZodBoolean>;
2170
+ assistant_id: z.ZodOptional<z.ZodString>;
2171
+ agent_id: z.ZodOptional<z.ZodString>;
2172
+ region: z.ZodOptional<z.ZodString>;
2173
+ maxTokens: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
2174
+ additionalModelRequestFields: z.ZodOptional<z.ZodType<DocumentTypeValue, z.ZodTypeDef, DocumentTypeValue>>;
2175
+ instructions: z.ZodOptional<z.ZodString>;
2176
+ additional_instructions: z.ZodOptional<z.ZodString>;
2177
+ append_current_datetime: z.ZodOptional<z.ZodBoolean>;
2178
+ presetOverride: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2179
+ stop: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2180
+ greeting: z.ZodOptional<z.ZodString>;
2181
+ spec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2182
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2183
+ fileTokenLimit: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number | undefined, string | number>>;
2184
+ resendImages: z.ZodOptional<z.ZodBoolean>;
2185
+ chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2186
+ } & {
2187
+ conversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2188
+ presetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2189
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2190
+ defaultPreset: z.ZodOptional<z.ZodBoolean>;
2191
+ order: z.ZodOptional<z.ZodNumber>;
2192
+ endpoint: z.ZodNullable<z.ZodUnion<[z.ZodNativeEnum<typeof EModelEndpoint>, z.ZodString]>>;
2193
+ }, "parentMessageId" | "iconURL" | "user" | "isArchived" | "messages" | "tags" | "file_ids" | "presetOverride" | "greeting" | "spec" | "expiredAt" | "resendImages" | "chatGptLabel">, "strip", z.ZodTypeAny, {
2194
+ endpoint: string | null;
2195
+ conversationId?: string | null | undefined;
2196
+ model?: string | null | undefined;
2197
+ title?: string | null | undefined;
2198
+ context?: string | null | undefined;
2199
+ endpointType?: EModelEndpoint | null | undefined;
2200
+ tools?: string[] | {
2201
+ name: string;
2202
+ pluginKey: string;
2203
+ description?: string | undefined;
2204
+ icon?: string | undefined;
2205
+ authConfig?: {
2206
+ description: string;
2207
+ authField: string;
2208
+ label: string;
2209
+ optional?: boolean | undefined;
2210
+ }[] | undefined;
2211
+ authenticated?: boolean | undefined;
2212
+ chatMenu?: boolean | undefined;
2213
+ isButton?: boolean | undefined;
2214
+ toolkit?: boolean | undefined;
2215
+ }[] | undefined;
2216
+ modelLabel?: string | null | undefined;
2217
+ userLabel?: string | undefined;
2218
+ promptPrefix?: string | null | undefined;
2219
+ temperature?: number | null | undefined;
2220
+ topP?: number | undefined;
2221
+ topK?: number | undefined;
2222
+ top_p?: number | undefined;
2223
+ frequency_penalty?: number | undefined;
2224
+ presence_penalty?: number | undefined;
2225
+ maxOutputTokens?: number | null | undefined;
2226
+ maxContextTokens?: number | undefined;
2227
+ max_tokens?: number | undefined;
2228
+ promptCache?: boolean | undefined;
2229
+ system?: string | undefined;
2230
+ thinking?: boolean | undefined;
2231
+ thinkingBudget?: number | undefined;
2232
+ thinkingLevel?: ThinkingLevel | undefined;
2233
+ stream?: boolean | undefined;
2234
+ artifacts?: string | undefined;
2235
+ examples?: {
2236
+ input: {
2237
+ content: string;
2238
+ };
2239
+ output: {
2240
+ content: string;
2241
+ };
2242
+ }[] | undefined;
2243
+ resendFiles?: boolean | undefined;
2244
+ imageDetail?: ImageDetail | undefined;
2245
+ reasoning_effort?: ReasoningEffort | null | undefined;
2246
+ reasoning_summary?: ReasoningSummary | null | undefined;
2247
+ verbosity?: Verbosity | null | undefined;
2248
+ useResponsesApi?: boolean | undefined;
2249
+ effort?: AnthropicEffort | null | undefined;
2250
+ web_search?: boolean | undefined;
2251
+ disableStreaming?: boolean | undefined;
2252
+ assistant_id?: string | undefined;
2253
+ agent_id?: string | undefined;
2254
+ region?: string | undefined;
2255
+ maxTokens?: number | undefined;
2256
+ additionalModelRequestFields?: DocumentTypeValue | undefined;
2257
+ instructions?: string | undefined;
2258
+ additional_instructions?: string | undefined;
2259
+ append_current_datetime?: boolean | undefined;
2260
+ stop?: string[] | undefined;
2261
+ fileTokenLimit?: number | undefined;
2262
+ presetId?: string | null | undefined;
2263
+ defaultPreset?: boolean | undefined;
2264
+ order?: number | undefined;
2265
+ }, {
2266
+ endpoint: string | null;
2267
+ conversationId?: string | null | undefined;
2268
+ model?: string | null | undefined;
2269
+ title?: string | null | undefined;
2270
+ context?: string | null | undefined;
2271
+ endpointType?: EModelEndpoint | null | undefined;
2272
+ tools?: string[] | {
2273
+ name: string;
2274
+ pluginKey: string;
2275
+ description?: string | undefined;
2276
+ icon?: string | undefined;
2277
+ authConfig?: {
2278
+ description: string;
2279
+ authField: string;
2280
+ label: string;
2281
+ optional?: boolean | undefined;
2282
+ }[] | undefined;
2283
+ authenticated?: boolean | undefined;
2284
+ chatMenu?: boolean | undefined;
2285
+ isButton?: boolean | undefined;
2286
+ toolkit?: boolean | undefined;
2287
+ }[] | undefined;
2288
+ modelLabel?: string | null | undefined;
2289
+ userLabel?: string | undefined;
2290
+ promptPrefix?: string | null | undefined;
2291
+ temperature?: number | null | undefined;
2292
+ topP?: number | undefined;
2293
+ topK?: number | undefined;
2294
+ top_p?: number | undefined;
2295
+ frequency_penalty?: number | undefined;
2296
+ presence_penalty?: number | undefined;
2297
+ maxOutputTokens?: string | number | null | undefined;
2298
+ maxContextTokens?: string | number | undefined;
2299
+ max_tokens?: string | number | undefined;
2300
+ promptCache?: boolean | undefined;
2301
+ system?: string | undefined;
2302
+ thinking?: boolean | undefined;
2303
+ thinkingBudget?: string | number | undefined;
2304
+ thinkingLevel?: ThinkingLevel | undefined;
2305
+ stream?: boolean | undefined;
2306
+ artifacts?: string | undefined;
2307
+ examples?: {
2308
+ input: {
2309
+ content: string;
2310
+ };
2311
+ output: {
2312
+ content: string;
2313
+ };
2314
+ }[] | undefined;
2315
+ resendFiles?: boolean | undefined;
2316
+ imageDetail?: ImageDetail | undefined;
2317
+ reasoning_effort?: ReasoningEffort | null | undefined;
2318
+ reasoning_summary?: ReasoningSummary | null | undefined;
2319
+ verbosity?: Verbosity | null | undefined;
2320
+ useResponsesApi?: boolean | undefined;
2321
+ effort?: AnthropicEffort | null | undefined;
2322
+ web_search?: boolean | undefined;
2323
+ disableStreaming?: boolean | undefined;
2324
+ assistant_id?: string | undefined;
2325
+ agent_id?: string | undefined;
2326
+ region?: string | undefined;
2327
+ maxTokens?: string | number | undefined;
2328
+ additionalModelRequestFields?: DocumentTypeValue | undefined;
2329
+ instructions?: string | undefined;
2330
+ additional_instructions?: string | undefined;
2331
+ append_current_datetime?: boolean | undefined;
2332
+ stop?: string[] | undefined;
2333
+ fileTokenLimit?: string | number | undefined;
2334
+ presetId?: string | null | undefined;
2335
+ defaultPreset?: boolean | undefined;
2336
+ order?: number | undefined;
2337
+ }>;
2338
+ export type TModelSpecPreset = z.infer<typeof tModelSpecPresetSchema>;
2044
2339
  export type TPreset = z.infer<typeof tPresetSchema>;
2045
2340
  export type TSetOption = (param: number | string) => (newValue: number | string | boolean | string[] | Partial<TPreset>) => void;
2046
2341
  export type TConversation = z.infer<typeof tConversationSchema> & {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "librechat-data-provider",
3
- "version": "0.8.403",
3
+ "version": "0.8.404",
4
4
  "description": "data services for librechat apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
7
7
  "types": "./dist/types/index.d.ts",
8
+ "sideEffects": false,
8
9
  "exports": {
9
10
  ".": {
10
11
  "import": "./dist/index.es.js",