From fe4989bbcc2aa72898391f832c2dce1352199d12 Mon Sep 17 00:00:00 2001 From: olsch01 Date: Wed, 25 Feb 2026 20:37:48 -0500 Subject: [PATCH] Switch AI model from kimi-k2.5 to qwen/qwen3.5-397b-a17b kimi-k2.5 is a thinking model that times out on complex prompts (>3min). qwen3.5-397b-a17b responds in ~2s with clean JSON output. Co-Authored-By: Claude Opus 4.6 --- .env.example | 4 ++-- .../investment-planning/investment-planning.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 76a3e53..dcbc5de 100644 --- a/.env.example +++ b/.env.example @@ -8,5 +8,5 @@ NODE_ENV=development # AI Investment Advisor (OpenAI-compatible API) AI_API_URL=https://integrate.api.nvidia.com/v1 -AI_API_KEY=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 -AI_MODEL=moonshotai/kimi-k2.5 +AI_API_KEY=your_nvidia_api_key_here +AI_MODEL=qwen/qwen3.5-397b-a17b diff --git a/backend/src/modules/investment-planning/investment-planning.service.ts b/backend/src/modules/investment-planning/investment-planning.service.ts index 698af20..e7393dc 100644 --- a/backend/src/modules/investment-planning/investment-planning.service.ts +++ b/backend/src/modules/investment-planning/investment-planning.service.ts @@ -402,7 +402,7 @@ Based on this complete financial picture, provide your investment recommendation private async callAI(messages: Array<{ role: string; content: string }>): Promise { const apiUrl = this.configService.get('AI_API_URL') || 'https://integrate.api.nvidia.com/v1'; const apiKey = this.configService.get('AI_API_KEY'); - const model = this.configService.get('AI_MODEL') || 'moonshotai/kimi-k2.5'; + const model = this.configService.get('AI_MODEL') || 'qwen/qwen3.5-397b-a17b'; if (!apiKey) { this.logger.error('AI_API_KEY not configured');