DeepSeek 1017 in Cursor, Cline, Dify and the OpenAI SDK

Last updated · Written by Nova

Nov 3, 2026 · #deepseek#tutorial#configuration

Every tool below speaks the OpenAI format, so the change is the same everywhere: a base URL, a key, and a model name. Nothing in your prompts, your tool definitions or your application code changes.

The three values you need

Cursor

Settings → Models → OpenAI API key, then override the base URL with the value above. Add deepseek-flash as a custom model name. If the model does not appear in the picker, that is a UI cache, not an API problem — restart the editor.

Cline

Choose OpenAI Compatible as the provider, paste the base URL and the key, and type the model name directly. Cline passes the name through unchanged, so a typo becomes a 404 rather than a silent fallback.

Dify

Add a model provider of type OpenAI-API-compatible. Set the base URL to the endpoint, the model name to deepseek-flash, and leave the context size at the model's stated window. Dify's connection test calls the models endpoint first, which is a useful check on the key before you debug anything else.

The official OpenAI SDK

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_KEY",
    base_url="https://api.lbase.com/v1",
)

resp = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{"role": "user", "content": "say hello in five words"}],
)
print(resp.choices[0].message.content)

The same client works with streaming, tool calls and JSON output. If you are on the Anthropic SDK instead, point it at https://api.lbase.com and keep your Claude model names — the compatibility layer maps them.

When it does not work

Full endpoint reference, including the Anthropic format, is in the docs.

Questions people actually ask

Which model name should I use?

deepseek-flash for the current V4.1 Flash 1017 build, deepseek-v4-pro for the reasoning tier.

Does Cursor work with DeepSeek 1017?

Yes. Set the OpenAI base URL to the endpoint and add deepseek-flash as a custom model.

Can I use the Anthropic SDK instead of OpenAI?

Yes. Point the Anthropic client at https://api.lbase.com and keep the Claude model names.

Why do I get a 404 when the key works?

The model name is not one your key can call. Check the console's model list for that group.

Is streaming supported?

Yes, including tool calls and JSON output.