Tutorial · JetBrains

JetBrains AI with a custom OpenAI API

JetBrains AI Assistant can use a third-party model through its OpenAI-compatible provider. The important part is choosing the right provider type, then assigning the model to the features you actually use.

Short answer. Open Settings | Tools | AI Assistant | Providers & API keys, choose OpenAI-compatible under third-party AI providers, enter https://api.plugsky.com/v1 and your key, enable tool calling if the model supports it, and click Test Connection. Then assign the model to Core features and Instant helpers. The plain OpenAI provider accepts only a key and cannot use a custom base URL.

1. Choose the right provider type

AI Assistant lists several third-party options. They are not interchangeable, and the difference is visible in the fields each one exposes.

Provider optionHas a URL field?Use it when
OpenAINoYou use OpenAI's own endpoint and key.
OpenAI-compatibleYesYou have a base URL, model ID and key from another provider.
AnthropicNoYou use Anthropic's API.
GoogleNoYou use Gemini API or Vertex AI credentials.
LM Studio / OllamaLocalYou run a model on your machine.

If the settings page has no URL field, you selected the wrong option. Back out and choose OpenAI-compatible.

2. Configure and test the endpoint

Open Settings | Tools | AI Assistant | Providers & API keys. In the third-party providers section, select OpenAI-compatible, enter the URL and key, leave tool calling off for the first test, and click Test Connection. When it succeeds, enable tool calling and test again.

curl -s https://api.plugsky.com/v1/models \
  -H "Authorization: Bearer $PLUGSKY_API_KEY" \
  | jq -r '.data[].id' | sort

That command verifies the key and the base URL without involving the IDE. If it fails with 401, the key is wrong. If it fails with 404, the URL has an extra path. Fix that before you debug AI Assistant.

3. Assign models to features

Models from an OpenAI-compatible endpoint are not assigned to AI Assistant features automatically. Until you assign them, they appear only in AI Chat. In the Models Assignment section, choose a model for Core features and one for Instant helpers, then set the context window.

SettingRecommended modelWhy
Core featuresplugsky-coderIn-editor generation and commit messages need a strong coder model and enough context.
Instant helpersplugsky-coder-fastChat titles and context collection do not need a large output budget.
Context window (if shown)262,144Match the model; the default is 64,000, which trims attachments early.

Inline code completion and next-edit suggestions are separate. They use the AI Completion provider, and general chat models are usually a poor fit. Leave JetBrains models for completion unless you have a model trained for fill-in-the-middle.

4. Tool calling and MCP

The Tool calling toggle on the OpenAI-compatible provider controls whether the model can call tools configured through the Model Context Protocol. Turn it on only when the model supports function calling. plugsky-coder does; a small text model may not.

Tool calling here is about MCP tools, not about whether the model can write code. Enabling it does not grant the model access to your filesystem; the IDE and the MCP server still enforce their own permissions. Start with one read-only MCP tool and confirm the call and the result before adding a tool that can write.

5. Privacy and data flow

With a BYOK provider, prompts and context are sent directly to the endpoint you configure, using your key. JetBrains states that when a feature is not supported by the custom model and a JetBrains AI subscription is active, the request may go through the JetBrains AI service instead. In that path, JetBrains says the service coordinates the request but does not store or process the data unless detailed code-related data collection is enabled.

Detailed code-related data collection is disabled by default in the IDE and is opt-in for paid licenses. Non-commercial licenses may have broader analytics enabled by default, which you can turn off under Settings | Appearance & Behavior | System Settings | Data Sharing. Organizations can restrict providers and data sharing through JetBrains IDE Services or JetBrains Central. Privacy terms and retention are contract-dependent: verify the current terms in your agreement and with your administrator rather than relying on a blog post.

6. Limits and troubleshooting

SymptomLikely causeFix
Test Connection failsURL, key or networkRun the curl check; use the base URL ending in /v1.
Connected but no modelsEndpoint does not serve /models or the key lacks accessCheck the model list from the terminal.
Chat works, inline generation does notAI Completion is a separate providerConfigure AI Completion separately or keep JetBrains models.
Model missing from featuresNo assignmentSet Core features and Instant helpers explicitly.
Context errorsContext window set too low or too highMatch the model's real window.
Settings hiddenOrganization policy or region restrictionAsk your administrator; do not assume the option is available.

For the agent design questions, see what to look for in a coding agent. For a raw API request, use the quickstart; for plan limits, see pricing.

FAQ

Does JetBrains AI Assistant support OpenAI-compatible endpoints?

Yes. Choose OpenAI-compatible under third-party AI providers, then supply the base URL, API key and model. The plain OpenAI provider does not expose a URL field.

Which URL should I enter?

Use https://api.plugsky.com/v1. Enter the base URL, not the full /chat/completions path; the IDE appends the endpoint paths.

Do I need a JetBrains AI subscription?

Not for BYOK itself, but some features may be unavailable with a custom model. A subscription keeps JetBrains models available for features your model does not support.

Is my code sent to JetBrains?

With a BYOK provider, prompts go directly to the endpoint you configure. If a feature falls back to the JetBrains AI service, JetBrains says it coordinates the request without storing or processing data unless detailed data collection is enabled. Verify the current terms in your agreement.

Why is my model missing from AI Assistant features?

OpenAI-compatible models are not assigned automatically. Set them explicitly under Models Assignment for Core features and Instant helpers.

Sources checked 20 November 2026: JetBrains third-party and local models; JetBrains providers and API keys; JetBrains data handling. Product behavior, endpoint support and plan limits can change; re-check the primary documentation before production rollout.