mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-12 20:44:24 +01:00
🌙 feat: Add Moonshot Kimi K2 Bedrock Support (#11288)
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
* feat(bedrock): add Moonshot Kimi K2 Thinking model support - Add Moonshot provider to BedrockProviders enum - Add Moonshot-specific parameter settings with 16384 default max tokens - Add conditional for anthropic_beta to only apply to Anthropic models - Kimi K2 Thinking model: moonshot.kimi-k2-thinking (256K context) * Delete add-kimi-bedrock.md * Remove comment on anthropic_beta condition Remove comment about adding anthropic_beta for Anthropic models. * chore: enum order * feat(bedrock): add tests to ensure anthropic_beta is not added to Moonshot Kimi K2 and DeepSeek models --------- Co-authored-by: Danny Avila <danacordially@gmail.com> Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
76e17ba701
commit
200377947e
4 changed files with 66 additions and 2 deletions
|
|
@ -880,6 +880,40 @@ const bedrockGeneralCol2: SettingsConfiguration = [
|
|||
librechat.fileTokenLimit,
|
||||
];
|
||||
|
||||
const bedrockMoonshot: SettingsConfiguration = [
|
||||
librechat.modelLabel,
|
||||
bedrock.system,
|
||||
librechat.maxContextTokens,
|
||||
createDefinition(bedrock.maxTokens, {
|
||||
default: 16384,
|
||||
}),
|
||||
bedrock.temperature,
|
||||
bedrock.topP,
|
||||
baseDefinitions.stop,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
librechat.fileTokenLimit,
|
||||
];
|
||||
|
||||
const bedrockMoonshotCol1: SettingsConfiguration = [
|
||||
baseDefinitions.model as SettingDefinition,
|
||||
librechat.modelLabel,
|
||||
bedrock.system,
|
||||
baseDefinitions.stop,
|
||||
];
|
||||
|
||||
const bedrockMoonshotCol2: SettingsConfiguration = [
|
||||
librechat.maxContextTokens,
|
||||
createDefinition(bedrock.maxTokens, {
|
||||
default: 16384,
|
||||
}),
|
||||
bedrock.temperature,
|
||||
bedrock.topP,
|
||||
librechat.resendFiles,
|
||||
bedrock.region,
|
||||
librechat.fileTokenLimit,
|
||||
];
|
||||
|
||||
export const paramSettings: Record<string, SettingsConfiguration | undefined> = {
|
||||
[EModelEndpoint.openAI]: openAI,
|
||||
[EModelEndpoint.azureOpenAI]: openAI,
|
||||
|
|
@ -892,6 +926,7 @@ export const paramSettings: Record<string, SettingsConfiguration | undefined> =
|
|||
[`${EModelEndpoint.bedrock}-${BedrockProviders.AI21}`]: bedrockGeneral,
|
||||
[`${EModelEndpoint.bedrock}-${BedrockProviders.Amazon}`]: bedrockGeneral,
|
||||
[`${EModelEndpoint.bedrock}-${BedrockProviders.DeepSeek}`]: bedrockGeneral,
|
||||
[`${EModelEndpoint.bedrock}-${BedrockProviders.Moonshot}`]: bedrockMoonshot,
|
||||
[EModelEndpoint.google]: googleConfig,
|
||||
};
|
||||
|
||||
|
|
@ -936,6 +971,10 @@ export const presetSettings: Record<
|
|||
[`${EModelEndpoint.bedrock}-${BedrockProviders.AI21}`]: bedrockGeneralColumns,
|
||||
[`${EModelEndpoint.bedrock}-${BedrockProviders.Amazon}`]: bedrockGeneralColumns,
|
||||
[`${EModelEndpoint.bedrock}-${BedrockProviders.DeepSeek}`]: bedrockGeneralColumns,
|
||||
[`${EModelEndpoint.bedrock}-${BedrockProviders.Moonshot}`]: {
|
||||
col1: bedrockMoonshotCol1,
|
||||
col2: bedrockMoonshotCol2,
|
||||
},
|
||||
[EModelEndpoint.google]: {
|
||||
col1: googleCol1,
|
||||
col2: googleCol2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue