Did you try the strict (beta) function calling? https://api-docs.deepseek.com/guides/function_calling