Hi there! I’m trying to figure out if deepseek-chat works with tool calling in LangChain. The documentation says it should support this feature, but I’m having trouble getting it to work properly.
I’ve tested it using the langchain-deepseek package but the tools don’t seem to be available when I try to use them in my Python scripts or through LangSmith’s interface. I even attempted to use the langchain-openai package by pointing it to the Deepseek API endpoint, but that approach didn’t work either.
Has anyone successfully implemented function calling with deepseek-chat? I’m wondering if there’s something I’m missing in my setup or if this functionality isn’t fully supported yet. Any guidance would be appreciated!
ugh, i totally get it! make sure ur deepseek and langchain are up to date. also, don’t forget to verify your api key permissions. that’s often what messes things up. if still stuck, a restart might do the trick!
Had this exact problem a few months ago when testing deepseek for an internal tool.
You’re probably using the wrong model endpoint. Deepseek has multiple models but not all support tool calling. You need deepseek-chat specifically - not deepseek-coder or other variants.
What fixed it for me: initialize the client with the correct base URL and format your tools exactly like OpenAI’s function calling structure.
Big gotcha - if you’re not getting errors but tools still won’t trigger, check your prompt. Deepseek’s way pickier than GPT models about how you phrase requests. I had to be super explicit about when to use tools.
Also check your deepseek dashboard - make sure your API key has function calling permissions enabled. Older keys don’t have this turned on by default.
Had the same problem with deepseek-chat tool calling. It’s usually the model version - not all deepseek models support function calling yet. You need to use a model that actually has tool calling enabled. Make sure you’re defining the tools parameter in your chat completion request and format the function schemas exactly like OpenAI’s spec. Also check if your subscription tier includes tool calling - it’s not available on all plans. Test with a basic function first to make sure everything connects before you try anything complex.