CommandCodeAI / CommandCodeAI/command-code
Support custom API base URL and API key (OpenAI-compatible provider)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 4k
- Forks
- 350
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Feature Request
Allow commandcode to use a custom API base URL and API key from external providers (e.g. any OpenAI-compatible gateway), instead of being hardwired to api.commandcode.ai.
Motivation
Right now all models are routed through Command Code's own backend (api.commandcode.ai). Users on other providers — or self-hosted / relay gateways that expose an OpenAI-compatible /v1 endpoint — cannot point commandcode at them. The only knob that exists, COMMANDCODE_API_URL, switches between Command Code's own prod/staging/local environments; it does not accept an external provider base URL.
Proposed behavior
Something like the existing opencode / Claude Code config model:
- A config file and/or env vars, e.g.:
COMMANDCODE_BASE_URL=https://my-provider.example.com/v1COMMANDCODE_API_KEY=sk-...
- Optional custom model list (id → display name, context window, modalities) when pointing at a non-Command-Code backend.
- Priority: CLI flag > config file > env var > current auth.
Use case
I maintain an opencode.jsonc with a custom provider (npm: @ai-sdk/openai-compatible, baseURL + apiKey) and would love to drive commandcode with the same endpoint/key instead of a separate Command Code subscription key.
Environment
commandcode1.11.0- Linux, Node v26
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die vorhandene COMMANDCODE_API_URL-Konfiguration und den aktuellen Authentifizierungsweg nachzuverfolgen. Implementiere die vorgeschlagenen Quellen für COMMANDCODE_BASE_URL und COMMANDCODE_API_KEY, einschließlich CLI, Konfigurationsdatei, Umgebung und der Vorrangregel für die aktuelle Authentifizierung, sowie optionale Metadaten für benutzerdefinierte Modelle. Die Aufgabe ist abgeschlossen, wenn ein OpenAI-kompatibler externer Endpoint und Schlüssel ohne einen Command Code-Abonnementschlüssel verwendet werden können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- node.js
- Bereich
- api, cli
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100