Supercharge the JetBrains AI Assistant by running models like GPT-4, Gemini 1.5 Pro, and DeepSeek through your local Ollama instance using your own API keys.
This plugin acts as a bridge between the JetBrains AI Assistant and powerful, proprietary AI models. It allows you to configure models like OpenAI's ChatGPT, Google's Gemini, and DeepSeek as local models within your Ollama instance.
By doing so, you can use these advanced models directly inside the JetBrains AI Assistant, all while leveraging your own API keys for privacy, control, and access to the latest versions. The plugin provides a simple GUI to manage your models and securely stores your API keys in the IDE's password safe.
The JetBrains AI Assistant is fantastic, but you are limited to the models it provides. Ollama is excellent for running local, open-source models. This plugin combines the best of both worlds:
- Use Any Model: Access powerful models like GPT-4o, Gemini 1.5 Pro, and others that are not natively available in the AI Assistant.
- Use Your Own API Keys: Avoid shared rate limits and potential data privacy concerns by using your own personal or team API keys.
- Seamless Integration: Once configured, your custom models appear as regular Ollama models, available for selection directly within the JetBrains AI Assistant chat.
- Simplicity: No need to manually create complex
Modelfileconfigurations or run a separate proxy server. The plugin handles it all.
- Simple GUI: A dedicated tool window to add, configure, and remove custom API-backed models.
- Major Provider Support: Built-in support for OpenAI (ChatGPT), Google (Gemini), and DeepSeek.
- Secure API Key Storage: API keys are stored securely using the IDE's built-in password safe.
- Automatic Ollama Configuration: The plugin dynamically configures Ollama to proxy requests for your custom models to the appropriate cloud API.
- Ollama: You must have the Ollama application installed and running on your local machine.
- JetBrains AI Assistant: The AI Assistant plugin must be installed and enabled in your IDE.
- API Keys: You need your own API key for each service you wish to use (e.g., an OpenAI API key).
- Go to
Settings / Preferences>Plugins. - Search for "Ollama Forward" in the Marketplace tab.
- Click
Installand restart the IDE if prompted.
(Note: Once published, the links at the top of this README will need to be updated with your plugin's numeric ID from the JetBrains Marketplace.)
First, you must tell the JetBrains AI Assistant to use your local Ollama instance as its provider.
- Open the AI Assistant settings:
Settings / Preferences>Tools>AI Assistant. - Under "LLM Provider," select Ollama.
- Ensure the Ollama server URL is correct (usually
http://localhost:11434).
Now, use this plugin to add a cloud model (like ChatGPT) to your Ollama instance.
- Open the Ollama Forward tool window:
View>Tool Windows>Ollama Forward. - Click the
+(Add Model) button. - In the dialog:
- Model Name: Give your model a local name, e.g.,
gpt-4o. This is the name you will use to call it. - Provider: Select the cloud service, e.g., "OpenAI (ChatGPT)".
- API Key: Paste your API key from the provider. It will be stored securely.
- Click
Save. The plugin will configure Ollama in the background.
You can now chat with your new model directly in the AI Assistant.
- Open the AI Assistant chat window.
- In the chat input, type
/or click the model selection button. - Your custom model (e.g.,
gpt-4o) will now appear in the list of available Ollama models. - Select it and start chatting! All requests will be routed through your local Ollama to the cloud provider using your API key.
Want to contribute? Please feel free to submit a pull request!
- Prerequisites: JDK 21 and IntelliJ IDEA 2024.2 or newer.
- Clone:
git clone https://github.com/intisy/ollama-forward.git - Build:
./gradlew build - Run for Testing:
./gradlew runIde
This project is licensed under the MIT License. See the LICENSE file for details.