Artificial Intelligence 9 min read

Integrating DeepSeek AI Assistant into IntelliJ IDEA for Java Development

This guide walks Java developers through preparing the environment, installing the CodeGPT plugin, configuring DeepSeek API keys, and using the AI-powered code assistant within IntelliJ IDEA, including code completion, explanation, and question‑answer features, with usage statistics and sample code.

Java Architect Essentials
Java Architect Essentials
Java Architect Essentials
Integrating DeepSeek AI Assistant into IntelliJ IDEA for Java Development

Introduction

In early 2025, AI tools for programming have proliferated, and DeepSeek stands out for its performance. Integrating DeepSeek into IntelliJ IDEA provides Java developers with an intelligent coding assistant that boosts productivity.

1. Environment Preparation

IDEA Version Compatibility

Use a recent IDEA version (2023.x or later) to ensure compatibility with the CodeGPT plugin, which serves as the proxy for DeepSeek.

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

Install Python

DeepSeek requires Python 3.7+. After installation, add Python to the system PATH.

Macbook:GithubCommitSpace Aion$ python --version
Python 3.12.8
Macbook:GithubCommitSpace Aion$

2. Download and Install DeepSeek Plugin

Install AI‑Driven Code Assistant from IDEA Marketplace

Open IDEA, go to Settings (Windows/Linux) or IntelliJ IDEA → Preferences (macOS), select Plugins , search for CodeGPT , and install it. Restart IDEA after installation.

Configure DeepSeek

Create and Set API Key

Visit https://www.deepseek.com/ , open the API Open Platform, and create an API key. In IDEA’s settings, locate the DeepSeek section and paste the key.

Integrate DeepSeek in IDEA

In the CodeGPT settings, configure the following:

Set the API URL to https://api.deepseek.com/chat/completions and choose the model deepseek-chat .

Enable code completions and parse response as Chat Completions.

For the inference model, enable Enable code completions and Parse response as Chat Completions , select the FIM template DeepSeek Coder , set the URL to https://api.deepseek.com/chat/completions , and choose the model deepseek-reasoner .

Apply and confirm the settings.

DeepSeek Configuration Manual

Refer to the official documentation for detailed configuration: https://api-docs.deepseek.com/zh-cn/

3. Using DeepSeek for Programming

Getting Ideas and Code

Select the Custom OpenAI component in CodeGPT, enter a prompt (e.g., "Write a Java method to filter numbers and provide a test"), and receive generated code.

public class TestNumberFilter {
    public static String filterNumbers(String input) {
        // Use regex to keep only digits
        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: 122432141832
    }
}

Code Completion

Press Ctrl + Space (or a custom shortcut) to trigger DeepSeek’s context‑aware code completion.

Code Explanation

Select a code block, right‑click, and choose CodeGPT to get a detailed explanation of its logic.

Question Answering

Highlight code or describe an issue, then select CodeGPT: Ask Question to receive targeted solutions from DeepSeek.

4. DeepSeek Usage Statistics

Check token consumption and request counts on the DeepSeek dashboard to monitor monthly usage and associated costs.

Conclusion

By following these steps, you have successfully integrated DeepSeek into IntelliJ IDEA, enabling AI‑assisted coding, explanations, and troubleshooting, which can greatly enhance your Java development workflow.

JavaDeepSeekCodeGPTIntelliJ IDEAAI code assistantIDE Plugin
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

login 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.