Skip to content

Repository files navigation

OpenRouter logo

OpenRouter IntelliJ Plugin

JetBrains Plugin Version CI Coverage License: MIT

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.

What's New in v0.6.0

  • 🎛️ Presets CRUD via OpenRouter API - Settings → Presets now lists, creates, and updates your OpenRouter presets over the API (no more hand-typed slugs); server-side tools config is preserved verbatim
  • ⭐ Favorite Models Page Redesign - One catalog table with a favorite checkbox, favorites-only reorder mode (drag/Alt+↑↓), provider/context/variant/capability filters, and column sorting
  • 🏷️ Model Variants - Model-ID suffixes (:free, :nitro, :exacto, :floor, :batch) parse into structured values with colored chips and a catalog-driven variant filter
  • 🎛️ Provider Routing - New settings sub-page for global routing defaults, injected into outbound requests without ever overwriting client-supplied provider/models[]
  • 🔧 Streaming Tool-Call Support - Streaming delta.tool_calls are reassembled correctly, unblocking AI Assistant Agent Mode
  • 🎨 Brand Refresh - All plugin icons redrawn to the current OpenRouter brand glyph (theme-aware, HiDPI)

Key Features

Feature Description
💬 Chat Tool Window Multi-chat sessions in IDE sidebar with persistent history and token tracking
🤖 AI Assistant Proxy Local OpenAI-compatible proxy connecting AI Assistant to 400+ models
🎯 Custom Presets Built-in and custom OpenRouter presets for quick model selection
📊 Usage Analytics Real-time cost tracking, quota monitoring, and spending estimates
⭐ Favorite Models Quick access with filtering by provider, capabilities, and context length
🔐 Secure Storage OS-native credential storage (Keychain, Credential Manager, libsecret)
🔌 Plugin API Extension point for other plugins to receive balance data

Installation

From Plugin Marketplace

  1. Open IntelliJ IDEA → SettingsPlugins
  2. Search for "OpenRouter" in Marketplace
  3. Click Install (no restart required!)

Manual Installation

  1. Download the latest release from GitHub Releases
  2. SettingsPlugins → ⚙️ → Install Plugin from Disk...
  3. Select the downloaded ZIP file

Quick Start

First-Time Setup

When you first install the plugin, a welcome notification will appear with a "Quick Setup" button. The wizard guides you through:

  1. Authentication - Choose OAuth/PKCE (one-click) or Provisioning Key
  2. Favorite Models - Select your preferred models with search and filtering
  3. Proxy Setup - Configure AI Assistant integration

Manual Setup

  1. Open Settings: SettingsToolsOpenRouter
  2. Authenticate: Click "Connect to OpenRouter" for OAuth/PKCE, or paste a Provisioning Key
  3. Select Models: Go to Favorite Models tab and choose your models
  4. Start Using: Click the status bar widget to access features

AI Assistant Integration

Connect JetBrains AI Assistant to OpenRouter's 400+ models:

  1. Start the proxy server in SettingsToolsOpenRouter
  2. Mark the models you want in SettingsToolsOpenRouterFavorite ModelsAI Assistant lists your favorites (with an empty list the proxy falls back to a small default set, but starring what you want is the reliable path)
  3. In AI Assistant: SettingsToolsAI AssistantProviders & API keysThird-party AI providersOpenAI-compatible
    • Server URL: Copy from OpenRouter settings (e.g., http://127.0.0.1:8880)
    • API Key: Leave empty (authentication is handled by the OpenRouter plugin)
    • Menu labels vary slightly across AI Assistant versions — see the Complete Setup Guide for version notes

📖 Complete Setup Guide with screenshots

OpenRouter settings panel in IntelliJ IDEA

Features

Chat Tool Window

Access via ViewTool WindowsOpenRouter:

  • Multi-Chat - Create and manage multiple conversation sessions
  • Model Selection - Choose from favorites or use presets
  • Persistent History - Chats saved locally and restored on restart
  • Token Tracking - Real-time estimation for input and cumulative counts
  • Keyboard Shortcuts - Enter to send, Cmd/Ctrl+Enter for newline

Custom Presets

Manage presets in SettingsToolsOpenRouterPresets:

  • Built-in Presets - openrouter/auto (best model for task) and openrouter/free (free models only)
  • Custom Presets - Add your own presets created at OpenRouter Presets
  • Chat Integration - Presets appear at the top of model selector with @preset/ prefix

Usage Monitoring

  • Status Bar Widget - Real-time usage display with color-coded connection status
  • Statistics Popup - Detailed analytics with days remaining estimate
  • Cost Tracking - Accurate "Today" statistics with local tracking

Extension API (for Plugin Developers)

Other plugins can receive balance updates via the balanceProvider extension point:

<extensions defaultExtensionNs="org.zhavoronkov.openrouter">
    <balanceProvider implementation="com.example.MyBalanceProvider"/>
</extensions>

See the CHANGELOG for API details and the BalanceProvider interface in the source code.

Compatibility

Supported IDEs IntelliJ IDEA, WebStorm, PyCharm, PhpStorm, RubyMine, CLion, Android Studio, GoLand, Rider
IDE Versions 2025.3+ and all future versions
Requirements Java 21+, OpenRouter.ai account (free or paid)

Development

See DEVELOPMENT.md for build instructions, testing, and contribution guidelines.

For cutting or re-running a release, see docs/RELEASING.md.

Legal & Privacy

Support

License

MIT License - see LICENSE for details.


This is an unofficial plugin and is not affiliated with OpenRouter, Inc or JetBrains.

The OpenRouter name and logos are trademarks of OpenRouter, Inc. The branded assets bundled with this plugin (the plugin icon and the tool-window, status-bar, badge, and logo SVGs) belong to OpenRouter, Inc and are used here for identification purposes only, per OpenRouter's published brand assets. They are not claimed as the plugin author's own work. See NOTICE for the full attribution.

About

An IntelliJ IDEA plugin for integrating with OpenRouter.ai, providing access to 300+ AI models with usage monitoring and quota tracking.

Topics

Resources

Stars

18 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages