Quick start in 4 steps
- Download & load a model in Loco Open Loco Desktop, go to Models, and download a code-capable model such as Qwen2.5-Coder, DeepSeek-Coder, or Phi-3.5. Start the runtime server.
- Open the Connectors view Click Connectors in Loco's left sidebar. You will see pre-configured connector cards for your favorite IDEs and agents.
- Choose your tool & click Connect Click Connect on your chosen tool (e.g. Zed, OpenCode, Roo Code). The interactive setup modal automatically generates the exact configuration based on your currently running model.
- Copy configuration & test Paste the generated settings into your IDE or environment, then click Test Connection in Loco to verify live inference and tool capabilities.
Standard OpenAI-Compatible API
Loco does not require brittle, proprietary IDE plugins. Instead, Loco exposes an ultra-fast, OpenAI-compatible REST & Server-Sent Events (SSE) streaming API directly on your machine:
Endpoint URLs
Local (This PC):http://127.0.0.1:5318/v1
LAN (Remote machine):http://<YOUR-LAN-IP>:5318/v1
Core Endpoints
GET /v1/models — Dynamic model discovery with context size and capabilities.
POST /v1/chat/completions — Full streaming (SSE) and non-streaming code completions.
Supported AI IDEs & Coding Agents
Loco provides built-in configuration generators and testing for all major modern AI coding environments.
1. Zed
Zed features an extremely fast built-in Assistant and Agent supporting OpenAI-compatible providers. Loco is the local provider.
Add the following to your Zed settings.json (or configure via the Zed Agent Settings UI):
{
"language_models": {
"openai_compatible": {
"Loco": {
"api_url": "http://127.0.0.1:5318/v1",
"available_models": [
{
"name": "YOUR_MODEL_ID",
"max_tokens": 16384
}
]
}
}
}
}
In Zed, press Ctrl+? to open the Assistant panel, select Loco as the provider, and start chatting or editing code directly.
2. OpenCode
OpenCode supports custom OpenAI-compatible providers via @ai-sdk/openai-compatible. Loco generates a turnkey opencode.json file:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"loco": {
"npm": "@ai-sdk/openai-compatible",
"name": "Loco Local AI",
"options": {
"baseURL": "http://127.0.0.1:5318/v1"
},
"models": {
"YOUR_MODEL_ID": {
"name": "Local Model"
}
}
}
}
}
Save this file in your project root or user config directory, then launch OpenCode to begin full agentic coding.
3. Kilo Code
Kilo Code connects seamlessly to OpenAI-compatible endpoints with automatic model discovery.
- Provider: Custom / OpenAI Compatible
- Provider Name:
Loco Local AI - Base URL:
http://127.0.0.1:5318/v1 - API Key: Leave blank or enter
loco-local - Model: Select your loaded model from the discovered list.
4. Roo Code
Roo Code is a powerful agentic coding extension for VS Code and VSCodium.
- API Provider: OpenAI Compatible
- Base URL:
http://127.0.0.1:5318/v1 - API Key:
loco-local(or your custom key) - Model ID: Your loaded model ID (e.g.
qwen2.5-coder-7b-instruct)
5. Continue
Continue supports chat, code editing, inline autocomplete, and custom model roles. Add this provider block to ~/.continue/config.yaml or config.json:
models:
- name: Loco Local Model
provider: openai
apiBase: http://127.0.0.1:5318/v1
model: YOUR_MODEL_ID
apiKey: loco-local
contextLength: 16384
6. Aider
Aider is a popular command-line pairing agent. Set your environment variables and point Aider to Loco:
PowerShell (Windows):
$env:OPENAI_API_BASE="http://127.0.0.1:5318/v1"
$env:OPENAI_API_KEY="loco-local"
aider --model openai/YOUR_MODEL_ID
Command Prompt (cmd.exe):
set OPENAI_API_BASE=http://127.0.0.1:5318/v1
set OPENAI_API_KEY=loco-local
aider --model openai/YOUR_MODEL_ID
7. Visual Studio Code
While native VS Code does not currently offer an open generic OpenAI-compatible backend for built-in Copilot, it offers first-class support through extensions.
Loco recommends installing Roo Code, Continue, or Cline from the VS Code Marketplace and pointing them to http://127.0.0.1:5318/v1.
8. JetBrains IDEs
IntelliJ IDEA, PyCharm, WebStorm, and other JetBrains IDEs can connect to Loco via the Kilo Code or Continue plugins.
Loco provides the high-performance local inference server on http://127.0.0.1:5318/v1, while the extension brings inline completions and chat straight into your JetBrains editor.
Model Capabilities & Diagnostics
Inside Loco's Connectors view, the built-in diagnostic suite evaluates your running model in real time:
- Context Window: Verifies the maximum context size configured for your model.
- Tool Calling: Verifies function/tool calling capability needed by autonomous agents.
- Vision & Multimodal: Flags if your model can analyze UI screenshots and diagram files.
- Reasoning: Detects whether the model supports chain-of-thought thinking tokens.
Click the Test Connection button in any connector modal to send an automated test payload and verify live inference speed and latency before you begin coding.
LAN & Multi-Machine Workstations
If you run Loco on a powerful desktop or home server with dedicated GPUs, you can code on your lightweight laptop over your local network.
Select the Another PC on my LAN toggle in the connector modal to automatically generate endpoints using your machine's local IP address (e.g. http://192.168.1.50:5318/v1).
Security & Network Boundaries
Loco never exposes endpoints to the public internet automatically. Never forward port 5318 or 5319 on your home router to the public internet without an encrypted tunnel (such as Tailscale or WireGuard) and strict authentication.
