An IntelliJ IDEA plugin for integrating with OpenRouter.ai, providing access to 400+ AI models with usage monitoring, quota tracking, and seamless JetBrains AI Assistant integration.
- π€ AI Assistant Proxy - Configurable local proxy server (ports 8880-8899 by default) with auto-start control and flexible port selection
- π Status Bar Widget - Real-time usage display with comprehensive popup menu
- π Flexible Authentication - OAuth/PKCE or Provisioning Key support with secure credential storage
- π Usage Analytics - Track token consumption, costs, and model performance
- π΄ Real-time Monitoring - Live connection status with color-coded indicators
- π Statistics Popup - Detailed usage analytics in modal dialog
- βοΈ Settings Panel - Configuration with validation and testing
- π OpenAI Compatibility - Full OpenAI API compatibility layer for custom integrations
- π Security - Encrypted API key storage with localhost-only proxy access
- π§ͺ Comprehensive Testing - 475+ tests covering unit, integration, and E2E scenarios
- π οΈ Developer-Friendly - Extensive documentation and debugging capabilities
- β Favorite Models - Quick access to your preferred AI models with advanced filtering:
- Filter by provider (OpenAI, Anthropic, Google, Meta, etc.)
- Filter by capabilities (Vision, Audio, Tools, Image Generation)
- Filter by context length (< 32K, 32K-128K, > 128K)
- Quick presets (Popular, Coding, Multimodal, Cost-Effective)
- Real-time search across 400+ models
- π First-Run Experience - Welcome notification and setup wizard for easy onboarding
- π‘ Contextual Help - GotIt tooltips guide you through key features
- π¨ Code Quality - Maintained with detekt static analysis and comprehensive refactoring
- Open IntelliJ IDEA β
SettingsβPlugins - Search for "OpenRouter" in Marketplace
- Click
Installand restart IDE
- Download the latest release from GitHub
SettingsβPluginsβ βοΈ βInstall Plugin from Disk...- Select the downloaded ZIP file
When you first install the plugin, a welcome notification will appear with a "Quick Setup" button. This launches a step-by-step wizard that guides you through:
- Welcome - Introduction to OpenRouter and what you'll need
- Authentication - Choose your authentication method:
- Regular API Key - OAuth/PKCE flow (one-click browser authorization)
- Provisioning Key - Extended mode with full monitoring capabilities
- Favorite Models - Select your preferred models with embedded search and filtering
- Completion - Copy proxy server URL and configure AI Assistant
The wizard makes setup quick and easy, especially for first-time users!
- Open Settings:
SettingsβToolsβOpenRouter - Choose Authentication Method:
- Regular API Key: Click "Connect to OpenRouter" for OAuth/PKCE browser authorization
- Provisioning Key: Get from OpenRouter Provisioning Keys and paste
- Select Models:
SettingsβToolsβOpenRouterβFavorite Modelsβ Choose your models - Start Using: Click status bar widget to access features
NEW: Connect JetBrains AI Assistant to OpenRouter's 400+ AI models using the plugin's local proxy server!
- Configure OpenRouter Plugin (as above)
- Configure Proxy Server: Auto-start is disabled by default - manually start via Settings or enable auto-start
- Configure AI Assistant: Settings β Tools β AI Assistant β Models β Add custom model
- Provider: Custom
- Server URL: Copy from OpenRouter settings (e.g.,
http://127.0.0.1:8880) - API Key: Any text (not validated by proxy)
- Model: Choose from OpenRouter's model catalog
- Start Using: Access 400+ models through AI Assistant
π Complete Setup Guide - Step-by-step instructions with screenshot placeholders
- OpenAI: GPT-4o, GPT-4 Turbo, o1, o3-mini
- Anthropic: Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku
- Meta: Llama 3.3, Llama 3.1, Code Llama
- Google: Gemini 2.0 Flash, Gemini 1.5 Pro
- Mistral: Mistral Large, Mixtral 8x22B
- DeepSeek: DeepSeek V3, DeepSeek R1
- And 390+ more models from 40+ providers!
- β Unified Interface - Use AI Assistant's familiar chat interface
- β Cost Control - Transparent pricing and real-time usage monitoring
- β Model Switching - Easy switching between different AI providers
- β Local Proxy - Secure localhost-only communication
- β No Limits - Access models beyond AI Assistant's default options
- Click: Open popup menu with plugin features
- Status Indicators: Color-coded connection status (Ready, Connecting, Error, Not Configured)
- Usage Display: Current quota usage and cost information
- AI Assistant Integration: Start/stop proxy server with status display
- View Quota Usage: Detailed statistics and analytics
- Settings: Direct access to plugin configuration
- Configuration Instructions: Setup guide for AI Assistant integration
- Documentation: Links to OpenRouter API documentation
- Logout: Clear stored credentials
Access via Settings β Tools β OpenRouter β Proxy Server section:
- Auto-start: Control whether proxy starts automatically on IDEA launch (disabled by default)
- Port Selection: Choose specific port or auto-select from configurable range
- Port Range: Configure port range for auto-selection (default: 8880-8899)
- Immediate Application: Start Proxy button applies current settings without requiring Apply/OK
- Conflict Avoidance: Default range avoids common development ports (8080, 8000, etc.)
- Manual Control: Start/stop proxy server on demand from settings panel
proxyAutoStart = false // Auto-start on IDEA launch
proxyPort = 0 // Specific port (0 = auto-select)
proxyPortRangeStart = 8880 // Range start for auto-selection
proxyPortRangeEnd = 8899 // Range end for auto-selection- Jetty Proxy Server - Configurable embedded HTTP server (default ports 8880-8899) with flexible port selection and auto-start control
- OpenRouter API Client - Handles authentication, quota tracking, and model access
- Settings Management - Encrypted credential storage with validation
- Status Bar Integration - Real-time monitoring with minimal UI footprint
The plugin supports two authentication methods:
- Regular API Key (OAuth/PKCE) - One-click browser authorization, minimal permissions, no usage monitoring
- Provisioning Key (Extended) - Full functionality with quota tracking, usage monitoring, and API key management
- Security - All keys encrypted using IntelliJ's credential store
- Validation - Real-time key testing and status verification
Supported IDEs: IntelliJ IDEA, WebStorm, PyCharm, PhpStorm, RubyMine, CLion, Android Studio, GoLand, Rider IDE Versions: 2024.1+ to 2025.3+ Requirements: OpenRouter.ai account (free or paid)
See DEVELOPMENT.md for development setup and contribution guidelines.
git clone https://github.com/DimazzzZ/openrouter-intellij-plugin.git
cd openrouter-intellij-plugin
./gradlew build# Run all tests (475+ tests)
./gradlew test
# Run core functionality tests only
./gradlew test --tests "*ChatCompletionServletTest*" --tests "*FavoriteModelsServiceTest*"
# Run with development IDE for manual testing
./gradlew runIde --no-daemonThe plugin supports installation, updates, and uninstallation without IDE restart (dynamic plugin).
Quick Test (Enable/Disable):
# Start development IDE and test enable/disable
./scripts/test-enable-disable.sh
# In the IDE: Settings β Plugins β Toggle OpenRouter OFF/ON
# Should work without restart β
Full Test (Multiple Versions):
# Build 3 test versions (0.4.0, 0.4.1, 0.4.2)
./scripts/build-test-versions.sh
# Install v0.4.0 (may require restart on first install)
# Update to v0.4.1 (should NOT require restart)
# Update to v0.4.2 (should NOT require restart)See LOCAL_DYNAMIC_PLUGIN_TESTING.md for detailed testing instructions.
Test Coverage: 475+ tests with 100% pass rate
- Unit tests for data models, settings, and business logic
- Integration tests for API key handling and proxy server functionality
- Authentication tests with MockWebServer for realistic HTTP testing
- Security tests for API key handling and encryption
For detailed testing information, see TESTING.md.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Documentation: OpenRouter API Docs
- Issues: GitHub Issues
- OpenRouter Community: OpenRouter Discord
This project is licensed under the MIT License - see the LICENSE file for details.
This is an unofficial plugin and is not affiliated with OpenRouter.ai.