feat: add new claude model#5709
feat: add new claude model#5709banu-teja wants to merge 1 commit intoChatGPTNextWeb:mainfrom banu-teja:ft/claude-latest
Conversation
|
@banu-teja is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe pull request introduces two new entries to the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
app/constant.ts (1)
322-323: Add knowledge cutoff dates for new modelsThe new Claude models should have their knowledge cutoff dates specified in the
KnowledgeCutOffDaterecord (around line 270).Add the following entries:
export const KnowledgeCutOffDate: Record<string, string> = { default: "2021-09", + "claude-3-5-sonnet-20241022": "2024-01", // Update with actual date + "claude-3-5-sonnet-v2@20241022": "2024-01", // Update with actual date // ... existing entries };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- app/constant.ts (1 hunks)
🔇 Additional comments (1)
app/constant.ts (1)
322-323: Verify the GCP model name format compatibilityThe GCP model name contains an '@' symbol which differs from the naming pattern used by other models. Please verify that:
- This is the official model identifier from Anthropic's documentation
- The application correctly handles special characters in model names
✅ Verification successful
Let me analyze the search results:
The search shows that the
@symbol is commonly used in the codebase for:
- Import statements (e.g.,
import { ... } from "@/app/...")- Model identification in the format
modelName@providerName(e.g., inapp/utils/model.ts,app/store/config.ts)- TypeScript annotations and comments
Most importantly, there's evidence in
app/utils/model.tsthat shows explicit support for the@symbol in model names:// using <modelName>@<providerId> as fullName modelTable[`${m.name}@${m?.provider?.id}`] = {
- The codebase has functions that handle model names with
@:const [modelName, providerName] = fullName.split("@");Model name format is compatible with codebase
The
@symbol in the GCP model nameclaude-3-5-sonnet-v2@20241022follows the established pattern in the codebase where@is used to separate model names from provider identifiers. The codebase explicitly supports and handles this format in multiple components.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any validation or sanitization of model names rg -l "validateModel|sanitizeModel|modelName.match" # Check if there are any other uses of @ in model names rg "@" --type tsLength of output: 24244
| "claude-3-haiku-20240307", | ||
| "claude-3-5-sonnet-20240620", | ||
| "claude-3-5-sonnet-20241022", // aws model | ||
| "claude-3-5-sonnet-v2@20241022", // gcp model |
There was a problem hiding this comment.
现在的系统,直接配置这个带@的模型名称,可能和现在的CUSTOM_MODELS的功能冲突
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
Added new claude model
claude-3-5-sonnet-20241022AWSclaude-3-5-sonnet-v2@20241022GCP📝 补充信息 | Additional Information
Model versions are taken from https://docs.anthropic.com/en/docs/about-claude/models
Summary by CodeRabbit
"claude-3-5-sonnet-20241022"and"claude-3-5-sonnet-v2@20241022", enhancing model diversity.