feat: upgrade to deepseek-reasoner with Chain of Thought

- Switch to deepseek-reasoner model for improved analysis
- Add Chain of Thought (CoT) reasoning capabilities
- Update types to support reasoning_content in responses
- Update second-opinion tool to showcase CoT reasoning
- Add max_tokens configuration for response length control
- Update documentation and examples

The deepseek-reasoner model provides step-by-step reasoning before
generating final responses, improving the quality and transparency
of the analysis. The reasoning is now exposed in tool responses
under the 'reasoning' field.
This commit is contained in:
cyanheads
2025-01-25 19:14:26 -08:00
parent a6edebbf8e
commit ed5afdd56c
5 changed files with 100 additions and 34 deletions

View File

@@ -15,9 +15,10 @@ function requireEnv(name: string): string {
const apiConfig: APIConfig = {
apiKey: requireEnv('DEEPSEEK_API_KEY'),
baseUrl: process.env.DEEPSEEK_API_BASE_URL || 'https://api.deepseek.com',
model: process.env.DEEPSEEK_MODEL || 'deepseek-chat',
model: 'deepseek-reasoner', // Always use the reasoner model
maxRetries: parseInt(process.env.DEEPSEEK_MAX_RETRIES || '3', 10),
timeout: parseInt(process.env.DEEPSEEK_TIMEOUT || '30000', 10),
maxTokens: parseInt(process.env.DEEPSEEK_MAX_TOKENS || '4096', 10), // Default to 4K tokens for final response
};
export const config: ServerConfig = {