Skip to content

IntelliJ IDEA / JetBrains Configuration Guide ​

Last updated: October 17, 2026 (Asia/Shanghai)

Related: Help Center · LLM API · VS Code

Applies to: JetBrains IDEs such as IntelliJ IDEA, Android Studio, PyCharm, and WebStorm. The common integration paths are plugins such as Continue and Proxy AI, or the IDE's built-in AI Assistant with a custom OpenAI-compatible endpoint (depending on version and license).


1. Prepare a token ​

Create a token in the console (e.g. jetbrains) and copy sk-xxxxxxxx. A dedicated quota cap is recommended.

Base URL cheat sheet:

Protocol typeValue
OpenAI Compatiblehttps://ai.afp.net/v1
Custom Anthropichttps://ai.afp.net (no /v1)

  1. Install Continue from the JetBrains plugin marketplace.
  2. Open the Continue configuration (usually a local config.json / config.yaml; refer to the plugin's current documentation).
  3. Add an OpenAI-compatible model, for example (JSON outline):
json
{
  "models": [
    {
      "title": "TokenExplore Claude Sonnet",
      "provider": "openai",
      "model": "claude-sonnet-4-6",
      "apiBase": "https://ai.afp.net/v1",
      "apiKey": "sk-xxxxxxxx"
    },
    {
      "title": "TokenExplore Gemini",
      "provider": "openai",
      "model": "gemini-3.1-pro",
      "apiBase": "https://ai.afp.net/v1",
      "apiKey": "sk-xxxxxxxx"
    }
  ]
}

Field names may change to apiBase / baseURL and so on across major Continue versions; follow the examples shipped with the plugin and keep the meaning of "root URL + /v1".

  1. After saving, select the model in the Continue panel and send a test message.

3. Built-in AI Assistant / other commercial plugins ​

If your JetBrains AI features support a "third-party OpenAI API":

  1. Open Settings → Tools → AI Assistant (or a similar menu).
  2. Select a custom / OpenAI-compatible provider.
  3. Enter the API Key and Base URL (most require /v1).
  4. For the model name, enter the real platform ID (e.g. claude-sonnet-4-6), not a name that does not exist in the console.

Menu paths vary considerably between versions; if you cannot find a custom endpoint, use Continue instead, or use Claude Code / OpenCode in the terminal.


4. HTTP proxy and corporate networks ​

  • If the IDE uses a system proxy, make sure it can reach your https://ai.afp.net.
  • In environments with self-signed certificates, you may need to import the certificate into the JVM / IDE trust store; otherwise the TLS handshake fails.
  • A gateway address that only listens on the internal network cannot be reached outside the office network — this has nothing to do with the key.

ScenarioModel ID
Everyday Java / Kotlin developmentclaude-sonnet-4-6
Complex architecture / long reasoningclaude-opus-4-8, claude-opus-5
Quick Q&Aclaude-haiku-4-5, gemini-3.5-flash
Chinese documents / Tongyiqwen3.8-max, glm-5.3

For the full list, see Help Center.


6. Troubleshooting ​

SymptomFix
401Leading or trailing spaces in the key, or using the console login cookie instead of an sk- token
404Check whether /v1 is missing from the OpenAI-compatible URL
Invalid modelCheck that the ID matches /v1/models exactly (including the date suffix)
TimeoutReasoning models are slow to return the first chunk; increase the plugin timeout, or switch to flash/haiku
No available channelThe model is not in the token's group → change the group or the model

Back to: Help Center