github / github/copilot-cli

Tools not available when using custom BASE_URL with local API server

Offen
#2,919 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:configuration area:tools
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### Describe the bug

## Description

When connecting GitHub Copilot CLI to a local API server via custom `BASE_URL`, the tools exposed by the server (bash, view, edit, curl, etc.) are not recognized or made available to the agent, even though the server
correctly exposes them in OpenAI-compatible format.

## Environment

- **Copilot CLI version:** 1.0.34
- **Model:** claude-sonnet-4.5
- **Configuration:**
- `BASE_URL=http://localhost:8642/v1`
- `COPILOT_OFFLINE=true`
- Local API server (Hermes) running on port 8642
- Server exposes tools in OpenAI format via `/v1/chat/completions`

## Expected Behavior

When the local API server exposes tools in the OpenAI-compatible format, Copilot CLI should recognize and make these tools available to the agent, similar to how it works with the default GitHub Copilot backend.

## Actual Behavior

Only a limited set of tools are available (`memory`, `session_search`). Standard tools like `bash`, `view`, `edit`, `curl`, `grep`, `glob` are not accessible, even though:
- The server correctly returns tool definitions in API responses
- The same server works with tools when accessed through other clients
- The tools are properly formatted according to OpenAI function calling spec

## Steps to Reproduce

1. Set up a local API server that implements OpenAI-compatible `/v1/chat/completions` endpoint with tools
2. Configure Copilot CLI with custom BASE_URL pointing to local server
3. Start a Copilot CLI session
4. Attempt to use standard tools (bash, view, edit, etc.)
5. Observe that tools are not available

## Workaround Attempted

Disabled all tools in the API server config (`platform_toolsets.api_server: []`) to run in pure text mode, but this defeats the purpose of having a local agent with full tooling capabilities.

## Request

Please add support for recognizing and utilizing tools exposed by custom BASE_URL endpoints, enabling full local/self-hosted agent deployments with complete tooling functionality.

## Additional Context

This limitation prevents using Copilot CLI as a frontend for self-hosted or local AI agent infrastructure, which would be valuable for:
- Privacy-sensitive environments
- Custom tool development
- Air-gapped deployments
- Local model experimentation

### Affected version

GitHub Copilot CLI 1.0.34.

### Steps to reproduce the behavior

_No response_

### Expected behavior

Connect to a remote Server like Hermes Agent:
export COPILOT_PROVIDER_BASE_URL=http://localhost:8642/v1
export COPILOT_PROVIDER_API_KEY=api-key-value
export COPILOT_MODEL=claude-sonnet-4.5
export COPILOT_OFFLINE=true

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Es werden keine Quelldateien oder Tests genannt. Beginne damit, die Sitzung mit der dokumentierten BASE_URL, den Provider-Variablen und dem OpenAI-kompatiblen /v1/chat/completions-Endpunkt nachzustellen, und verfolge dann, wo die zurückgegebenen Tool-Definitionen verarbeitet werden. Als abgeschlossen gilt die Aufgabe, wenn die vom benutzerdefinierten Endpunkt bereitgestellten Tools vom Agenten erkannt werden und verfügbar sind, während das bestehende Verhalten intakt bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
api, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

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