Use inference snaps from JetBrains IDEs¶
Many inference snaps provide an OpenAI-compliant API that can be integrated with JetBrains IDEs (e.g. IntelliJ IDEA, GoLand, PyCharm, RustRover). This guide explains how to use the JetBrains AI Assistant plugin and configure an inference snap as a provider. It assumes that the snap has already been installed and configured.
Get the inference snap’s endpoint¶
Use the inference snap’s status command to retrieve the OpenAI endpoint URL.
For example, with the gemma4 snap, run:
gemma4 status
The output will show the endpoint and model information:
engine: nvidia-gpu
services:
server: active
server-webui: active
endpoints:
openai: http://localhost:8336/v1
webui: http://localhost:8337/
model:
name: gemma4-e4b-q4-k-m
Note down the openai endpoint URL as you’ll need it for configuration.
Configure AI Assistant for local models¶
JetBrains IDEs support AI Assistant, which can be configured to use locally hosted models. Open your JetBrains IDE and follow these steps to connect the inference snap:
Ensure AI Assistant is installed¶
AI Assistant comes as a plugin for JetBrains IDEs and may already be installed in your IDE. If not, follow this procedure:
Navigate to Settings > Plugins.
Search for and select JetBrains AI Assistant.
Click the Install button.
You might need to restart your IDE for the installation to take effect.
For more information, please see JetBrains’ page on how to install AI Assistant.
Configure AI Assistant to use the OpenAI endpoint¶
Once AI Assistant is installed, the API endpoint needs to be configured:
Navigate to Settings > Tools > AI Assistant > Providers & API keys.
In the Third-party AI providers section, select OpenAI-compatible as the provider type.
In the configuration panel:
URL: Enter the
openaiAPI endpoint of the installed inference snap (for example,http://localhost:8336/v1).API Key: Leave empty.
Click Test Connection to verify the connection is working correctly.
Scroll to the Models Assignment section.
For each AI Assistant feature group (Core features, Instant helpers, Completion model), select the model from the dropdown.
Core features: Used for in-editor code generation, commit message generation, and AI Chat
Instant helpers: Used for lightweight features like chat context collection and name suggestions
Completion model: Used for inline code completion (requires a Fill-in-the-Middle capable model)
Click Apply to save your changes.
For more information, refer to the JetBrains’ using custom models guide.
Use the inference snap in the IDE¶
Once the model is configured, you can use it in different parts of the IDE. For example, to chat:
Open AI Chat by selecting Tools > AI Assistant from the menu.
In the chat window, select the model from the model selector dropdown. The configured model should appear under the OpenAI-compatible section.
Start typing prompts. The requests will be sent locally to the inference snap.
Tip
For more information about using AI Assistant, refer to the JetBrains AI Assistant documentation.