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 type | Value |
|---|---|
| OpenAI Compatible | https://ai.afp.net/v1 |
| Custom Anthropic | https://ai.afp.net (no /v1) |
2. Using the Continue plugin (recommended general path)
- Install Continue from the JetBrains plugin marketplace.
- Open the Continue configuration (usually a local
config.json/config.yaml; refer to the plugin's current documentation). - Add an OpenAI-compatible model, for example (JSON outline):
{
"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".
- 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":
- Open Settings → Tools → AI Assistant (or a similar menu).
- Select a custom / OpenAI-compatible provider.
- Enter the API Key and Base URL (most require
/v1). - 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.
5. Recommended models
| Scenario | Model ID |
|---|---|
| Everyday Java / Kotlin development | claude-sonnet-4-6 |
| Complex architecture / long reasoning | claude-opus-4-8, claude-opus-5 |
| Quick Q&A | claude-haiku-4-5, gemini-3.5-flash |
| Chinese documents / Tongyi | qwen3.8-max, glm-5.3 |
For the full list, see Help Center.
6. Troubleshooting
| Symptom | Fix |
|---|---|
| 401 | Leading or trailing spaces in the key, or using the console login cookie instead of an sk- token |
| 404 | Check whether /v1 is missing from the OpenAI-compatible URL |
| Invalid model | Check that the ID matches /v1/models exactly (including the date suffix) |
| Timeout | Reasoning models are slow to return the first chunk; increase the plugin timeout, or switch to flash/haiku |
| No available channel | The model is not in the token's group → change the group or the model |
Back to: Help Center