mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🔧 fix: Model Key Retrieval to Account for Bedrock Regions (#5029)
* 🔧 fix: model key retrieval logic to account for Bedrock region
* fix: edit preset dialog styling and potential max depth error with agents endpoint
This commit is contained in:
parent
d3cafeee96
commit
649c7a6032
5 changed files with 46 additions and 23 deletions
|
|
@ -49,7 +49,11 @@ export enum BedrockProviders {
|
|||
|
||||
export const getModelKey = (endpoint: EModelEndpoint | string, model: string) => {
|
||||
if (endpoint === EModelEndpoint.bedrock) {
|
||||
return model.split('.')[0] as BedrockProviders;
|
||||
const parts = model.split('.');
|
||||
const provider = [parts[0], parts[1]].find((part) =>
|
||||
Object.values(BedrockProviders).includes(part as BedrockProviders),
|
||||
);
|
||||
return (provider ?? parts[0]) as BedrockProviders;
|
||||
}
|
||||
return model;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue