GitHub Copilot and VS Code chat with LiteLLM

Connect VS Code chat users to models behind a self-hosted LiteLLM gateway, with the required VS Code version, model pricing in the picker, and admin budget controls.

On this page

How GitHub Copilot and VS Code chat with LiteLLM works

Platform teams usually face the same request: developers want their VS Code chat to use approved models, while the organization wants keys, spend and request logs to stay under its own control. The supported starting point is the LiteLLM VS Code extension. It adds the gateway as a language model provider, so the chat model picker lists the models a given key can reach, along with their prices. The extension needs VS Code 1.115 or newer and the GitHub Copilot Chat extension installed. Because the picker reflects the key, access is decided at the gateway, not in each editor.

It is important to separate this path from routing GitHub Copilot's own traffic through the proxy. The extension lets chat users select LiteLLM-hosted models inside the chat experience. Copilot's built-in models and its service traffic are a different matter, and the documented LiteLLM tutorial does not establish that Copilot's own requests can be redirected through a self-hosted proxy. Confirm this with GitHub's current documentation and your licensing terms before you promise anyone that Copilot completions are logged or budgeted by LiteLLM. Treat the two as separate scopes in your design and your risk register.

Before rollout, the platform team should verify three things in its own environment: the exact extension version and VS Code build on managed workstations, which models appear in the picker for a test team key, and whether the picker's price figures match the provider bills the organization receives. Also decide how the gateway URL and virtual key reach each developer's machine without being stored in plain text in shared settings. The LiteLLM GitHub Copilot integration tutorial is the next read for the configuration steps.

What you need before connecting VS Code to LiteLLM

Five things must be in place before a developer can see LiteLLM models in the VS Code chat picker: a supported editor and extension, a running proxy with its database, a reachable URL, trusted TLS, and a scoped virtual key. Confirm each one on a pilot machine before rolling out to the team.

VS Code 1.115 with Copilot Chat

The LiteLLM extension needs VS Code 1.115 or newer together with the GitHub Copilot Chat extension, because the extension registers the gateway as a language model provider inside that chat surface. Check the editor version on every machine in the pilot group, not only on the admin's laptop. Managed fleets often lag behind, and an older build will hide the LiteLLM entry without a clear error.

Copilot integration guide

Running proxy with PostgreSQL

Virtual keys, per-key and per-team budgets, and spend tracking all require a PostgreSQL database behind the LiteLLM proxy. Without it, the key and budget controls this integration depends on do not exist. Confirm the database is provisioned, backed up, and reachable from the proxy pods or hosts before creating any keys. Size the database and the proxy workers against the number of developers you expect to onboard.

Virtual keys docs

Redis once you scale out

A single proxy instance can run without Redis, but Redis 7.0 or newer becomes required once more than one proxy instance runs. It holds shared rate limits, router state and cache, so without it, limits set on a key may not hold across instances. Decide early whether the pilot will stay on one instance or start with two, because adding Redis later means changing the deployment and testing rate limits again.

Reachable gateway URL

Each developer machine must reach the proxy over HTTPS at a single stable address. Decide whether that address resolves only on the corporate network, through VPN, or from the public internet, and test it from a laptop outside the office. Confirm with your network team which ports and paths are allowed through firewalls and proxies, and whether developers on managed networks can reach the host at all.

TLS trusted by developer machines

Developer machines must trust the certificate on the gateway endpoint. If the proxy uses a certificate issued by your internal certificate authority, install that root and any intermediates in the operating system or editor trust store on every machine that runs VS Code. A certificate that works in a browser may still fail inside the editor if the trust chain is incomplete, so test the chat picker, not just a web page.

Virtual key limited to approved models

Create a dedicated virtual key for the pilot group rather than sharing the master key. Restrict the key to the models your organization has approved, set a budget and rate limits, and store it in your secret manager or an approved developer credential store. The model list the key exposes is what appears in the picker, so an overly broad key puts unapproved models in front of every developer.

Production best practices

Configuring the LiteLLM extension and first model list

This sequence connects VS Code chat to your self-hosted LiteLLM gateway through a restricted virtual key, so the model picker shows only what that key can reach. It ends with a test prompt that you can trace in the proxy logs.

  1. Create a team and restricted virtual key

    An administrator creates a team in the LiteLLM proxy, then issues a virtual key for that team and limits it to the specific models the developers are approved to use. Virtual keys require the PostgreSQL database that backs the proxy, so confirm the database is in place before issuing keys. Record the key in your secret store rather than in a shared document. The step is complete when the key lists only the approved model names in the proxy admin UI.

  2. Confirm VS Code and Copilot Chat versions

    Each developer checks that VS Code is version 1.115 or newer and that the GitHub Copilot Chat extension is installed and signed in. The LiteLLM extension depends on both, so an older editor will not show the gateway as a model provider. Check the versions on every workstation before troubleshooting anything else. The step is complete when the Extensions view shows the Copilot Chat extension active on the required editor version.

  3. Install the LiteLLM extension in VS Code

    The developer installs the LiteLLM extension from the VS Code marketplace, or your administrator distributes it through your standard software management tooling. The extension adds the gateway as a language model provider inside the chat model picker. Confirm the extension source with your security team before wide distribution. The step is complete when the extension appears as enabled in the Extensions view with no install errors.

  4. Set the gateway base URL and key

    The developer enters the base URL of your LiteLLM proxy and the restricted virtual key in the extension settings. The base URL must be the address your developers can reach from their workstations, which is often an internal hostname behind your network controls. Store the key in the editor's secret storage where the extension supports it, and avoid pasting it into workspace settings that get committed to source control. The step is complete when the extension reports a successful connection to the gateway.

  5. Confirm the picker lists only permitted models

    The developer opens the chat model picker in Copilot Chat and checks the list of gateway models. The list should match the models restricted to the key in step one, with pricing shown for each entry where the extension provides it. If a model you did not approve appears, stop and fix the key's model restriction in the proxy before going further. The step is complete when the picker output matches the approved model list exactly.

  6. Send a test prompt and find it in logs

    The developer selects one approved model and sends a short test prompt in chat. Then an administrator searches the LiteLLM proxy request logs for the key or team and confirms the request appears with the expected model name. This proves the traffic is routed through the gateway and not a direct provider connection. The step is complete when the test request is visible in the proxy logs under the correct team and key.

  7. Record the configuration for rollout

    The administrator writes down the editor version, extension version, base URL pattern, key scope and the test result, so every later workstation can be checked against the same baseline. Confirm with your platform team how the base URL and key will be distributed to additional developers. The step is complete when the baseline record is stored with the team's configuration documentation and a second developer has repeated the test successfully.

Extension path or routing Copilot traffic through the proxy

The LiteLLM extension for VS Code adds your gateway as a language model provider, so the chat model picker lists the models the signed-in key can reach. Developers keep working in the Copilot Chat panel they already use, and the picker shows prices next to each model. The documented requirements are VS Code 1.115 or newer with the GitHub Copilot Chat extension installed alongside it.

  • Picker scope. The list follows the key's model permissions, so an admin controls what appears by changing the key rather than configuring each laptop.
  • Pricing visibility. Prices in the picker help developers choose lower-cost models for routine work, while budgets and limits are still enforced at the gateway.
  • Version baseline. Standardize on one VS Code build across the fleet, since the documented minimum is 1.115.
  • Key delivery. Decide how each developer receives a virtual key, where it is stored on the device, and how it is revoked when someone changes roles or leaves.

Check the current setup steps in the LiteLLM GitHub Copilot tutorial and confirm on your managed device image that the picker behaves as described before rollout.

Keys, teams, models and pricing mapped to the VS Code picker

This table traces each LiteLLM control, from the virtual key and team to the model list and budget, to what a developer sees in the VS Code chat model picker. Read it top to bottom to find where a missing model or a price mismatch comes from, and use the last rows to decide what to verify before rollout.

ControlWhat it decidesWhat the developer sees in the pickerWhat to verify
Virtual keyWhich gateway credential the extension sends with each chat requestNothing directly; a wrong or expired key shows as missing models or failed requestsKey is valid, starts with the expected prefix and is stored in the extension settings, not shared in chat
Team membershipWhich team budget, rate limits and model group the key inheritsOnly indirectly, through the models that team can reachThe user belongs to the intended team in the gateway, and the key is issued under that team
Allowed model namesWhich model aliases the key is permitted to callEach permitted model appears as a selectable entry in the pickerEach alias in the picker matches a model group on the gateway, with no stale or renamed entries
Key-level model restrictionNarrows the team's models to a subset for one keyA shorter list than the team's full set, which can look like a missing modelCompare the key's model list with the team's list when a developer reports a gap
Per-key and per-team budgetsSpend ceiling before requests are refusedBudget exhaustion appears as failed chat requests, not as a removed modelBudget values, current spend and temporary increases match what the admin approved
Model prices in the pickerPrice labels supplied by the extension for each modelPer-model prices shown next to each entry in the pickerPrices come from the extension's current model data and match your provider contract before you publish them internally
Key cannot reach a modelAccess denial from the gateway for that model aliasThe model should be absent from the list; if it still appears, selecting it fails at send timeRun a test request for each listed model with the developer's key and confirm the picker matches the result
Version prerequisitesWhether the extension and Copilot Chat can load the gateway modelsModels may not appear at all if the editor or Copilot Chat is too oldVS Code is 1.115 or newer and the GitHub Copilot Chat extension is installed and current

How a chat prompt travels from VS Code to the model provider

The prompt starts in the VS Code chat panel on the developer's device, where the LiteLLM extension has added the gateway as a language model provider. It crosses into the company network to reach the LiteLLM proxy, which checks the virtual key against PostgreSQL for model access and budget before forwarding the request. Redis sits beside the proxy once several instances run, and the upstream provider is the only hop that leaves your environment. Check each trust boundary in your own network, since where the proxy runs decides what is exposed.

Trust boundaries between the developer device, the company network and external model providers.

Securing keys, budgets and developer access

Once developers reach LiteLLM models from VS Code, the gateway becomes the control point for who can call which model and how much they can spend. The cards below cover the secrets, keys, limits and network settings that decide whether that control holds, and the admin features that depend on the Enterprise license.

Store the master key in a secret manager

LITELLM_MASTER_KEY creates and manages every virtual key, so anyone holding it can issue access without a record. It must start with sk-. Keep it in a secret manager rather than in the Helm values file or a shared .env, limit who can read it, and plan how it rotates. Check that the proxy pod receives it only through a secret reference and that it never appears in logs.

Production best practices

Issue one key per developer

Copilot users in VS Code should each hold a virtual key tied to their own identity, not a key shared across a team. Per-user keys let spend and request logs be attributed to a person, and let you revoke one developer's access when they leave or change roles. Confirm with your administrators how keys are created, who approves them, and how they are delivered to developer machines.

Virtual keys docs

Restrict each key to approved models

A virtual key can be limited to specific models, so a key issued for Copilot chat only reaches the models your organization has approved for code work. Decide the model list per team before issuing keys, and test that a key cannot call a model outside its list from the extension's model picker. Review the list when providers add or retire models.

Set budgets and TPM or RPM limits

Budgets cap spend per key, user or team, and TPM and RPM limits cap token and request rates. Temporary budget increases let an admin raise a limit for a deadline without reissuing keys. Ask your administrators which limits apply per developer and per team, and what happens when a budget is exhausted mid-session, since a stopped chat can look like a tool fault to the developer.

Limit network exposure of the proxy

Decide which networks can reach the proxy before developers connect their VS Code clients. Serve it on an internal address behind your VPN or private load balancer, and avoid publishing the admin UI to the internet. Enterprise IP allowlisting can narrow access further. Confirm the endpoint each developer's extension uses and test it from a device outside the corporate network.

Admin SSO and audit logs need Enterprise

SSO for the admin UI is free for up to 5 users from v1.76.0, and an Enterprise license is needed beyond that. Audit logs, SCIM provisioning and team-level RBAC are Enterprise features. If your administrator group is larger than five people or your review process requires audit trails, confirm the licensing scope in writing before you finalize the design.

LiteLLM Enterprise docs

Why models or budgets do not appear as expected in VS Code

This table lists the failures most often seen when VS Code chat does not show the expected LiteLLM models or budget behavior, with the likely cause and fix for each. Check the rows in order: client versions and extensions first, then key scope, budgets, network reach and the database behind virtual keys.

SymptomLikely causeFix
LiteLLM models missing from the pickerVS Code is older than 1.115, so the LiteLLM extension cannot register as a language model providerUpdate VS Code to 1.115 or newer, then reload the window and confirm the picker refreshes
No LiteLLM entry in the model picker at allGitHub Copilot Chat extension is not installed or is disabled on the developer's machineInstall or enable GitHub Copilot Chat alongside the LiteLLM extension, then restart VS Code
Only a few models appearThe virtual key is restricted to specific models, and the picker shows only what that key can reachCompare the key's allowed model list in the admin UI with the models the developer expects, then add the needed models or issue a key with the right scope
Budget looks wrong after a temporary increaseThe temporary budget increase has expired or was applied to a different key, user or team than the one the developer usesCheck the key's current budget and expiry in the admin UI, then confirm which key the extension is configured with before changing limits
Models or chat requests fail to load from laptopsThe proxy URL is an internal address that developer laptops cannot resolve or reach, often off the corporate network or VPNConfirm the proxy hostname resolves and responds from a developer laptop on the normal network path, and publish it on a reachable internal name if needed
Virtual key features do not workNo PostgreSQL database is attached to the proxy, and virtual keys, per-key budgets and spend tracking depend on itAttach a PostgreSQL database to the proxy and confirm the proxy reports a healthy database connection before issuing keys

Questions buyers ask before connecting Copilot or VS Code to LiteLLM

What drives the cost of a LiteLLM setup for VS Code chat?

The main cost drivers are the number of developers, the hosting footprint and the support model you choose. The LiteLLM code outside the enterprise/ directory is MIT licensed, while code under enterprise/ uses the enterprise license, so confirm which features you need before you compare quotes. Hosting is recurring: you run the proxy, PostgreSQL (required for virtual keys) and Redis 7.0 or newer once more than one proxy instance runs. The production guide suggests 1 vCPU and 4 GiB memory per worker as a starting point. Model provider charges are billed by each provider. DeployOpen works from a written, fixed scope, and retainers cover upgrades and testing if you want them. Ask the quote to separate build work, hosting, licensing and ongoing support.

How long does a pilot take before developers can use it?

The supplied facts do not give a pilot duration, so confirm the timeline against a written scope rather than assuming one. The length depends on whether PostgreSQL, Redis, identity and secret storage already exist, how many models and teams the pilot covers, and whether you need SSO for the admin UI before developers join. A pilot with one team, one restricted key and one VS Code build is far smaller than a rollout across several business units. Ask any partner for the deliverables, the decision points and what the pilot proves before you expand it.

Which VS Code version and extensions do developers need?

The LiteLLM extension needs VS Code 1.115 or newer, with the GitHub Copilot Chat extension installed. Once configured, the chat model picker lists the models a key can reach, with prices shown. Check VS Code versions on developer machines before the pilot, because older builds will not work with the extension. Add a minimum VS Code version to your managed software baseline so the requirement stays enforced. Test with one key restricted to a short model list, then confirm the picker shows only those models. Follow the current setup steps in the LiteLLM tutorial, since configuration details can change between releases.

What does the platform and security team need to provide?

The platform and security teams supply the infrastructure and the controls the gateway depends on. Typical inputs include:

  • A hosting target with PostgreSQL for virtual keys and Redis 7.0 or newer for shared state across proxy instances.
  • A secret store for LITELLM_MASTER_KEY, which must start with sk-, plus provider credentials kept out of config files.
  • Network paths from developer laptops to the gateway, with DNS, TLS and an approach for IP restrictions if you use them.
  • An identity decision: SSO for the admin UI, and whether developers sign in with per-person keys or shared team keys.
  • Logging destinations and a retention rule for request logs.

Agree these owners, and their dates, in the written scope before build work starts.

Can our internal team deliver this without a partner?

A capable platform team can deliver it alone if it owns the gateway, the database and the identity setup. The VS Code step is the smallest part. The longer work is running the proxy, PostgreSQL and Redis, applying the master key and secret handling correctly, keeping the release on a supported minor version and setting budgets per key and team. Estimate the staff time that ongoing maintenance will take, not only the build. DeployOpen can deliver the build as a fixed-scope engagement, hand it over with documentation, or support it afterward under a retainer. Whichever route you choose, ask for the written scope, the deliverables and the handover plan.

Which Enterprise features matter for a developer rollout?

For a small pilot, the admin UI's SSO is free for up to 5 users from v1.76.0. Beyond that limit, you need an Enterprise license. Developer rollouts usually depend on Enterprise features such as SCIM for user provisioning, JWT authentication with identity provider tokens, audit logs, team RBAC, IP allowlisting, secret manager integrations (AWS, Azure, Google, HashiCorp Vault and CyberArk) and team-level guardrails and logging. Enterprise support includes a dedicated channel with the engineering team and optional 24/7 SLAs, with a 1 hour response for critical issues and 72 hours for security patches. Confirm licensing terms and support tiers with LiteLLM before you commit.

Does the gateway also control Copilot's own traffic?

The supplied facts cover the LiteLLM extension, which adds the gateway as a model provider in the chat picker. They do not confirm that Copilot's built-in model traffic can be routed through the proxy, so treat that as unconfirmed until you verify it. Read the LiteLLM GitHub Copilot integration tutorial and ask GitHub and LiteLLM in writing which endpoints Copilot calls, what data leaves the developer machine and whether any setting moves that traffic through the proxy. Test on a managed device with network capture and check the gateway logs. Until confirmed, state in your policy which traffic the gateway governs.

How do budgets and rate limits apply to each developer?

LiteLLM virtual keys support per-key, per-user and per-team budgets, TPM and RPM limits, temporary budget increases and restrictions to specific models. Virtual keys need a PostgreSQL database, so plan that database before you issue keys. Spend is tracked at the gateway, not in the editor, so the picker shows prices but the budget enforcement happens on the server. At scale, LiteLLM batches spend updates to the database every 60 seconds, so spend totals can lag slightly behind live usage. Set alert thresholds with that delay in mind, and test a budget cutoff with a test key before you rely on it for chargeback.

How DeployOpen scopes and delivers this integration

DeployOpen scopes this integration as a fixed-scope engagement with the written scope agreed before any work starts. For a Copilot and VS Code setup, the scope usually fixes four things: the LiteLLM gateway the chat users call, the extension rollout to developer machines, the budget and key design that governs spend per person and team, and the test plan that proves the picker, routing and limits behave as documented. The deliverables are written down with each one: the gateway configuration, the VS Code settings or extension package used for rollout, the virtual key and team layout, a test record, and an admin runbook. Your team should confirm which of these it expects to own after handover and which it wants DeployOpen to maintain.

Gateway planning comes first, because the budget design depends on it. DeployOpen reviews which models the picker should list, which providers sit behind them, and whether the gateway is backed by PostgreSQL with Redis once more than one proxy instance runs. The budget layer is designed alongside that work: per-key, per-user and per-team budgets, TPM and RPM limits, and model restrictions on virtual keys, with a decision on who may request a temporary budget increase. Testing covers the path a developer actually uses: the extension version check against the VS Code requirement, the models shown in the picker with their prices, a budget breach, and a key revocation. Confirm with your own administrators which test accounts and environments they can provide.

Ongoing support follows the handover through a retainer if you want one. Retainers can cover upgrades to newer LiteLLM releases, re-testing after VS Code or Copilot Chat changes, updates to model lists and budgets as teams change, and periodic security testing of the gateway. Ask any partner, DeployOpen included, for a quote that separates one-time scope from recurring support, names who performs each activity, and states how changes to scope are priced and approved in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.