Deepseek using Chat and not coder

I used Deepseek for the first time today. The UI was set to Coder but when I checked my usage it showed that only deepseek chat was accessed. (This would explain the buggy code it generated.)

2 Likes

is there a quick fix for it ? i just purchased a few credits and am facing the same issue. buggy weak code.

great catch, I also had bad code from DeepSeek and now I know why!

I am currently using OpenRouter, and it seems they have discontinued the DeepSeek V2 model. The updated DeepSeek V2.5 is reportedly operational. However, both models share the same URL, listed as “deepseek/deepseek-chat,” when I check the model’s URL on OpenRouter. This could be an issue with OpenRouter, as they may need to update the URL to ensure it directs users to the correct model.

1 Like

had a chat with customer support they are saying deepseek-chat is same as deep-coder since it is merged, so it doesnt matter what u use, there is no more 2 model architecture for coder or chat, now there is only one.

Yeah, the codebase is pulling from the wrong endpoint.
export function getDeepseekModel(apiKey: string, model: string){
const openai = createOpenAI({
baseURL: ‘https://api.deepseek.com/beta’,
apiKey,
});

return openai(model);

We need to update the base URL and, update the JSON passed.

Here is the way it should be in JS and the link to the deepseek docs.

import OpenAI from “openai”;

const openai = new OpenAI({
baseURL: ‘https://api.deepseek.com’,
apiKey: ‘’
});

async function main() {
const completion = await openai.chat.completions.create({
messages: [{ role: “system”, content: “You are a helpful assistant.” }],
model: “deepseek-chat”,
});

console.log(completion.choices[0].message.content);
}

main();