github / github/copilot-cli

Support custom model endpoint in Copilot CLI (like VS Code)

Offen
#4,003 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:models
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### Proposed solution

Title: Support custom model endpoint in Copilot CLI (like VS Code)

VS Code's Language Models panel allows configuring custom endpoints
for local or private models. Copilot CLI should have the same capability.

This would enable:
- Local model development and testing
- Enterprise private model deployment
- Integration with Ollama, LLaMA.cpp, etc.

Image

Copilot CLI currently only supports GitHub's official models (Claude, GPT-5), but VS Code's Copilot extension supports custom model endpoints through the Language Models API.

I need to use a local model (running on my machine) or a custom API endpoint with Copilot CLI, just like I can in VS Code. This would enable:

1. **Local model development** - Test custom models locally before deployment
2. **Private/Enterprise models** - Use organization's private LLM endpoints
3. **Cost control** - Run models locally instead of using API quotas
4. **Integration with local tools** - Connect to Ollama, LLaMA.cpp, vLLM, or other local inference servers

## Proposed solution

Add support for custom model endpoints in Copilot CLI, similar to VS Code's Language Models panel:

```bash
copilot /model-config
# or
copilot --model-endpoint http://localhost:8000
```
Configuration in ~/.copilot/config.json:

```JSON

{
"customModels": [
{
"name": "my-local-model",
"endpoint": "http://localhost:8000/v1",
"apiKey": "optional-key"
}
]
}
```
Then select it in the /model picker just like official models.

### Example prompts or workflows

_No response_

### Additional context

VS Code already has this feature via Language Models API
Many users want to use local models for privacy/cost reasons
OpenAI-compatible API format is now standard (Ollama, vLLM, etc.)
This would make Copilot CLI feature-parity with VS Code in model selection

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Überprüfung des vorhandenen /model pickers und der Konfigurationsverarbeitung und vergleiche anschließend die vorgeschlagene Form von benutzerdefinierten Modellen in ~/.copilot/config.json mit der in diesem Issue beschriebenen VS Code Language Models API. Als erledigt gilt die Aufgabe, wenn Copilot CLI einen lokalen oder privaten Endpunkt konfigurieren und auswählen kann, einschließlich der hier genannten OpenAI-kompatiblen Dienste wie Ollama, vLLM oder LLaMA.cpp.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
ollama, shell, vscode
Bereich
ai, api, cli
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.