How to Seamlessly Integrate DeepSeek AI into IntelliJ IDEA for Java Development

This guide walks Java developers through preparing the environment, installing the CodeGPT plugin, configuring DeepSeek API keys and models, and using the AI assistant for code generation, completion, explanation, and troubleshooting directly within IntelliJ IDEA, while also showing usage statistics.

Java Architect Essentials
Java Architect Essentials
Java Architect Essentials
How to Seamlessly Integrate DeepSeek AI into IntelliJ IDEA for Java Development

Environment Preparation

IDE version

IntelliJ IDEA 2023.x or newer is required for the CodeGPT plugin, which proxies DeepSeek.

https://plugins.jetbrains.com/plugin/21056-codegpt

Python

DeepSeek requires Python 3.7+ on the system PATH. Verify the installation:

python --version
Python 3.12.8

Install CodeGPT Plugin

From Marketplace

Windows/Linux: Settings → Plugins → Marketplace, search “CodeGPT”, Install.

macOS: Preferences → Plugins → Marketplace, search “CodeGPT”, Install.

Restart IDEA after installation.

Configure DeepSeek in CodeGPT

API key

Generate an API key on https://www.deepseek.com/ (API Open Platform) and copy it.

Custom OpenAI settings

API Key – paste the generated key.

Chat model – URL https://api.deepseek.com/chat/completions, model deepseek-chat.

Reasoning model – enable Enable code completions and Parse response as Chat Completions, select FIM template DeepSeek Coder, use the same endpoint URL, model deepseek-reasoner.

Using DeepSeek in IntelliJ IDEA

Generate code

Open the CodeGPT panel, select “Custom OpenAI”, and enter a prompt such as “Write a Java method that filters numbers and provide a test”. Example output:

public class TestNumberFilter {
    public static String filterNumbers(String input) {
        // Remove all non‑digit characters
        return input.replaceAll("[^0-9]", "");
    }
    public static void main(String[] args) {
        String testInput2 = "SSFSDFS结论萨芬122432的噶大都是4无人区是14认识832safsss";
        String result = filterNumbers(testInput2);
        System.out.println("Filtered numbers: " + result); // Output: 123456
    }
}

Code completion

While typing, press Ctrl+Space (or a custom shortcut). DeepSeek analyses the context and suggests the next lines.

Code explanation

Select a code block, right‑click and choose “CodeGPT”. DeepSeek returns a natural‑language description of the code.

Ask questions

Highlight code or describe an issue, then choose “CodeGPT: Ask Question”. The assistant provides targeted suggestions.

Reference documentation

https://api-docs.deepseek.com/zh-cn/
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaDeepSeekCodeGPTIntelliJ IDEAAI code assistant
Java Architect Essentials
Written by

Java Architect Essentials

Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.