How to Use DeepSeek (or Any Custom LLM) with Junie CLI in JetBrains IDEs

4 min read·

Junie CLI, JetBrains' terminal-based coding agent, isn't locked into a fixed set of model providers. It supports custom LLMs through simple JSON configuration files, which means you can plug in DeepSeek, a self-hosted Ollama model, or any other OpenAI-compatible endpoint without waiting for official provider support.

This walkthrough came out of a conversation with JetBrains support, since the official documentation covers the general mechanism but doesn't include a DeepSeek-specific example. Below is exactly how to set it up.

Step 1: Create the config file

Junie looks for custom model profiles in
~/.junie/models/
(or a project-local
.junie/models/
folder). Create a new JSON file there, for example:
~/.junie/models/deepseek.json
The filename, minus the
.json
extension, becomes the profile's identifier, so
deepseek.json
gives you a profile called
deepseek
.

Step 2: Add the configuration

Paste in the following, swapping in your own API key:

{
  "id": "deepseek-v4-pro",
  "baseUrl": "https://api.deepseek.com/chat/completions",
  "apiType": "OpenAICompletion",
  "apiKey": "YOUR_KEY",
  "temperature": 0,
  "primaryModel": {
    "id": "deepseek-v4-pro"
  },
  "fasterModel": {
    "id": "deepseek-v4-flash"
  }
}

A quick breakdown of what's happening here:

The top-level fields set the shared defaults: which API endpoint to hit, what authentication to use, and how the requests should be formatted.
apiType: "OpenAICompletion"
tells Junie to talk to DeepSeek using the standard OpenAI Chat Completions format, which DeepSeek's API supports natively.
primaryModel
and
fasterModel
let you assign two different models to two different jobs. Junie uses the primary model for actual reasoning and code generation, and the faster model for lighter internal tasks like summarizing context or classifying intent. Pointing the faster role at a lighter model like
deepseek-v4-flash
keeps those background tasks snappy without touching your main model's behavior.The
temperature: 0
setting is worth calling out specifically. This isn't an arbitrary choice, it matches DeepSeek's recommended setting, but the right value varies by provider. Before adjusting this for a different model, check that model's own documentation for its recommended temperature rather than assuming 0 is universal.

Step 3: Run Junie with your custom model

You can launch Junie directly with the DeepSeek profile selected:

junie --model custom:deepseek
Or start Junie normally and switch models on the fly with the
/model
command. Either way, your custom profile shows up in the model list, right alongside the built-in providers.

Bonus: IDE integration

If you're running Junie CLI in a terminal while one of your JetBrains IDEs is open, it will automatically detect the running IDE and connect to it, giving you access to IDE-aware capabilities directly from the CLI. If you want to inspect or manage that connection manually, the
/ide
command lets you control the integration.

Why this is useful

This approach isn't limited to DeepSeek. Since the JSON profile format supports OpenAI Chat Completions, the newer OpenAI Responses format, Google's Gemini API, and Anthropic's Messages API, you can use the same pattern to wire up almost any provider, including local models running on Ollama or models sitting behind an internal company proxy.

Official documentation

JetBrains maintains the full reference for this feature, including the complete list of supported parameters and API types, here: Custom LLMs | Junie Documentation. At the time of writing, that page doesn't include a DeepSeek-specific example, which is the gap this article fills.