How to Use Ollama in IntelliJ IDEA with DevoxxGenie
Ollama lets you run large language models locally — on your own CPU or GPU — with no API keys, no cloud dependency, and no per-token cost. DevoxxGenie integrates with Ollama out of the box, so you can use powerful models like Llama 3, Mistral, DeepSeek Coder, and Qwen directly inside IntelliJ IDEA.
This guide walks you through the full setup in under five minutes.
Why Use Ollama?
- Free: No API costs. Run as many prompts as you want.
- Private: Your code never leaves your machine.
- Offline: Works without an internet connection after the initial model download.
- Flexible: Switch models instantly as new ones are released.
Step 1: Install Ollama
Download and install Ollama from ollama.com for macOS, Windows, or Linux.
After installation, verify it's running:
ollama --version
Ollama runs as a local HTTP server on http://localhost:11434 by default.
Step 2: Pull a Model
Download the model you want to use. For general coding assistance, these are good starting points:
- General Purpose
- Coding Focused
- Agent Mode
- Inline Completion (FIM)
ollama pull llama3.2 # Meta's Llama 3.2 (3B) — fast, good for chat
ollama pull llama3.1:8b # Llama 3.1 8B — better quality, needs ~8GB RAM
ollama pull mistral # Mistral 7B — strong reasoning
ollama pull qwen3:8b # Alibaba Qwen3 — excellent coding ability
ollama pull deepseek-coder-v2 # DeepSeek Coder V2 — top-tier code model
ollama pull qwen3:8b # Qwen3 — strong at Java/Kotlin
ollama pull codellama:13b # Meta Code Llama 13B
ollama pull glm-4.7-flash # GLM-4.7 Flash — excellent tool-use, fast, great for Agent Mode
ollama pull qwen3:14b # Qwen3 14B — strong reasoning for agents
ollama pull llama3.1:70b # Llama 3.1 70B — best quality if your GPU can handle it
ollama pull qwen3:0.6b # Tiny and fast for inline completion
ollama pull starcoder2:3b # StarCoder2 3B — excellent FIM model
ollama pull deepseek-coder:1.3b # DeepSeek Coder 1.3B — lightweight FIM
The first pull downloads the model weights (1–20 GB depending on model size). Subsequent runs use the cached version.
Step 3: Install DevoxxGenie
If you haven't already, install DevoxxGenie from the JetBrains Marketplace:
- Open IntelliJ IDEA
- Go to Settings → Plugins → Marketplace
- Search for DevoxxGenie
- Click Install and restart the IDE
Step 4: Configure Ollama in DevoxxGenie
- Open Settings → Tools → DevoxxGenie
- In the LLM Providers section, find Ollama
- The base URL defaults to
http://localhost:11434— leave this as-is unless you're running Ollama on a different host or port - Click Refresh Models — DevoxxGenie queries the Ollama API and populates the model list automatically
- Select your model from the Model Name dropdown
- Click Apply
If Ollama runs on a server or another computer on your network, change the base URL to http://your-server-ip:11434. Make sure the Ollama server is accessible from your development machine.
Step 5: Start Chatting
Open the DevoxxGenie tool window (the genie lamp icon in the right sidebar) and start asking questions. The response comes from your local Ollama instance — no data leaves your machine.
Example prompts to try:
- Select a Java class → ask "Explain this class and its responsibilities"
- Select a method → ask "Write a JUnit 5 test for this method"
- Ask "What are the design patterns used in this codebase?" with relevant files added to context
Inline Code Completion with Ollama
DevoxxGenie supports Fill-in-the-Middle (FIM) inline completion powered by Ollama. This provides GitHub Copilot-style ghost-text suggestions as you type.
- Go to Settings → Tools → DevoxxGenie → Inline Completion
- Enable Inline Completion
- Set the provider to Ollama
- Select a FIM-capable model (e.g.,
qwen3:0.6b,starcoder2:3b) - Click Apply
Use a small, fast model (1–3B parameters) for inline completion — responsiveness matters more than raw quality here.
Agent Mode with Ollama
Agent Mode lets the LLM autonomously read, edit, and search your codebase. It works with local Ollama models — no cloud API key required.
For Agent Mode, use a model with strong tool-use (function-calling) support:
glm-4.7-flash— excellent tool-use reliability, fast and efficient, great for Agent Modeqwen3:14b— strong reasoning and code understandingllama3.1:8b— good all-round choice for lighter setups
Enable Agent Mode in the DevoxxGenie toolbar, select your Ollama model, and the LLM will be able to use built-in tools to explore your project autonomously.
Performance Tips
| Hardware | Recommended Model Size | Expected Speed |
|---|---|---|
| 8GB RAM, no dedicated GPU | 3–7B (quantized) | 5–15 tokens/sec |
| 16GB RAM / 8GB VRAM | 7–13B | 15–40 tokens/sec |
| 32GB RAM / 16GB VRAM | 13–30B | 20–60 tokens/sec |
| 64GB+ RAM / 24GB VRAM | 70B | 10–30 tokens/sec |
- Apple Silicon Macs (M1/M2/M3/M4) run Ollama models very efficiently using unified memory — a 16GB M2 Mac handles 13B models comfortably.
- Prefer quantized models (Q4_K_M or Q5_K_M) for the best speed/quality trade-off.
- For inline completion, always use the smallest model that gives acceptable results.
Troubleshooting
DevoxxGenie says "No models found"
Ensure Ollama is running (ollama serve) and that you've pulled at least one model (ollama list).
Slow responses
Switch to a smaller/more quantized model. For chat, try llama3.2:3b. For completion, try qwen3:0.6b.
Connection refused
Check that Ollama is running on the correct port. Try opening http://localhost:11434 in a browser — you should see Ollama is running.
Model not showing in dropdown
Click Refresh Models in DevoxxGenie settings after pulling a new model with ollama pull.
Next Steps
- Local LLM Providers — full reference for all local provider options
- Agent Mode — autonomous codebase exploration with local models
- Inline Completion — FIM-based ghost-text suggestions with Ollama
- Why DevoxxGenie — how DevoxxGenie compares to subscription-based tools