= (props) => {
>

@@ -104,42 +125,38 @@ const MessageEndpointIcon: React.FC
= (props) => {
},
[EModelEndpoint.gptPlugins]: {
icon: ,
- bg: `rgba(69, 89, 164, ${button ? 0.75 : 1})`,
+ bg: `rgba(69, 89, 164, ${button === true ? 0.75 : 1})`,
name: 'Plugins',
},
[EModelEndpoint.google]: {
- icon: model?.toLowerCase()?.includes('code') ? (
-
- ) : model?.toLowerCase()?.includes('gemini') ? (
-
- ) : (
-
- ),
- name: model?.toLowerCase()?.includes('code')
- ? 'Codey'
- : model?.toLowerCase()?.includes('gemini')
- ? 'Gemini'
- : 'PaLM2',
+ icon: getGoogleIcon(model, size),
+ name: getGoogleModelName(model),
},
[EModelEndpoint.anthropic]: {
icon: ,
bg: '#d09a74',
name: 'Claude',
},
+ [EModelEndpoint.bedrock]: {
+ icon: ,
+ bg: '#268672',
+ name: alternateName[EModelEndpoint.bedrock],
+ },
[EModelEndpoint.bingAI]: {
- icon: jailbreak ? (
-
- ) : (
-
- ),
- name: jailbreak ? 'Sydney' : 'BingAI',
+ icon:
+ jailbreak === true ? (
+
+ ) : (
+
+ ),
+ name: jailbreak === true ? 'Sydney' : 'BingAI',
},
[EModelEndpoint.chatGPTBrowser]: {
icon: ,
bg:
typeof model === 'string' && model.toLowerCase().includes('gpt-4')
? '#AB68FF'
- : `rgba(0, 163, 255, ${button ? 0.75 : 1})`,
+ : `rgba(0, 163, 255, ${button === true ? 0.75 : 1})`,
name: 'ChatGPT',
},
[EModelEndpoint.custom]: {
@@ -152,7 +169,7 @@ const MessageEndpointIcon: React.FC = (props) => {
= (props) => {
}}
className={cn(
'relative flex h-9 w-9 items-center justify-center rounded-sm p-1 text-white',
- props.className || '',
+ props.className ?? '',
)}
>
{icon}
- {error && (
+ {error === true && (
!
diff --git a/client/src/components/Endpoints/MinimalIcon.tsx b/client/src/components/Endpoints/MinimalIcon.tsx
index 80ab657a83..1f008e263c 100644
--- a/client/src/components/Endpoints/MinimalIcon.tsx
+++ b/client/src/components/Endpoints/MinimalIcon.tsx
@@ -1,4 +1,4 @@
-import { EModelEndpoint } from 'librechat-data-provider';
+import { EModelEndpoint, alternateName } from 'librechat-data-provider';
import { BrainCircuit } from 'lucide-react';
import UnknownIcon from '~/components/Chat/Menus/Endpoints/UnknownIcon';
import {
@@ -10,6 +10,7 @@ import {
GoogleMinimalIcon,
CustomMinimalIcon,
AnthropicIcon,
+ BedrockIcon,
Sparkles,
} from '~/components/svg';
import { cn } from '~/utils';
@@ -27,17 +28,17 @@ const MinimalIcon: React.FC = (props) => {
const endpointIcons = {
[EModelEndpoint.azureOpenAI]: {
icon: ,
- name: props.chatGptLabel || 'ChatGPT',
+ name: props.chatGptLabel ?? 'ChatGPT',
},
[EModelEndpoint.openAI]: {
icon: ,
- name: props.chatGptLabel || 'ChatGPT',
+ name: props.chatGptLabel ?? 'ChatGPT',
},
[EModelEndpoint.gptPlugins]: { icon: , name: 'Plugins' },
- [EModelEndpoint.google]: { icon: , name: props.modelLabel || 'Google' },
+ [EModelEndpoint.google]: { icon: , name: props.modelLabel ?? 'Google' },
[EModelEndpoint.anthropic]: {
icon: ,
- name: props.modelLabel || 'Claude',
+ name: props.modelLabel ?? 'Claude',
},
[EModelEndpoint.custom]: {
icon: ,
@@ -47,7 +48,14 @@ const MinimalIcon: React.FC = (props) => {
[EModelEndpoint.chatGPTBrowser]: { icon: , name: 'ChatGPT' },
[EModelEndpoint.assistants]: { icon: , name: 'Assistant' },
[EModelEndpoint.azureAssistants]: { icon: , name: 'Assistant' },
- [EModelEndpoint.agents]: { icon: , name: 'Agent' },
+ [EModelEndpoint.agents]: {
+ icon: ,
+ name: props.modelLabel ?? alternateName[EModelEndpoint.agents],
+ },
+ [EModelEndpoint.bedrock]: {
+ icon: ,
+ name: props.modelLabel ?? alternateName[EModelEndpoint.bedrock],
+ },
default: {
icon: (
= (props) => {
}}
className={cn(
'relative flex items-center justify-center rounded-sm text-black dark:text-white',
- props.className || '',
+ props.className ?? '',
)}
>
{icon}
- {error && (
+ {error === true && (
!
diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.ts
index 7901339973..b6c2c0a03f 100644
--- a/packages/data-provider/src/config.ts
+++ b/packages/data-provider/src/config.ts
@@ -568,7 +568,7 @@ export const alternateName = {
[EModelEndpoint.google]: 'Google',
[EModelEndpoint.anthropic]: 'Anthropic',
[EModelEndpoint.custom]: 'Custom',
- [EModelEndpoint.bedrock]: 'Bedrock',
+ [EModelEndpoint.bedrock]: 'AWS Bedrock',
};
const sharedOpenAIModels = [
diff --git a/packages/data-provider/src/parsers.ts b/packages/data-provider/src/parsers.ts
index f41d197962..79b6a48fe1 100644
--- a/packages/data-provider/src/parsers.ts
+++ b/packages/data-provider/src/parsers.ts
@@ -190,7 +190,7 @@ export const parseConvo = ({
// TODO: POC for default schema
// defaultSchema?: Partial,
}) => {
- let schema = endpointSchemas[endpoint];
+ let schema = endpointSchemas[endpoint] as EndpointSchema | undefined;
if (!schema && !endpointType) {
throw new Error(`Unknown endpoint: ${endpoint}`);
@@ -202,14 +202,14 @@ export const parseConvo = ({
// schema = schemaCreators[endpoint](defaultSchema);
// }
- const convo = schema.parse(conversation) as s.TConversation;
+ const convo = schema?.parse(conversation) as s.TConversation | undefined;
const { models, secondaryModels } = possibleValues ?? {};
if (models && convo) {
convo.model = getFirstDefinedValue(models) ?? convo.model;
}
- if (secondaryModels && convo.agentOptions) {
+ if (secondaryModels && convo?.agentOptions) {
convo.agentOptions.model = getFirstDefinedValue(secondaryModels) ?? convo.agentOptions.model;
}
@@ -217,9 +217,17 @@ export const parseConvo = ({
};
export const getResponseSender = (endpointOption: t.TEndpointOption): string => {
- const { model, endpoint, endpointType, modelDisplayLabel, chatGptLabel, modelLabel, jailbreak } =
- endpointOption;
+ const {
+ model: _m,
+ endpoint,
+ endpointType,
+ modelDisplayLabel,
+ chatGptLabel,
+ modelLabel,
+ jailbreak,
+ } = endpointOption;
+ const model = _m ?? '';
if (
[
EModelEndpoint.openAI,
@@ -232,14 +240,14 @@ export const getResponseSender = (endpointOption: t.TEndpointOption): string =>
return chatGptLabel;
} else if (model && model.includes('gpt-3')) {
return 'GPT-3.5';
- } else if (model && model.includes('gpt-4')) {
- return 'GPT-4';
} else if (model && model.includes('gpt-4o')) {
return 'GPT-4o';
+ } else if (model && model.includes('gpt-4')) {
+ return 'GPT-4';
} else if (model && model.includes('mistral')) {
return 'Mistral';
}
- return alternateName[endpoint] ?? 'ChatGPT';
+ return (alternateName[endpoint] as string | undefined) ?? 'ChatGPT';
}
if (endpoint === EModelEndpoint.bingAI) {
@@ -250,6 +258,10 @@ export const getResponseSender = (endpointOption: t.TEndpointOption): string =>
return modelLabel ?? 'Claude';
}
+ if (endpoint === EModelEndpoint.bedrock) {
+ return modelLabel ?? alternateName[endpoint];
+ }
+
if (endpoint === EModelEndpoint.google) {
if (modelLabel) {
return modelLabel;
@@ -271,6 +283,8 @@ export const getResponseSender = (endpointOption: t.TEndpointOption): string =>
return 'Mistral';
} else if (model && model.includes('gpt-3')) {
return 'GPT-3.5';
+ } else if (model && model.includes('gpt-4o')) {
+ return 'GPT-4o';
} else if (model && model.includes('gpt-4')) {
return 'GPT-4';
} else if (modelDisplayLabel) {