mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-28 13:24:10 +01:00
🗂️ feat: Add Optional Group Field to ModelSpecs Configuration (#9996)
* feat: Add group field to modelSpecs for flexible grouping * resolve lint issues * fix test * docs: enhance modelSpecs group field documentation for clarity --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
f61afc1124
commit
e9a85d5c65
10 changed files with 215 additions and 39 deletions
|
|
@ -214,6 +214,14 @@ export const bedrockEndpointSchema = baseEndpointSchema.merge(
|
|||
}),
|
||||
);
|
||||
|
||||
const modelItemSchema = z.union([
|
||||
z.string(),
|
||||
z.object({
|
||||
name: z.string(),
|
||||
description: z.string().optional(),
|
||||
}),
|
||||
]);
|
||||
|
||||
export const assistantEndpointSchema = baseEndpointSchema.merge(
|
||||
z.object({
|
||||
/* assistants specific */
|
||||
|
|
@ -239,7 +247,7 @@ export const assistantEndpointSchema = baseEndpointSchema.merge(
|
|||
apiKey: z.string().optional(),
|
||||
models: z
|
||||
.object({
|
||||
default: z.array(z.string()).min(1),
|
||||
default: z.array(modelItemSchema).min(1),
|
||||
fetch: z.boolean().optional(),
|
||||
userIdQuery: z.boolean().optional(),
|
||||
})
|
||||
|
|
@ -299,7 +307,7 @@ export const endpointSchema = baseEndpointSchema.merge(
|
|||
apiKey: z.string(),
|
||||
baseURL: z.string(),
|
||||
models: z.object({
|
||||
default: z.array(z.string()).min(1),
|
||||
default: z.array(modelItemSchema).min(1),
|
||||
fetch: z.boolean().optional(),
|
||||
userIdQuery: z.boolean().optional(),
|
||||
}),
|
||||
|
|
@ -636,6 +644,7 @@ export type TStartupConfig = {
|
|||
helpAndFaqURL: string;
|
||||
customFooter?: string;
|
||||
modelSpecs?: TSpecsConfig;
|
||||
modelDescriptions?: Record<string, Record<string, string>>;
|
||||
sharedLinksEnabled: boolean;
|
||||
publicSharedLinksEnabled: boolean;
|
||||
analyticsGtmId?: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue