feat: enhanced AI usage logging (model, provider, response) and fixed build blockers

This commit is contained in:
2025-12-27 00:10:55 +01:00
parent 20659567fd
commit c51cd23d5e
10 changed files with 127 additions and 34 deletions

View File

@@ -135,7 +135,10 @@ export async function analyzeBottleMistral(input: any): Promise<AnalysisResponse
userId: userId,
apiType: 'gemini_ai',
endpoint: 'mistral/mistral-large',
success: true
success: true,
provider: 'mistral',
model: 'mistral-large-latest',
responseText: rawContent as string
});
await deductCredits(userId, 'gemini_ai', 'Mistral AI analysis');
@@ -164,7 +167,9 @@ export async function analyzeBottleMistral(input: any): Promise<AnalysisResponse
apiType: 'gemini_ai',
endpoint: 'mistral/mistral-large',
success: false,
errorMessage: aiError.message
errorMessage: aiError.message,
provider: 'mistral',
model: 'mistral-large-latest'
});
return {