Artificial Intelligence 8 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 models, and using the AI assistant for code generation, completion, explanation, and troubleshooting within IntelliJ IDEA, complete with screenshots and sample code.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
Integrating DeepSeek AI Assistant into IntelliJ IDEA for Java Development

In early 2025, AI tools for programming surged in popularity, and DeepSeek quickly became a favored choice among developers for its performance and intelligent features. Integrating DeepSeek into IntelliJ IDEA provides Java developers with a powerful AI coding assistant that boosts productivity.

Environment preparation : Ensure you are using IntelliJ IDEA version 2023.x or newer and have Python 3.7+ installed and added to the system PATH, as DeepSeek relies on a Python runtime.

Install the CodeGPT plugin : Open IDEA, go to Settings (Windows/Linux) or IntelliJ IDEA → Preferences (macOS), select Plugins , search for CodeGPT in the Marketplace, and install it. The IDE will restart after installation.

Configure DeepSeek :

Create an API key on the DeepSeek website ( https://www.deepseek.com/ ) via the API Open Platform.

In IDEA, open the CodeGPT settings, locate the DeepSeek section, and paste the API key.

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

Enable code completions and parse responses as chat completions.

For the reasoning model, set the URL to the same endpoint and select deepseek-reasoner , also enabling the appropriate options.

After applying the settings, DeepSeek is ready for use.

Using DeepSeek :

Open the CodeGPT Custom OpenAI dialog, enter a prompt (e.g., "Write a Java method that filters digits and provide a test"), and receive generated code.

Example generated Java 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: 123456
    }
}

For code completion, press Ctrl + Space (or a custom shortcut) to let DeepSeek suggest the next lines based on context.

To get explanations of complex code, select the snippet, right‑click, and choose CodeGPT ; DeepSeek will provide a detailed description of the logic.

If you encounter issues, select CodeGPT: Ask Question to receive targeted solutions directly within the editor.

DeepSeek usage statistics (tokens, request counts, cost) can be viewed on the DeepSeek dashboard, with separate charts for the deepseek-chat and deepseek-reasoner models.

By following these steps, you can fully integrate DeepSeek into IntelliJ IDEA and enjoy AI‑assisted coding, faster development cycles, and improved code quality.

JavaDeepSeekCodeGPTIntelliJ IDEAAI code assistantPlugin integration
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

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.