Multiple AI model questions when using IntelliJ IDEA Ultimate
Answered
#1 So just to confirm, Jetbrains AI credits are only required when using the “Chat” option inside the AI Assistant, but not when in an “Agent” mode, correct? Does this mode use your own BYOK API Key or does Jetbrains AI query the models directly?
#2 I was able to use the @thisFile mention while using Codex in Agents mode, but @selection isn't working. Is that a “chat” mode only mention?
Please sign in to leave a comment.
Hey there,
Happy to answer both questions.
1. JetBrains AI credits and Agent mode
JetBrains AI credits are only used for JetBrains-hosted features like Junie and cloud code completions. When you use an ACP-compatible agent like Codex, it runs using its own provider credentials (your ChatGPT/OpenAI account), not your JetBrains AI quota.
One thing worth noting: there is a known bug where Codex can incorrectly deduct JetBrains AI credits after a ChatGPT login. This is tracked in https://youtrack.jetbrains.com/issue/LLM-24506. If you notice unexpected credit usage while using Codex, that issue has more details.
2. @selection not working in Agents mode
This is a known bug. @selection is currently not passed as context when using ACP agents like Codex, even though @thisFile works. The issue is tracked here: https://youtrack.jetbrains.com/issue/LLM-26180.
A fix for this was included in the 2026.1.1 release, which enables automatic context (current file and selection) for agents. Could you let us know which IDE version you are on? You can check via Help | About. If you are not yet on 2026.1.1, updating should resolve the @selection issue. You can update via Help | Check for Updates.
If you need further assistance, please open a ticket with the support team: https://www.jetbrains.com/support/