diff --git a/src/lib/providers/deepseek.ts b/src/lib/providers/deepseek.ts index 46f2398..9c9ef5a 100644 --- a/src/lib/providers/deepseek.ts +++ b/src/lib/providers/deepseek.ts @@ -31,7 +31,7 @@ export const loadDeepseekChatModels = async () => { chatModels[model.key] = { displayName: model.displayName, model: new ChatOpenAI({ - openAIApiKey: deepseekApiKey, + apiKey: deepseekApiKey, modelName: model.key, temperature: 0.7, configuration: { diff --git a/src/lib/providers/groq.ts b/src/lib/providers/groq.ts index 5435de4..6a196ee 100644 --- a/src/lib/providers/groq.ts +++ b/src/lib/providers/groq.ts @@ -29,12 +29,15 @@ export const loadGroqChatModels = async () => { chatModels[model.id] = { displayName: model.id, model: new ChatOpenAI({ - openAIApiKey: groqApiKey, + apiKey: groqApiKey, modelName: model.id, temperature: 0.7, configuration: { baseURL: 'https://api.groq.com/openai/v1', }, + metadata: { + 'model-type': 'groq', + }, }) as unknown as BaseChatModel, }; }); diff --git a/src/lib/providers/lmstudio.ts b/src/lib/providers/lmstudio.ts index 811208f..f79c0aa 100644 --- a/src/lib/providers/lmstudio.ts +++ b/src/lib/providers/lmstudio.ts @@ -47,7 +47,7 @@ export const loadLMStudioChatModels = async () => { chatModels[model.id] = { displayName: model.name || model.id, model: new ChatOpenAI({ - openAIApiKey: 'lm-studio', + apiKey: 'lm-studio', configuration: { baseURL: ensureV1Endpoint(endpoint), }, @@ -83,7 +83,7 @@ export const loadLMStudioEmbeddingsModels = async () => { embeddingsModels[model.id] = { displayName: model.name || model.id, model: new OpenAIEmbeddings({ - openAIApiKey: 'lm-studio', + apiKey: 'lm-studio', configuration: { baseURL: ensureV1Endpoint(endpoint), }, diff --git a/src/lib/providers/openai.ts b/src/lib/providers/openai.ts index e68e574..c857b0e 100644 --- a/src/lib/providers/openai.ts +++ b/src/lib/providers/openai.ts @@ -67,7 +67,7 @@ export const loadOpenAIChatModels = async () => { chatModels[model.key] = { displayName: model.displayName, model: new ChatOpenAI({ - openAIApiKey: openaiApiKey, + apiKey: openaiApiKey, modelName: model.key, temperature: 0.7, }) as unknown as BaseChatModel, @@ -93,7 +93,7 @@ export const loadOpenAIEmbeddingModels = async () => { embeddingModels[model.key] = { displayName: model.displayName, model: new OpenAIEmbeddings({ - openAIApiKey: openaiApiKey, + apiKey: openaiApiKey, modelName: model.key, }) as unknown as Embeddings, };