fix: use correct Prisma field names (log/status) in AgentAction update
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 34s

Made-with: Cursor
This commit is contained in:
2026-04-26 00:05:55 +02:00
parent 7718e32e01
commit ce6166fa88

View File

@@ -910,9 +910,8 @@ async function executeToolUseAgent(
await prisma.agentAction.update({
where: { id: actionId },
data: {
status: 'error',
error: `Le modèle "${sysConfig.AI_MODEL_CHAT}" ne supporte pas le function calling (tool use). Utilisez un modèle compatible dans les paramètres admin, par exemple : openai/gpt-4o-mini, google/gemini-flash-1.5, anthropic/claude-3-haiku, ou mistralai/mistral-small.`,
completedAt: new Date(),
status: 'failure',
log: `Le modèle "${sysConfig.AI_MODEL_CHAT}" ne supporte pas le function calling (tool use). Utilisez un modèle compatible dans les paramètres admin : openai/gpt-4o-mini, google/gemini-flash-1.5, anthropic/claude-3-haiku, ou mistralai/mistral-small.`,
}
})
return { success: false, actionId, error: 'Model does not support tool calling' }