Skip to content

About

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

Topics

Resources

Stars

19 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

170 Commits

Folders and files

Repository files navigation

OpenRouter logo

OpenRouter IntelliJ Plugin

JetBrains Plugin Version CI Coverage License: Apache 2.0

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.7.0

  • πŸ“‹ Requests Tab - Every request the plugin sends to OpenRouter, from the chat and from tools using the proxy, in one list: who sent it, the model and provider that answered, tokens, cost and stop reason, with a balloon when one goes wrong. Keeping prompts and replies is opt-in
  • 🧭 Routers Hub - OpenRouter's routers (openrouter/auto, fusion, pareto-code, fusion-flash and free) are first-class: AI Assistant and every other tool using the proxy see them in their model list, a Router Defaults page sets each router's parameter once, the chat has a router picker, and a routed reply says which model it was routed to
  • 🧩 Models Paired With Presets - "Add with Preset" serves <model>@preset/<slug> as its own model, so tools that can only pick a model id (AI Assistant first among them) get a preset's web search, output format and routing
  • πŸ“Š Status Tab Redesign - The real account balance, shared with the status bar, a spend trend with a days-left estimate and spend by model; with an ordinary API key it shows that key's own spend and cap instead of an error
  • 🚦 Clear Errors for Tools Using the Proxy - A request that cannot work is refused up front with an error naming the settings page that fixes it
  • πŸ”Ž Web Search and Structured Output in the Chat - Per-message web search, plain JSON or a saved Output Schema, with new Web Search and Output Schemas settings pages; under every reply, the model, provider, cost and searches that produced it
  • πŸ’¬ Chat Redesign - Message bubbles, send parameters in a gear popup, and a composer that survives a narrow tool window without clipping long replies
  • 🌍 In-Region Routing - Pin every request to OpenRouter's EU or US endpoint, offered only where your keys allow it
  • βš–οΈ Apache-2.0 - The plugin is relicensed from MIT to Apache-2.0

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
πŸ“‹ Requests Tab Every request from the chat and from tools using the proxy, with model, provider, tokens and cost
🧭 Routers OpenRouter's routers (openrouter/auto, fusion, pareto-code, …) with per-router defaults
🎯 Presets Your OpenRouter presets, edited in the IDE and paired with a model for tools that can only pick a model
πŸ“Š 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
🌍 In-Region Routing Pin every request to OpenRouter's EU or US endpoint (Business/Enterprise accounts)

Scope

This plugin brings OpenRouter specifically into JetBrains IDEs. Everything it offers beyond forwarding a request is built on OpenRouter's own API: the curated model list that becomes your AI Assistant dropdown, variant suffixes such as :free and :nitro, provider routing defaults, presets, and credit and spend figures read from OpenRouter rather than reconstructed from local logs.

It is deliberately not two other things:

  • Not a generic LLM gateway. The proxy's base URL selects among OpenRouter's own endpoints; it does not point at other providers. If you want one endpoint in front of many providers, with virtual keys, budgets and rate limits, LiteLLM is built for that and does it better than this plugin could.
  • Not a coding agent. JetBrains ships its own, and several editor agents reach OpenRouter directly. For agentic work the supported combination is this plugin for inference, AI Assistant for the agent loop, and MCP servers for tool execution β€” see step 3.1 of the setup guide.

The reasoning, including what this rules out, is recorded in ADR-0006.

Installation

From Plugin Marketplace

  1. Open IntelliJ IDEA β†’ Settings β†’ Plugins
  2. Search for "OpenRouter" in Marketplace
  3. Click Install (no restart required!)

Manual Installation

  1. Download the latest release from GitHub Releases
  2. Settings β†’ Plugins β†’ βš™οΈ β†’ 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 Management Key
  2. Favorite Models - Select your preferred models with search and filtering
  3. Proxy Setup - Configure AI Assistant integration

Manual Setup

  1. Open Settings: Settings β†’ Tools β†’ OpenRouter
  2. Authenticate: Click "Connect to OpenRouter" for OAuth/PKCE, or paste a Management Key
    • A Management Key reads your account; an ordinary API key reads itself. With a Management Key (OpenRouter's own page still titles it "Provisioning Keys") the Status tab shows your credit balance, spend history and per-model breakdown, and the spend cap across every key on the account. With an ordinary API key it shows that key's own spend and cap, plus the spend this plugin recorded locally β€” everything account-wide stays empty and says why. Either key sends chat requests.
  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 Settings β†’ Tools β†’ OpenRouter
  2. Mark the models you want in Settings β†’ Tools β†’ OpenRouter β†’ Favorite Models β€” AI 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: Settings β†’ Tools β†’ AI Assistant β†’ Providers & API keys β†’ Third-party AI providers β†’ OpenAI-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 View β†’ Tool Windows β†’ OpenRouter:

  • 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
  • Reply Summary - Under every reply: the model that answered (or the one a router chose), the provider and the cost

Chat tab in the OpenRouter tool window

Requests Tab

Every request the plugin sends to OpenRouter, from the chat and from tools using the proxy, newest first: who sent it, the model asked for and the one that answered, the provider, tokens, cost, stop reason and duration. Filter by sender or model, fold bursts from one tool into one row, and open a request's own log on openrouter.ai. Keeping each request's prompt and reply is opt-in.

Requests tab with a burst of AI Assistant requests expanded and one request's details

Routers

OpenRouter's routers (openrouter/auto, openrouter/fusion, openrouter/pareto-code, openrouter/fusion-flash, openrouter/free) appear in every tool's model list and in the chat's model picker. Settings β†’ Tools β†’ OpenRouter β†’ Router Defaults sets each router's parameter once; the proxy applies it unless a tool sends its own.

Router Defaults settings page

Presets

Manage presets in Settings β†’ Tools β†’ OpenRouter β†’ Presets:

  • Your OpenRouter Presets - Read from your OpenRouter account, created and edited in a dialog that lists every setting a preset can have
  • Models Paired With Presets - "Add with Preset" in Favorite Models serves <model>@preset/<slug> as its own model, so a tool that can only pick a model gets the preset's settings
  • Chat Integration - Picking a pair fills the chat's send parameters from its preset, and "Save as Preset…" saves them back

Presets settings page

Preset editing dialog

Web Search

Settings β†’ Tools β†’ OpenRouter β†’ Web Search sets the engine, the number of results, allowed and excluded domains and the mode once, for every chat message sent with web search on and every tool request that asks for a search.

Web Search settings page

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
  • Status Tab - Your account balance, a spend trend and spend by model or by API key over 24 hours, 7 or 30 days

Status tab with balance, spend trend and spend by model

View Quota Usage dialog

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

Apache License 2.0 - 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 400+ AI models with usage monitoring and quota tracking.

Topics

Resources

Stars

19 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages