[FAQ] CCSTUDIO-THEIA: How to setup CCSTUDIO AI Assistant with Github Copilot

Part Number: CCSTUDIO-THEIA
Other Parts Discussed in Thread: CCSTUDIO

I am trying to setup the CCSTUDIO AI Assitant with Github copilot using the guide here:

Using GitHub Copilot Models with Claude Code in CCStudio™ IDE via LiteLLM

 

I need further help

  • GitHub Copilot cannot be directly installed as a VS Code extension in CCS 20.x or 21.0. The Copilot extension is tied to the Microsoft Marketplace and has no standalone .vsix available for Theia-based IDEs 1. Even in CCS 21.0, direct integration of the VS Code Copilot extension is still not supported 2.

    The guide you referenced (the LiteLLM application note) is the workaround approach — it uses LiteLLM as a proxy to route GitHub Copilot models into CCS via a compatible extension.

    Follow below Step by Step Guide to setup Litellm proxy with github copilot

  • Run Claude Code on your GitHub Copilot subscription

    A Windows setup guide: put a small LiteLLM proxy between the Claude Code extension in VS Code and GitHub Copilot, so the models your Copilot plan includes appear in Claude Code's model picker.

    VS CodeClaude Code extension
    LiteLLM proxy127.0.0.1:4000
    GitHub Copilotyour subscription

    Two separate secrets are involved. The proxy key is a password you invent in step 2; Claude Code uses it to talk to your own proxy. The GitHub sign-in happens once in step 4 and is handled entirely by LiteLLM. The two never need to match, and neither one comes from a website you have to register on.

    This guide also lists every error we hit while setting this up, with the fix for each, in Fixing errors.

    Before you start

    • A GitHub account with an active Copilot plan.
    • Windows with Python 3 and pip. Check with python --version.
    • VS Code with the Claude Code extension installed. The model picker feature used here (gateway model discovery) needs a fairly recent version: Claude Code 2.1.129 or later, according to LiteLLM's docs.
    • Two terminal windows. One stays open running the proxy for as long as you use it.

    Know what you are setting up. This is an unofficial arrangement. Anthropic documents the gateway mechanism but does not officially support non-Claude models in Claude Code, so expect some rough edges with GPT, Gemini and other models. Also read GitHub's Copilot terms and your organization's policy before relying on a proxy in front of Copilot.

    Not every model your plan shows will work here. GitHub Copilot serves some models only on its newer Responses API, while LiteLLM's Copilot provider talks to the Chat Completions API. Step 5 filters your list down to the models that actually work, so you never put a broken one in your config.

    Which window am I in?

    Windows has two terminals that look similar but use different syntax. A prompt that starts with PS (like PS C:\Users\you>) is PowerShell. A prompt without it (like C:\Users\you>) is Command Prompt. Use the switch at the top of this page to show the matching commands everywhere. Mixing them up caused several of the errors listed later.

    1Install LiteLLM

    LiteLLM is the proxy. Install it with its proxy extras:

    pip install "litellm[proxy]"
    litellm --version
    Copy

    If litellm is not found afterwards, close the terminal and open a new one so the updated PATH is picked up.

    2Create your proxy key (the bearer token)

    You do not need an existing key or token. A bearer token is just a secret string sent in an Authorization: Bearer ... header. LiteLLM compares what it receives with the master key you give it, so you choose the value yourself. It should start with sk- and be long and random.

    You will use the same value in two places: as LITELLM_MASTER_KEY when you start the proxy, and as ANTHROPIC_AUTH_TOKEN in VS Code. If they differ, requests are rejected.

    Generate a proxy key
    GenerateCopy

    The key is created in your browser and goes nowhere else. After you generate one, every sk-your-key in this guide changes to it, so you can copy commands as they are.

    Prefer the command line? Either of these prints a key:

    python -c "import secrets; print('sk-' + secrets.token_hex(24))"
    Copy
    $b = New-Object byte[] 24
    [Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($b)
    "sk-" + (($b | ForEach-Object { $_.ToString("x2") }) -join "")
    Copy

    Save it somewhere safe. A password manager works well. If you lose it, generate a new one and update both places.

    3Write a starter config

    LiteLLM reads a config.yaml that lists the models it serves. Start with one model so you can sign in to GitHub first. You will replace this file in step 5.

    mkdir "$env:USERPROFILE\litellm-copilot"
    notepad "$env:USERPROFILE\litellm-copilot\config.yaml"
    Copy

    Notepad asks to create the file. Choose Yes, paste this, and save:

    general_settings:
      master_key: os.environ/LITELLM_MASTER_KEY
      trusted_proxy_ranges: []
    
    model_list:
      - model_name: claude-gpt-5.4
        litellm_params:
          model: github_copilot/gpt-5.4
    
    litellm_settings:
      drop_params: true
    Copy

    What each part does:

    • master_key: os.environ/LITELLM_MASTER_KEY reads your proxy key from an environment variable, so the secret never sits in this file.
    • trusted_proxy_ranges: [] tells LiteLLM that clients connect directly, with no reverse proxy in front. Do not put an address or port in here; it expects network ranges such as 10.0.0.0/8.
    • model_name is the name Claude Code asks for. model is the real Copilot model it is routed to.
    • drop_params: true drops request options Copilot does not support instead of failing the request.

    Check the file name. Notepad can silently save config.yaml.txt. In File Explorer, turn on View, then Show, then File name extensions, and confirm the file ends in .yaml only.

    4Start the proxy and sign in to GitHub

    In window one, set your key, then start the proxy. It must be set in this same window, because variables do not carry between windows.

    $env:LITELLM_MASTER_KEY = "sk-your-key"
    cd "$env:USERPROFILE\litellm-copilot"
    litellm --config config.yaml --host 127.0.0.1 --port 4000
    Copy

    --host 127.0.0.1 keeps the proxy reachable only from your own PC. Without it, LiteLLM listens on every network interface.

    A healthy start prints your model names, then Application startup complete and Uvicorn running on http://127.0.0.1:4000. If you see a line starting with CRITICAL or a warning about trusted_proxy_ranges, jump to Fixing errors.

    Sign in to GitHub

    GitHub sign-in is triggered by your first real request. In window two, send a test message:

    Invoke-RestMethod 127.0.0.1:4000/.../messages -Method Post -ContentType "application/json" -Headers @{ Authorization = "Bearer sk-your-key"; "anthropic-version" = "2023-06-01" } -Body '{"model":"claude-gpt-5.4","max_tokens":50,"messages":[{"role":"user","content":"Say hi"}]}'
    Copy

    Look at window one. LiteLLM prints a short code and the address github.com/.../device. Open that address, enter the code, and approve. Then send the same test message again. A reply with a short greeting means the whole chain works.

    LiteLLM stores the sign-in under C:\Users\<you>\.config\litellm\github_copilot, so you will not be asked again.

    Got a model error instead? Plans differ. If the reply says the model is unknown or not available, you do not have gpt-5.4. Carry on to step 5, which lists what your plan can actually serve, then retest with one of those.

    5Build your model list

    Two things decide whether a model works through this proxy:

    • Your plan includes it. The picker in other Copilot apps and the startup log of the proxy prove nothing; only GitHub's own model list for your account counts.
    • It is served on the Chat Completions endpoint. Copilot offers some models only on its newer /responses endpoint. LiteLLM's Copilot provider uses /chat/completions, so Responses-only models fail with a 400 error no matter what you put in the config. Each entry in GitHub's model list has a supported_endpoints field that tells you which is which.

    5a  List the models that will actually work

    With the proxy signed in (step 4), run this in window two. It asks GitHub for your account's models and keeps only the ones served on /chat/completions:

    $tok = (Get-Content "$env:USERPROFILE\.config\litellm\github_copilot\api-key.json" | ConvertFrom-Json).token
    $r = Invoke-RestMethod api.githubcopilot.com/models -Headers @{
      Authorization = "Bearer $tok"
      "Copilot-Integration-Id" = "vscode-chat"
      "Editor-Version" = "vscode/1.99.0"
    }
    $r.data | Where-Object { $_.supported_endpoints -contains '/chat/completions' } | ForEach-Object id
    Copy

    You get a list of model IDs, one per line. For example, a run on a real account returned the Claude models, gemini-3.7-flash, gemini-3.8-flash, gpt-5.4, gpt-5-mini and kimi-k3 — while mai-code-1.1-flash, gpt-5.5, the gpt-5.6-* and gpt-6* models, grok-* and gpt-5.3-codex dropped out because they are Responses-only.

    5b  If the filtered list is empty

    • 401 error: the short-lived token has expired. Send one test message through the proxy (step 4) to refresh it, then run the command again.
    • Prints nothing at all: the supported_endpoints field may be named differently or missing on your account. Run this to see each model's endpoints and judge for yourself:
    $r.data | Select-Object id, @{n='endpoints';e={$_.supported_endpoints -join ' '}} | Format-Table -AutoSize
    Copy

    Models with a blank endpoints column may still work — they might just lack the field. Add them one at a time and test (see 5d).

    5c  Turn the list into a config

    Paste the filtered list below. The builder writes a complete config.yaml for you, skips internal helper models (such as copilot-search-*, exec-agent-* and trajectory-compaction), drops duplicate -base/-copilot variants, and adds the claude- prefix the picker needs.

    Paste your model IDs
    Leave out embeddings, old GPT-3.5 and GPT-4 models, dated snapshots and internal helper modelsAdd dashed aliases for Claude's default model names (recommended)
    Try an exampleDownload config.yaml

    Waiting for model IDs.

    Save the result as config.yaml in litellm-copilot, replacing the starter file. Then restart the proxy: press Ctrl+C in window one and run the start command from step 4 again.

    5d  Adding an unlisted model by hand (optional)

    If a model you want did not appear in the filtered list but you suspect it works (for example it only lacked the endpoints field), add a single entry to model_list and test it with the step 4 message before trusting it:

      - model_name: claude-gpt-4.1
        litellm_params:
          model: github_copilot/gpt-4.1
    Copy

    If the test returns a 400 model error, the model is Responses-only on your plan; remove the entry. LiteLLM's docs mention a mode: responses setting for Codex models, but it is untested with Claude Code's Messages API — treat it as an experiment, not a fix.

    Why every name starts with claude-

    Claude Code's model picker drops any model from a gateway whose ID does not start with claude or anthropic. Adding the prefix to each model_name lets GPT, Gemini, Kimi and other models appear in the picker. The model: line still points at the real Copilot model, so requests are routed correctly.

    Why the aliases

    Claude Code may ask for its own default names, such as claude-opus-5-5 or a dated Haiku name for background tasks. The aliases map those to the matching Copilot model so those requests do not fail with an invalid model name. They also show up as extra rows in the picker, which is expected.

    6Check the proxy

    With the proxy running, run these in window two. The first needs no key and tells you the server is up:

    curl.exe 127.0.0.1:4000/.../liveliness
    Copy

    The second lists every model the proxy serves. You should see all the names from your config:

    (curl.exe -s 127.0.0.1:4000/.../models -H "Authorization: Bearer sk-your-key" | ConvertFrom-Json).data.id
    Copy

    In PowerShell, always type curl.exe. Plain curl is an alias for a different command in Windows PowerShell 5.1 and behaves differently.

    7Connect the VS Code extension

    The extension does not see variables from your terminal. Anything you set with set or $env: in a terminal window only exists in that window. The extension needs its settings in VS Code itself.

    Press Ctrl+Shift+P, run Preferences: Open User Settings (JSON), and add this block. Keep your existing settings and mind the commas.

    "claudeCode.environmentVariables": [
      { "name": "ANTHROPIC_BASE_URL", "value": "http://127.0.0.1:4000" },
      { "name": "ANTHROPIC_AUTH_TOKEN", "value": "sk-your-key" },
      { "name": "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY", "value": "1" },
      { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL", "value": "claude-haiku-4.5" }
    ],
    Copy

    The last line is optional. It tells Claude Code which model to use for small background tasks; remove it if your plan has no claude-haiku-4.5, or point it at another fast model from your list.

    Then run Developer: Reload Window from the same Ctrl+Shift+P menu, open the Claude Code panel, and type /model. Your models appear under a "From gateway" label, below the built-in ones.

    If the picker still shows only Anthropic's models

    Set the model by name instead. Add this setting, using any name from your list, and reload the window. Change it whenever you want a different model.

    "claudeCode.selectedModel": "claude-sonnet-5.5",
    Copy

    If the setting disappears after restarting VS Code

    A reported bug can remove claudeCode.environmentVariables from the settings file. Set the same values as Windows user variables instead, in Command Prompt, then close every VS Code window and reopen it:

    setx ANTHROPIC_BASE_URL http://127.0.0.1:4000
    setx ANTHROPIC_AUTH_TOKEN sk-your-key
    setx CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY 1
    Copy

    setx only affects programs started after you run it, which is why a restart is needed.

    8Use the Claude Code CLI (optional)

    The command-line version of Claude Code can use the same proxy. Set the variables in the window where you run claude:

    $env:ANTHROPIC_BASE_URL = "">http://127.0.0.1:4000"
    $env:ANTHROPIC_AUTH_TOKEN = "sk-your-key"
    $env:CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY = "1"
    claude
    Copy

    To start on a specific model, name it: claude --model claude-gpt-5.4.

    Daily use

    Every session needs the proxy running before you open Claude Code. The easiest way is a launcher file. Save this as start-proxy.cmd in the litellm-copilot folder and double-click it:

    @echo off
    set LITELLM_MASTER_KEY=sk-your-key
    cd /d "%USERPROFILE%\litellm-copilot"
    litellm --config config.yaml --host 127.0.0.1 --port 4000
    Copy

    Leave that window open while you work. Closing it stops the proxy, and Claude Code will then report connection errors.

    When Copilot adds a model, run the step 5a command again, paste the new list into the builder, replace config.yaml, restart the proxy, and reload the VS Code window.

    Fixing errors

    These are the problems we ran into, shown with the message you will see. Open the one that matches.

    400 model_not_supported / "The requested model is not supported" for a model your plan includesThe model shows in Copilot's own picker and in your model list, yet every request through the proxy fails. Seen with mai-code-1.1-flash, gpt-5.5, gpt-5.6-*, gpt-6*, grok-* and gpt-5.3-codex.

    What went wrong. GitHub Copilot serves some models only on its newer /responses endpoint. LiteLLM's Copilot provider sends requests to /chat/completions, and a Responses-only model rejects those with a 400 error. Your config and the model name are fine; the model simply cannot be reached this way.

    Fix. Rebuild your list with the endpoint filter from step 5a — it keeps only models whose supported_endpoints includes /chat/completions. Remove Responses-only models from config.yaml, restart the proxy, and reload the VS Code window; they will drop out of the picker.

    Maybe worth a try. LiteLLM documents a mode: responses parameter for Codex models. It is untested with Claude Code (which uses the Messages API), so experiment on one model at most and remove it if requests still fail.

    Invalid address or range '0.0.0.0/4000' in trusted_proxy_ranges; skippingFollowed by a warning that trusted_proxy_ranges is not set or not a valid list.

    What went wrong. The value looks like a host and port (0.0.0.0:4000) written as a network range. In a range, the number after the slash is a prefix length from 0 to 32, so /4000 is invalid. LiteLLM skips it and the list ends up empty.

    Fix. If clients connect directly to the proxy, as in this guide, use an empty list:

    general_settings:
      trusted_proxy_ranges: []
    Copy

    Only list real ranges such as ["10.0.0.0/8"] if the proxy sits behind a reverse proxy or load balancer. Do not use 0.0.0.0/0 to silence the warning; it trusts every address.

    CRITICAL: LITELLM_MASTER_KEY is not set! All requests will be treated as INTERNAL_USER with no admin access.The proxy started, but without a key.

    What went wrong. The config reads the key from LITELLM_MASTER_KEY, and that variable was empty in the window that launched the proxy. Variables set in one window are invisible to another.

    Fix. Set the variable in the same window, before running litellm (step 4). To make it permanent, run setx LITELLM_MASTER_KEY sk-your-key once in Command Prompt and open a new window, or use the launcher file from Daily use.

    API Error: 400 anthropic_messages: Invalid model name passed in model=claude-opus-4.6The proxy has no model with that exact name.

    What went wrong. Three causes are common. The model_name in the config did not match what Claude Code sent (for example, the config had a github_copilot/ prefix and Claude Code sent a plain name). The name has a typo or uses dashes where Copilot uses dots. Or the model is not part of your subscription at all; that was the case for claude-opus-4.6 here.

    Fix. Run the list command from step 6 and use a name exactly as it appears. If a model is missing from your Copilot list, remove it from the config. Rebuild the file with the builder in step 5 so names and prefixes stay consistent.

    {"error":{"message":"Internal server error","type":"internal_server_error"}}Returned when listing models with curl.

    What it means. The proxy hit an error while handling the request. The likeliest cause is a key problem: the variable was empty or different in one of the two windows, so the key sent did not match the key the proxy was started with. The traceback in the proxy window names the real cause.

    Fix. Check the proxy is alive with curl.exe 127.0.0.1:4000/.../liveliness. Then confirm both windows hold the same key (echo $env:LITELLM_MASTER_KEY in PowerShell, echo %LITELLM_MASTER_KEY% in Command Prompt) and retry. If the error persists, read the last lines of the proxy window.

    'Get-Content' is not recognized as an internal or external commandAlso: echo $env:NAME prints the text $env:NAME instead of a value.

    What went wrong. You are in Command Prompt, but the command is PowerShell syntax. A prompt like c:\Users\you\project> without PS in front is Command Prompt.

    Fix. Switch the toggle at the top of this page to Command Prompt for the equivalent commands, or open PowerShell. The table in PowerShell vs cmd maps the common ones.

    /model shows only Default, Opus, Fable, Sonnet, Haiku and Opus 4Your proxy models are missing from the picker.

    What went wrong. The picker shows Anthropic's built-in list unless you opt in to gateway discovery. Three things must all be true.

    • CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY is set to 1 in the place Claude Code actually reads from (VS Code settings for the extension, the terminal window for the CLI).
    • The proxy returns the models from /v1/models (step 6), and every model_name starts with claude-. Claude Code removes the others.
    • Your Claude Code version is recent enough (2.1.129 or later per LiteLLM's docs). Restart VS Code or Claude Code fully after changing anything.

    Fallback. Pick a model by name with claudeCode.selectedModel (extension) or --model (CLI).

    Variables work in the terminal but the VS Code extension ignores themLogin screen, built-in models only, or connection errors in the panel.

    What went wrong. The extension runs as a separate process and does not inherit variables you set in a terminal window.

    Fix. Put the variables in claudeCode.environmentVariables in VS Code's user settings and reload the window (step 7). If that setting keeps disappearing, use setx and restart VS Code completely.

    401 when listing models from api.githubcopilot.comThe step 5a command fails with an authorization error.

    What went wrong. The token in api-key.json is short-lived and has expired.

    Fix. Send any request through the proxy, for example the test message in step 4. LiteLLM refreshes the token. Run the list command again. If the file does not exist, you have not completed the GitHub sign-in yet.

    Connection refused / unable to connect to 127.0.0.1:4000Claude Code or curl cannot reach the proxy.

    Fix. The proxy window was closed or the proxy crashed. Start it again (step 4 or the launcher file). Also check that the port in ANTHROPIC_BASE_URL matches the --port you started with.

    Model errors on small background tasks, or a deprecated variable warningClaude Code uses a separate small model for background work.

    Fix. Set ANTHROPIC_DEFAULT_HAIKU_MODEL to a fast model from your list, such as claude-haiku-4.5. The older ANTHROPIC_SMALL_FAST_MODEL is deprecated. The aliases from step 5 cover Claude's default names as well.

    A Codex model such as claude-gpt-5.3-codex failsOther models in the list work.

    What it means. LiteLLM's docs say GPT Codex models are only supported through the Responses API, while Claude Code talks to the proxy using the Messages API. The endpoint filter in step 5a removes them automatically. Leave Codex models out of your list, or expect them not to work in Claude Code.

    Garbled characters such as ð in PowerShell outputA reply that should contain an emoji looks corrupted.

    This is only how the PowerShell window displays an emoji. The request itself succeeded, and the text is fine in VS Code.

    The startup log lists a model, but requests for it failLiteLLM printed the name, yet the request returns an error.

    The startup log repeats your config file; it does not check your subscription or the serving endpoint. Compare your config against the filtered list from step 5a. Some models also need to be switched on in your GitHub Copilot settings at github.com/settings/copilot, and a disabled one is rejected even with the correct name.

    PowerShell vs Command Prompt

    The same task is written differently in each. This table covers everything used in this guide.

    Task PowerShell Command Prompt
    Prompt looks like PS C:\Users\you> C:\Users\you>
    Set a variable for this window $env:NAME = "value" set NAME=value
    Read a variable echo $env:NAME echo %NAME%
    Set a variable permanently setx NAME value (works in both; affects new windows only)
    Your home folder $env:USERPROFILE %USERPROFILE%
    Show a file Get-Content file type file
    Call curl curl.exe (not curl) curl.exe
    Quotes inside JSON on the command line wrap the JSON in single quotes wrap in double quotes and escape inner ones as \"

    Security

    • Keep the proxy local. Start it with --host 127.0.0.1. LiteLLM's default listens on all interfaces, so anyone on your network could reach it.
    • Treat the proxy key like a password. It sits in plain text in your VS Code settings (and in start-proxy.cmd if you use one). Do not share those files, commit them to a repository, or paste them into chats or screenshots.
    • Protect the Copilot sign-in files. The folder C:\Users\<you>\.config\litellm\github_copilot holds a long-lived GitHub token (access-token) and a short-lived key. Anyone with them can use your Copilot subscription.
    • Rotate if exposed. For the proxy key, generate a new one and update both places. For GitHub, revoke the authorization in your GitHub account settings and sign in again.

    Settings reference

    Name Where it goes What it does
    LITELLM_MASTER_KEY Proxy window, or setx The key the proxy accepts. Read by config.yaml.
    ANTHROPIC_BASE_URL VS Code setting or CLI window Where Claude Code sends requests: http://127.0.0.1:4000.
    ANTHROPIC_AUTH_TOKEN VS Code setting or CLI window Your proxy key, sent as the bearer token. Must equal LITELLM_MASTER_KEY.
    CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY VS Code setting or CLI window Makes Claude Code list the proxy's models in /model.
    ANTHROPIC_DEFAULT_HAIKU_MODEL Optional Model for small background tasks.
    ANTHROPIC_CUSTOM_MODEL_OPTION Optional Adds one extra named row to the picker.
    claudeCode.selectedModel VS Code setting Chooses a model by name, bypassing the picker.
    GITHUB_COPILOT_TOKEN_DIR Optional, proxy window Changes where LiteLLM stores the GitHub sign-in (default ~/.config/litellm/github_copilot).
  • My recommendation is to use CoPilot CLI when wanting to use CoPilot with CCStudio IDE. The setup fis very simple but not intuitive.

    1) In CCStudio IDE run the AI setup wizard and select Claude Code, don't worry about any of the authentication details as they are not relevant.  Click Apply at the bottom.  This will install all of the CCStudio AI hooks into your workspace (CLAUDE.md with guidance, .mcp.json with the MCP server info, and our skills).

    2) Run CoPilot CLI from your terminal starting from your workspace folder.  It will automatically read in the information in step 1 and is ready to drive CCStudio.

    Step 1 is not ideal in that it is non-intuitive and installs the Claude Code extension, but the upside is that it does everything you need to be able to use CoPilot CLI with CCStudio IDE.  With this approach you can use your CoPilot account directly without having to worry about something like LiteLLM.  In a future release we will add the ability to select CoPilot in the AI setup wizard  and it will setup the files in CoPilots preferred location (.github/copilot-instructions.md...).

    Regards,
    John