feat: Add support for latest AI models from Anthropic, Google, & OpenAI

This commit is contained in:
Samuel Dockery
2025-08-10 07:50:31 -07:00
parent 37cd6d3ab5
commit 1132997108
3 changed files with 29 additions and 1 deletions

View File

@@ -9,6 +9,18 @@ export const PROVIDER_INFO = {
import { BaseChatModel } from '@langchain/core/language_models/chat_models'; import { BaseChatModel } from '@langchain/core/language_models/chat_models';
const anthropicChatModels: Record<string, string>[] = [ const anthropicChatModels: Record<string, string>[] = [
{
displayName: 'Claude 4.1 Opus',
key: 'claude-opus-4-1-20250805',
},
{
displayName: 'Claude 4 Opus',
key: 'claude-opus-4-20250514',
},
{
displayName: 'Claude 4 Sonnet',
key: 'claude-sonnet-4-20250514',
},
{ {
displayName: 'Claude 3.7 Sonnet', displayName: 'Claude 3.7 Sonnet',
key: 'claude-3-7-sonnet-20250219', key: 'claude-3-7-sonnet-20250219',

View File

@@ -17,6 +17,10 @@ const geminiChatModels: Record<string, string>[] = [
displayName: 'Gemini 2.5 Flash', displayName: 'Gemini 2.5 Flash',
key: 'gemini-2.5-flash', key: 'gemini-2.5-flash',
}, },
{
displayName: 'Gemini 2.5 Flash-Lite',
key: 'gemini-2.5-flash-lite',
},
{ {
displayName: 'Gemini 2.5 Pro', displayName: 'Gemini 2.5 Pro',
key: 'gemini-2.5-pro', key: 'gemini-2.5-pro',

View File

@@ -42,6 +42,18 @@ const openaiChatModels: Record<string, string>[] = [
displayName: 'GPT 4.1', displayName: 'GPT 4.1',
key: 'gpt-4.1', key: 'gpt-4.1',
}, },
{
displayName: 'GPT 5 nano',
key: 'gpt-5-nano',
},
{
displayName: 'GPT 5 mini',
key: 'gpt-5-mini',
},
{
displayName: 'GPT 5',
key: 'gpt-5',
},
]; ];
const openaiEmbeddingModels: Record<string, string>[] = [ const openaiEmbeddingModels: Record<string, string>[] = [
@@ -69,7 +81,7 @@ export const loadOpenAIChatModels = async () => {
model: new ChatOpenAI({ model: new ChatOpenAI({
apiKey: openaiApiKey, apiKey: openaiApiKey,
modelName: model.key, modelName: model.key,
temperature: 0.7, temperature: 1,
}) as unknown as BaseChatModel, }) as unknown as BaseChatModel,
}; };
}); });