Skip to content

How to use uncensored abliterated models with GitHub Copilot CLI

Run GitHub Copilot CLI on abliterated DeepSeek and GLM models with its own-provider variables, no Copilot subscription needed. Tested on Copilot CLI 1.0.117.

Published Updated 3 min read

GitHub Copilot CLI can run on your own model provider. A handful of environment variables point it at any OpenAI-compatible API, so you can use an uncensored, abliterated model, without a GitHub sign-in or a Copilot subscription. We ran Copilot CLI 1.0.117 on CommentLLM's abliterated DeepSeek V4.1 Flash model and it fixed a real bug.

The short version: set COPILOT_PROVIDER_BASE_URL to https://api.commentllm.com/v1, COPILOT_PROVIDER_API_KEY to your CommentLLM key and COPILOT_MODEL to deepseek-v4.1-flash-abliterated, add the two token limits, set COPILOT_OFFLINE=true, and run copilot.

How a coding agent connects to an abliterated model: the agent sends prompts to the CommentLLM API, which passes them to the model and returns its tool calls

What you need

  • GitHub Copilot CLI. We used version 1.0.117, installed with npm install -g @github/copilot.
  • A CommentLLM API key. Create one under Keys in the console after you sign up and add credit.

Step 1: set the provider variables

export COPILOT_PROVIDER_BASE_URL="https://api.commentllm.com/v1"
export COPILOT_PROVIDER_API_KEY="cllm_..."
export COPILOT_MODEL="deepseek-v4.1-flash-abliterated"
export COPILOT_PROVIDER_MAX_PROMPT_TOKENS=1000000
export COPILOT_PROVIDER_MAX_OUTPUT_TOKENS=32768
export COPILOT_OFFLINE=true
Variable Why
COPILOT_PROVIDER_BASE_URL Sends model requests to this API instead of GitHub's
COPILOT_PROVIDER_API_KEY The key for that API
COPILOT_MODEL The model ID to request
COPILOT_PROVIDER_MAX_PROMPT_TOKENS and COPILOT_PROVIDER_MAX_OUTPUT_TOKENS The model's limits. Copilot CLI needs them for a model that is not in its catalog
COPILOT_OFFLINE=true Skips GitHub sign-in, telemetry, the automatic update and the GitHub MCP server, so only your provider is contacted

The provider type defaults to OpenAI and the wire format to Chat Completions, which is what CommentLLM serves at this URL, so neither needs setting. copilot help providers and copilot help environment list every option.

Put the lines in a file you source, or in your shell profile, to keep them between sessions. You can also add a provider from inside the CLI with /model; it is saved in providers.json in Copilot's home folder, and COPILOT_PROVIDER_BASE_URL overrides it when set.

Step 2: start Copilot CLI

Run copilot in your project and confirm that you trust the folder. The model ID appears at the bottom right.

GitHub Copilot CLI 1.0.117 starting with deepseek-v4.1-flash-abliterated shown in the status bar

Step 3: give it a task

Our test project had a log-triage script with a bug: it counted failed SSH logins by username instead of by source address, so both tests failed. We asked:

The test suite fails. Run the tests, find the bug in auth_triage.py and fix it. Then run the tests again.

Copilot CLI starts in manual approval mode and asks Do you want to run this command? before each shell command.

GitHub Copilot CLI asking whether to run a command

It ran the tests, changed one line and ran them again: 2 passed.

GitHub Copilot CLI on DeepSeek V4.1 Flash Abliterated fixing the bug in auth_triage.py, with 2 passed

Common problems and fixes

What you see Why Fix
Copilot CLI asks you to log in to GitHub COPILOT_OFFLINE is not set, so it still tries GitHub sign-in export COPILOT_OFFLINE=true along with the provider variables
Authentication error COPILOT_PROVIDER_API_KEY is empty in this shell Export it again
A prompt before every command Manual approval is the default mode Approve each one, or change the mode in a sandbox

Which model to use

Start with deepseek-v4.1-flash-abliterated, the model that fixed the bug here. glm-5.3-abliterated is the one to try for harder reasoning. Both take text only, so image input does not work. If the agent feels slow, switch the model ID to deepseek-v4.1-flash-abliterated-fast: it is the same model served about five times faster, at the same input and output rates and a higher cached-input rate. The pricing page lists every model and its rate.

Run it in a sandbox

Abliterated models refuse far fewer requests than standard ones, and that includes commands an agent should not run on your machine. Try it first in a throwaway project, as we did, and review what the model writes before you ship it.

Setting up a different agent? Uncensored coding AI lists every agent we tested, with a guide for each.

Questions

Can GitHub Copilot CLI use uncensored or abliterated models?

Yes. Copilot CLI accepts your own OpenAI-compatible provider through environment variables. We ran Copilot CLI 1.0.117 on DeepSeek V4.1 Flash Abliterated through CommentLLM, and it fixed a failing test.

Do I need a Copilot subscription to use my own model in Copilot CLI?

Not in our test. With COPILOT_PROVIDER_BASE_URL, COPILOT_PROVIDER_API_KEY, COPILOT_MODEL and COPILOT_OFFLINE=true set, Copilot CLI 1.0.117 started and worked without a GitHub sign-in.

Which environment variables set a custom provider in Copilot CLI?

COPILOT_PROVIDER_BASE_URL for the API's base URL, COPILOT_PROVIDER_API_KEY for the key and COPILOT_MODEL for the model ID. For a model outside Copilot's catalog, also set COPILOT_PROVIDER_MAX_PROMPT_TOKENS and COPILOT_PROVIDER_MAX_OUTPUT_TOKENS.

What does COPILOT_OFFLINE do?

It stops Copilot CLI from contacting GitHub: no sign-in, telemetry, automatic update or GitHub MCP server. Model requests still go to the provider you configured.

Start building today.

Create an account, tell us what you work on, and send your first request.