Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sicherheitslücken (CVE)5 ways AI is reshaping the cybersecurity job market(21.09.2026 um 10:25 Uhr)
IT Security NachrichtenRevoking the token didn’t kill the backdoor(21.09.2026 um 11:00 Uhr)
Malware / Trojaner / VirenChainScript-RAT per Polygon: ClickFix-Kampagnen drehen C2-Infrastruktur(21.09.2026 um 10:55 Uhr)
IT Security NachrichtenEnterprise Mobile KI: So lassen sich Shadow-AI-Risiken kontrollieren(21.09.2026 um 12:00 Uhr)
Malware / Trojaner / VirenChainScript-RAT setzt auf Polygon-Blockchain für C2-Rotation(21.09.2026 um 12:19 Uhr)
Sicherheitslücken (CVE)5 ways AI is reshaping the cybersecurity job market(21.09.2026 um 10:25 Uhr)
IT Security NachrichtenRevoking the token didn’t kill the backdoor(21.09.2026 um 11:00 Uhr)
Malware / Trojaner / VirenChainScript-RAT per Polygon: ClickFix-Kampagnen drehen C2-Infrastruktur(21.09.2026 um 10:55 Uhr)
IT Security NachrichtenEnterprise Mobile KI: So lassen sich Shadow-AI-Risiken kontrollieren(21.09.2026 um 12:00 Uhr)
Malware / Trojaner / VirenChainScript-RAT setzt auf Polygon-Blockchain für C2-Rotation(21.09.2026 um 12:19 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Configure Local LLM with OpenCode

Add any OpenAI compatible endpoint to OpenCode OpenCode doesn’t currently expose a simple “bring your own endpoint” option in its UI. Instead, it ships with a predefined list of cloud providers. OpenCode fully supports OpenA…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Add any OpenAI compatible endpoint to OpenCode



OpenCode doesn’t currently expose a simple “bring your own endpoint” option in its UI. Instead, it ships with a predefined list of cloud providers.



OpenCode fully supports OpenAI-compatible APIs, which means you can plug in any compatible endpoint: including vLLM, LM Studio, Ollama (with a proxy), or your own custom server.



This post shows how to wire up a local vLLM server as a provider, but the same approach works for any OpenAI-compatible endpoint.









Prerequisites




  • OpenCode installed and working

  • A running OpenAI-compatible endpoint
    (for example: a local vLLM server on http://<host>:8000/v1)



vLLM exposes a /v1 API that matches OpenAI’s Chat Completions API, which makes it an ideal drop-in backend.









Step 1 – Register the provider in OpenCode auth



OpenCode stores provider authentication details in:




~/.local/share/opencode/auth.json






If the file does not exist yet, create it.



Add the following entry:




{
"vllm": {
"type": "api",
"key": "sk-local"
}
}









Notes




  • vLLM does not require an API key, but OpenCode expects one to exist.

  • Any placeholder value works (sk-local is a common convention).

  • If auth.json already exists, merge the vllm block into the existing JSON.









Step 2 – Define the OpenAI-compatible provider



Now define the provider itself in:




~/.config/opencode/opencode.json






Create the file if it doesn’t exist.




{
"$schema": "https://opencode.ai/config.json",
"provider": {
"vllm": {
"npm": "@ai-sdk/openai-compatible",
"name": "vLLM (local)",
"options": {
"baseURL": "http://100.108.174.26:8000/v1"
},
"models": {
"Qwen3-Coder-30B-A3B-Instruct": {
"name": "My vLLM model"
}
}
}
},
"model": "vllm/Qwen3-Coder-30B-A3B-Instruct",
"small_model": "vllm/Qwen3-Coder-30B-A3B-Instruct"
}









Key fields explained





  • @ai-sdk/openai-compatible
    Tells OpenCode to treat this provider as OpenAI-compatible.


  • baseURL
    Must point to the /v1 endpoint of your server.


  • models
    The key must exactly match the model ID exposed by the backend.


  • model / small_model
    Sets the default model used by OpenCode.









Selecting your model



After these steps, restart OpenCode if it’s running.



You can now use:




/model






Your custom provider and model will appear in the selection list.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Configure Local LLM with OpenCode

Thematisch verwandte Begriffe: Configure, Local, with, OpenCode · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94036 | A security flaw has been discovered in D-Link DIR-X1860 and DIR-X1860Z u…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick