JetBrainer here. I use OpenCode and Pi connected to local models and to stuff like hosted DeepSeek all the time. Once you have your model config set up in the agent, it works as expected.
Note https://youtrack.jetbrains.com/projects/LLM/issues/LLM-17450... is still open although https://youtrack.jetbrains.com/issue/LLM-16479/Be-able-to-ac... appears to be closed as completed now