mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-17 16:08:10 +01:00
🚀 feat: Claude 3.7 Support + Reasoning (#6008)
* fix: missing console color methods for admin scripts * feat: Anthropic Claude 3.7 Sonnet Support * feat: update eventsource to version 3.0.2 and upgrade @modelcontextprotocol/sdk to 1.4.1 * fix: update DynamicInput to handle number type and improve initial value logic * feat: first pass Anthropic Reasoning (Claude 3.7) * feat: implement streaming support in AnthropicClient with reasoning UI handling * feat: add missing xAI (grok) models
This commit is contained in:
parent
0e719592c6
commit
50e8769340
17 changed files with 421 additions and 77 deletions
|
|
@ -648,6 +648,8 @@ const sharedOpenAIModels = [
|
|||
];
|
||||
|
||||
const sharedAnthropicModels = [
|
||||
'claude-3-7-sonnet-latest',
|
||||
'claude-3-7-sonnet-20250219',
|
||||
'claude-3-5-haiku-20241022',
|
||||
'claude-3-5-sonnet-20241022',
|
||||
'claude-3-5-sonnet-20240620',
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ const ANTHROPIC_MAX_OUTPUT = 8192;
|
|||
const LEGACY_ANTHROPIC_MAX_OUTPUT = 4096;
|
||||
export const anthropicSettings = {
|
||||
model: {
|
||||
default: 'claude-3-5-sonnet-20241022',
|
||||
default: 'claude-3-5-sonnet-latest',
|
||||
},
|
||||
temperature: {
|
||||
min: 0,
|
||||
|
|
@ -267,13 +267,22 @@ export const anthropicSettings = {
|
|||
promptCache: {
|
||||
default: true,
|
||||
},
|
||||
thinking: {
|
||||
default: true,
|
||||
},
|
||||
thinkingBudget: {
|
||||
min: 1024,
|
||||
step: 100,
|
||||
max: 200000,
|
||||
default: 2000,
|
||||
},
|
||||
maxOutputTokens: {
|
||||
min: 1,
|
||||
max: ANTHROPIC_MAX_OUTPUT,
|
||||
step: 1,
|
||||
default: ANTHROPIC_MAX_OUTPUT,
|
||||
reset: (modelName: string) => {
|
||||
if (modelName.includes('claude-3-5-sonnet')) {
|
||||
if (modelName.includes('claude-3-5-sonnet') || modelName.includes('claude-3-7-sonnet')) {
|
||||
return ANTHROPIC_MAX_OUTPUT;
|
||||
}
|
||||
|
||||
|
|
@ -556,6 +565,8 @@ export const tConversationSchema = z.object({
|
|||
/* Anthropic */
|
||||
promptCache: z.boolean().optional(),
|
||||
system: z.string().optional(),
|
||||
thinking: z.boolean().optional(),
|
||||
thinkingBudget: coerceNumber.optional(),
|
||||
/* artifacts */
|
||||
artifacts: z.string().optional(),
|
||||
/* google */
|
||||
|
|
@ -672,6 +683,8 @@ export const tQueryParamsSchema = tConversationSchema
|
|||
maxOutputTokens: true,
|
||||
/** @endpoints anthropic */
|
||||
promptCache: true,
|
||||
thinking: true,
|
||||
thinkingBudget: true,
|
||||
/** @endpoints bedrock */
|
||||
region: true,
|
||||
/** @endpoints bedrock */
|
||||
|
|
@ -1067,6 +1080,8 @@ export const anthropicSchema = tConversationSchema
|
|||
topK: true,
|
||||
resendFiles: true,
|
||||
promptCache: true,
|
||||
thinking: true,
|
||||
thinkingBudget: true,
|
||||
artifacts: true,
|
||||
iconURL: true,
|
||||
greeting: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue