Artificial Intelligence 8 min read

Integrating DeepSeek AI Assistant into IntelliJ IDEA for Java Development

This tutorial explains how to prepare the environment, install the CodeGPT plugin, configure DeepSeek with an API key, set up chat and inference models in IntelliJ IDEA, and use the AI assistant for code generation, completion, explanation, and token usage monitoring, all illustrated with Java examples.

Architecture Digest
Architecture Digest
Architecture Digest
Integrating DeepSeek AI Assistant into IntelliJ IDEA for Java Development

In early 2025, AI-powered coding assistants like DeepSeek have become essential tools for developers, and integrating DeepSeek into IntelliJ IDEA provides a seamless AI companion for Java programming.

Environment preparation : Ensure you are using IntelliJ IDEA 2023.x or newer and have Python 3.7+ installed and added to the system PATH. Install the CodeGPT plugin (a robust AI‑driven code assistant) from the JetBrains Marketplace.

Plugin installation : Open IDEA, go to Settings (Windows/Linux) or IntelliJ IDEA → Preferences (macOS), select Plugins , switch to the Marketplace tab, search for CodeGPT , and click Install . Restart IDEA after installation.

DeepSeek configuration : Visit https://www.deepseek.com/ , navigate to the API Open Platform, and create an API key. In IDEA, open the CodeGPT settings, locate the DeepSeek section, and paste the obtained API key.

IDEA integration steps :

In the CodeGPT settings, choose Custom OpenAI and set the chat endpoint to https://api.deepseek.com/chat/completions with the model deepseek-chat .

For the inference model, enable Enable code completions and Parse response as Chat Completions , select the FIM template DeepSeek Coder , set the same endpoint URL, and choose the model deepseek-reasoner .

After applying the settings, the DeepSeek assistant is ready for use.

Using DeepSeek :

To generate ideas or code, open the CodeGPT panel, select Custom OpenAI , and type your request (e.g., “Write a Java method that filters numbers and provide a test”).

For code completion, place the cursor after a partial statement and press Ctrl + Space (or your custom shortcut); DeepSeek will suggest the next code segment.

To explain code, select a snippet, right‑click, and choose CodeGPT to receive a detailed description.

For troubleshooting, select the code or describe the problem and choose CodeGPT: Ask Question to get targeted solutions.

Example Java code generated by DeepSeek:

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: 122432447832
    }
}

DeepSeek also provides token‑usage statistics; you can view daily usage and cost details on the DeepSeek dashboard (e.g., https://api-docs.deepseek.com/zh-cn/ ).

By following these steps, you can fully integrate DeepSeek into IntelliJ IDEA, boost coding efficiency, and leverage AI assistance throughout your Java development workflow.

JavaDeepSeekCodeGPTIntelliJ IDEAAI AssistantPlugin integration
Architecture Digest
Written by

Architecture Digest

Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.

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.