Direct answer: GitHub Copilot for JetBrains now lets you connect an API key and an OpenAI-compatible custom endpoint so you can use your own model. Update the GitHub Copilot plugin first, collect the endpoint URL, model ID and API key from your provider, then configure and test the provider with a harmless prompt. Do not paste a real key into source code, chat, screenshots or a repository.
Quick setup worksheet
| Item | What to prepare | Safe check |
|---|---|---|
| Plugin | Latest GitHub Copilot plugin for your JetBrains IDE | Install only from JetBrains Marketplace |
| Base URL | Your provider’s OpenAI-compatible API endpoint | Confirm the hostname from official provider documentation |
| API key | A new, restricted key if the provider supports restrictions | Never commit or share it |
| Model ID | The exact model identifier exposed by the endpoint | Confirm tool/function calling and streaming support |
| Test | A small non-sensitive sample project | Do not begin with private production code |
What changed in GitHub Copilot for JetBrains?
GitHub announced the JetBrains update on July 14, 2026. The headline change is BYOK—“bring your own key”—support for OpenAI-compatible custom endpoints. GitHub also reports a fuller plugin-management experience, Claude agent-provider customizations, local sandbox settings, a built-in debugger skill for Copilot CLI sessions, and improvements to model selection, authentication recovery and provider persistence.
Some capabilities remain previews. GitHub labels Claude agent-provider customizations for Copilot Pro and higher as a public preview, and local sandboxing is also a public preview. Preview features can change, so test them before making them part of a critical team workflow.
How to configure a BYOK custom endpoint safely
1. Update the official plugin
Use the JetBrains Marketplace listing linked by GitHub to install the latest GitHub Copilot plugin version compatible with your IDE. Restart the IDE if requested. If the custom-provider option is missing, confirm the plugin actually updated and that you are not running an older IDE build with an incompatible plugin release.
2. Prepare provider details
- Base URL: the API root supplied by the provider, not its marketing homepage.
- API key: preferably a dedicated key with a spending cap, project restriction or short rotation period.
- Model ID: copy the exact identifier; display names and API identifiers are not always the same.
- Compatibility: confirm that the endpoint follows the OpenAI-compatible interface expected by the plugin.
3. Add the provider in Copilot settings
Open GitHub Copilot’s settings or provider configuration in the JetBrains IDE and choose the custom/OpenAI-compatible provider option. Enter the base URL, key and model identifier supplied by your provider. The precise labels can differ by plugin build, so follow the current in-product wording rather than an old screenshot.
4. Run a low-risk test
Start with a prompt such as “Explain this small function and suggest one unit test” in a throwaway project. Confirm that the selected custom model answers, tool calls work when needed, and the provider dashboard records the expected request. Check latency and token usage before opening a large repository.
5. Review data handling
BYOK changes where model requests are processed and billed; it does not automatically make every endpoint private. Review your model provider’s retention, training, regional-processing and logging terms. For company code, obtain approval before sending repository context to a new endpoint.
Optional CLI fallback for testing an endpoint
GitHub’s separate Copilot CLI documentation provides a useful way to validate provider details. It documents these environment variables: COPILOT_PROVIDER_BASE_URL, COPILOT_PROVIDER_API_KEY, COPILOT_PROVIDER_TYPE and COPILOT_MODEL. The CLI supports OpenAI-compatible endpoints, Azure OpenAI and Anthropic.
export COPILOT_PROVIDER_BASE_URL="https://YOUR-PROVIDER.example/v1" export COPILOT_PROVIDER_API_KEY="YOUR-API-KEY" export COPILOT_MODEL="YOUR-MODEL-ID" copilot
Use placeholders in documentation and shell history examples. Do not store a real key in a shared script. GitHub says CLI models must support tool/function calling and streaming, and recommends a context window of at least 128k tokens for best results. These are documented CLI requirements; verify the current JetBrains plugin requirements separately if your endpoint behaves differently.
Local sandbox checklist
The JetBrains release adds local sandbox settings and configuration flows, while GitHub’s sandbox documentation explains the underlying safety goal: restrict access to files, network resources and system capabilities when Copilot executes commands. GitHub currently describes sandboxing as a public preview.
- Start with the narrowest filesystem and network access that completes the task.
- Do not expose password stores, SSH keys, cloud credentials or production environment files.
- Review commands before execution, especially package installs and destructive file operations.
- Test on a branch or disposable repository.
- Remember that a sandbox limits execution access; it does not replace provider privacy review.
For Copilot CLI, GitHub documents /sandbox enable for local sandboxing. Its documentation lists macOS and Linux support, with Windows support on Windows Insider builds, and notes that behavior varies by platform.
Troubleshooting custom endpoints
- 401 or 403: rotate or re-enter the key, check project permissions and verify that the endpoint accepts that credential type.
- 404: check the base path and model ID. A provider’s console URL is usually not its API base URL.
- Model connects but tools fail: confirm tool/function calling and streaming support.
- Option is missing: update the plugin, verify IDE compatibility and restart the IDE.
- Unexpected cost: stop testing, inspect provider usage logs, add a spend cap and use a smaller test context.
- Requests reach the wrong host: remove the provider configuration immediately and rotate the exposed key.
Frequently asked questions
Does JetBrains Copilot BYOK support any model?
No. GitHub specifically announced support for OpenAI-compatible custom endpoints in the JetBrains plugin. Compatibility still depends on the endpoint and model capabilities. Test before relying on a model for agentic work.
Is BYOK free?
BYOK does not mean the model is free. Your provider may charge for API usage. Copilot plan requirements and feature availability can also vary, so check the current GitHub plan and provider pricing pages before rollout.
Can I use a local model?
GitHub’s Copilot CLI documentation explicitly supports local OpenAI-compatible services such as Ollama. The July 14 JetBrains announcement confirms custom OpenAI-compatible endpoints but does not list every tested local runtime, so treat JetBrains local-model compatibility as something to verify with your plugin and model.
Is local sandboxing generally available?
No. GitHub labels local sandboxing as a public preview and says it is subject to change.
Official sources
- GitHub Changelog: Copilot for JetBrains expands BYOK capabilities
- GitHub Docs: Using your own LLM models in Copilot CLI
- GitHub Docs: About cloud and local sandboxes
- JetBrains Marketplace: GitHub Copilot plugin versions
Last checked: July 15, 2026. Preview behavior, plan eligibility and interface labels may change.