Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ai-assistant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@langchain/mistralai": "^1.0.0",
"@langchain/ollama": "^1.0.1",
"@langchain/openai": "^1.1.2",
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package-lock.json shows that @langchain/deepseek requires @langchain/openai version 1.2.4, which has caused an update from the specified ^1.1.2. Consider updating this version constraint to ^1.2.4 to explicitly reflect the minimum required version and ensure consistent dependency resolution.

Suggested change
"@langchain/openai": "^1.1.2",
"@langchain/openai": "^1.2.4",

Copilot uses AI. Check for mistakes.
"@langchain/deepseek": "^1.0.8",
"@monaco-editor/react": "^4.5.2",
"@types/prismjs": "^1.26.5",
"@types/react-syntax-highlighter": "^15.5.13",
Expand Down
23 changes: 23 additions & 0 deletions ai-assistant/src/config/modelConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,29 @@ export const modelProviders: ModelProvider[] = [
},
],
},
{
id: 'deepseek',
name: 'DeepSeek',
icon: 'ai-providers:deepseek',
description: 'Integration with DeepSeek models',
fields: [
{
name: 'apiKey',
label: 'API Key',
type: 'text',
required: true,
placeholder: 'Your DeepSeek API key',
},
{
name: 'model',
label: 'Model',
type: 'select',
required: true,
options: ['deepseek-chat', 'deepseek-reasoner'],
default: 'deepseek-chat',
},
],
},
{
id: 'local',
name: 'Local Models',
Expand Down
11 changes: 11 additions & 0 deletions ai-assistant/src/langchain/LangChainManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ChatGoogleGenerativeAI } from '@langchain/google-genai';
import { ChatMistralAI } from '@langchain/mistralai';
import { ChatOllama } from '@langchain/ollama';
import { AzureChatOpenAI, ChatOpenAI } from '@langchain/openai';
import { ChatDeepSeek } from '@langchain/deepseek';
import sanitizeHtml from 'sanitize-html';
import AIManager, { Prompt } from '../ai/manager';
import { basePrompt } from '../ai/prompts';
Expand Down Expand Up @@ -170,6 +171,16 @@ export default class LangChainManager extends AIManager {
verbose: true,
});
}
case 'deepseek': {
if (!sanitizedConfig.apiKey) {
throw new Error('API key is required for DeepSeek');
}
return new ChatDeepSeek({
apiKey: sanitizedConfig.apiKey,
model: sanitizedConfig.model,
verbose: true,
});
}
case 'local': {
if (!sanitizedConfig.baseUrl) {
throw new Error('Base URL is required for local models');
Expand Down
3 changes: 3 additions & 0 deletions ai-assistant/src/utils/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const aiProviderIcons = {
google: {
body: '<path fill="currentColor" d="M21.996 12.018a10.65 10.65 0 0 0-9.98 9.98h-.04c-.32-5.364-4.613-9.656-9.976-9.98v-.04c5.363-.32 9.656-4.613 9.98-9.976h.04c.324 5.363 4.617 9.656 9.98 9.98v.036z"/>',
},
deepseek: {
body: '<path fill="currentColor" d="M5 4h6.5a6.5 6.5 0 0 1 0 16H5zm3 3v10h3.3a4 4 0 0 0 0-10z"/>',
},
azure: {
body: '<path fill="currentColor" d="M12.903 4.032L7 9.13l-5 9.065h4.548zm.839 1.226l-2.516 7.097L16 18.387l-9.355 1.58H22z"/>',
},
Expand Down
Loading