mirror of
https://github.com/aljazceru/mentor-mcp-server.git
synced 2025-12-17 22:14:29 +01:00
refactor: update Deepseek API implementation
- Switch to OpenAI SDK for Deepseek API calls - Add openai package dependency - Update configuration for Deepseek API - Update environment variable examples - Improve error handling for API responses This change improves reliability and maintainability by using the official SDK with proper typing and error handling.
This commit is contained in:
@@ -14,8 +14,8 @@ function requireEnv(name: string): string {
|
||||
|
||||
const apiConfig: APIConfig = {
|
||||
apiKey: requireEnv('DEEPSEEK_API_KEY'),
|
||||
baseUrl: process.env.DEEPSEEK_API_BASE_URL || 'https://api.deepseek.com/v1',
|
||||
model: process.env.DEEPSEEK_MODEL || 'deepseek-coder',
|
||||
baseUrl: process.env.DEEPSEEK_API_BASE_URL || 'https://api.deepseek.com',
|
||||
model: process.env.DEEPSEEK_MODEL || 'deepseek-chat',
|
||||
maxRetries: parseInt(process.env.DEEPSEEK_MAX_RETRIES || '3', 10),
|
||||
timeout: parseInt(process.env.DEEPSEEK_TIMEOUT || '30000', 10),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user