Downsizing logodownsizing
Documentation

Using Downsizing with JetBrains AI Assistant

Route JetBrains AI Assistant's chat, completions, and other features through Downsizing using its built-in Bring Your Own Key (BYOK) third-party provider support.


Not to be confused with Junie

JetBrains AI Assistant is the AI plugin built into IntelliJ IDEA, PyCharm, WebStorm, GoLand, Rider, and other JetBrains IDEs. It is a separate product from Junie, JetBrains' standalone coding agent, which Downsizing also supports. If you're looking to connect Junie instead, see its own integration page.

Prerequisites

Install the Downsizing CLI — see the CLI guide if you haven't already.

Link JetBrains AI Assistant (Recommended)

AI Assistant's third-party provider credentials (API key + custom endpoint URL) are stored through the IDE's own secure credential store, not a plain config file — there is no documented, stable on-disk settings file for this the way there is for e.g. VS Code's settings.json. So ds link jetbrains-ai-assistantdoesn't edit any files. Instead it prints the exact values to paste into the IDE's Providers & API keys settings:

bash
ds link jetbrains-ai-assistant

Copy the printed values into your JetBrains IDE's settings:

  • Open your JetBrains IDE's settings, then go to Tools → AI Assistant → Providers & API keys
  • In the Third-party AI providers section, select Anthropic
  • Paste the printed Downsizing API key and, if a custom URL field is shown, the printed base URL
  • Click Test Connection, then pick a Claude model, e.g. claude-opus-4-8, under Models Assignment

If you'd rather use OpenAI-style routing, pick OpenAI-compatible as the provider instead — ds link jetbrains-ai-assistant prints both sets of values, so use whichever fits your setup.

Manual Setup

You can configure AI Assistant manually without running the CLI. Open Settings → Tools → AI Assistant → Providers & API keys and add a third-party provider:

bash
https://api.downsizing.dev/YOUR_ROUTER_ID/anthropic

Select Anthropic as the provider, enter this URL if a custom endpoint field is shown, your Downsizing API key (starts with dws_) as the API key, and pick a Claude model, e.g. claude-opus-4-8. For OpenAI-compatible routing instead, select the OpenAI-compatible provider and use:

bash
https://api.downsizing.dev/YOUR_ROUTER_ID/openai/v1

Find your Router ID and API key on the Inference API page.

Verify

Open AI Assistant's chat window in your IDE and send a message to confirm traffic is routing through Downsizing. If AI Assistant responds normally, Downsizing is set up correctly. You can also check your savings dashboard to see the request appear in your usage metrics.

Unlinking

Because ds link jetbrains-ai-assistantnever wrote a config file, there's nothing on disk to remove. Run the unlink command to update ds's own record of linked tools, then clear the provider entry directly in your IDE's Settings → Tools → AI Assistant → Providers & API keys:

bash
ds unlink jetbrains-ai-assistant

Spot an error or something not working? Tell us on Discord or email docs@downsizing.dev.