mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🦾 feat: Claude-4 Support (#7509)
* refactor: Update AnthropicClient to support Claude model naming changes * Renamed `isClaude3` to `isClaudeLatest` to accommodate newer Claude models. * Updated logic to determine if the model is part of the Claude family. * Adjusted `useMessages` property to reflect the new model naming convention. * Cleaned up client properties during disposal to match the updated naming. * feat: Claude-4 Support * feat: Add Thinking and Prompt caching support for Claude 4 * chore: Update ANTHROPIC_MODELS in .env.example for latest model versions
This commit is contained in:
parent
28b76ce339
commit
a2f330e6ca
10 changed files with 483 additions and 34 deletions
|
|
@ -100,6 +100,8 @@ const tokenValues = Object.assign(
|
|||
'claude-3-5-haiku': { prompt: 0.8, completion: 4 },
|
||||
'claude-3.5-haiku': { prompt: 0.8, completion: 4 },
|
||||
'claude-3-haiku': { prompt: 0.25, completion: 1.25 },
|
||||
'claude-sonnet-4': { prompt: 3, completion: 15 },
|
||||
'claude-opus-4': { prompt: 15, completion: 75 },
|
||||
'claude-2.1': { prompt: 8, completion: 24 },
|
||||
'claude-2': { prompt: 8, completion: 24 },
|
||||
'claude-instant': { prompt: 0.8, completion: 2.4 },
|
||||
|
|
@ -162,6 +164,8 @@ const cacheTokenValues = {
|
|||
'claude-3.5-haiku': { write: 1, read: 0.08 },
|
||||
'claude-3-5-haiku': { write: 1, read: 0.08 },
|
||||
'claude-3-haiku': { write: 0.3, read: 0.03 },
|
||||
'claude-sonnet-4': { write: 3.75, read: 0.3 },
|
||||
'claude-opus-4': { write: 18.75, read: 1.5 },
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue