Integration guide
Kilo Code Custom Provider Setup (.kilo/kilo.jsonc & VS Code)
Connect Kilo Code CLI, VS Code, and JetBrains via ./.kilo/kilo.jsonc or Settings → Providers (https://proxystacks.com/v1) with tool_call: true enabled — pairing claude-sonnet-5-5 (-50% vs official USD) and gpt-6.1-sol (-30%) in Orchestrator/Architect modes with glm-5.3 ($0.98/1M) and deepseek-v4.1-flash ($0.18/1M) in Code/Debug modes.
Setup
- 1
Export RELAY_API_KEY="sk-relay-..." from your ProxyStacks Relay console (single prepaid USD balance from US$5, 0% top-up fee, non-expiring).
- 2
Create ./.kilo/kilo.jsonc (project) or ~/.config/kilo/kilo.jsonc (global) with provider.relay using npm "@ai-sdk/openai-compatible" and baseURL "https://proxystacks.com/v1" — or select OpenAI Compatible in Kilo Code Settings → Providers.
- 3
Set tool_call: true and limit: { context, output } on each model entry (claude-sonnet-5-5, gpt-6.1-sol, glm-5.3, deepseek-v4.1-flash) so Orchestrator, Architect, Code, and Debug modes can execute edits and MCP tools.
Configuration
{
"provider": {
"relay": {
"options": {
"baseURL": "https://proxystacks.com/v1",
"apiKey": "sk-relay-your-key"
},
"models": {
"deepseek-v4.1-flash": {
"name": "deepseek-v4.1-flash",
"tool_call": true,
"reasoning": true,
"limit": {
"context": 1000000,
"output": 64000
}
}
}
}
}
}Configure ./.kilo/kilo.jsonc with @ai-sdk/openai-compatible and tool_call: true to split Orchestrator/Architect and Code/Debug across Claude, GPT, GLM, and DeepSeek.
Advanced config: environment variable API key, multi-model routing & max output tokens
Use a project-specific config or multi-profile setup with environment variable keys, flagship and fast models — Claude Opus/Sonnet 5.5 (-50%), GPT-6.1 Sol / GPT-6 Luna (-30%), DeepSeek V4.1 Flash (-40%), GLM-5.3 & Kimi K3.1 Pro (-30%) — and explicit context/output token limits.
{
// ./.kilo/kilo.jsonc or ~/.config/kilo/kilo.jsonc — Mode-separated multi-model config + .kilocode/mcp.json
// APAC / CN low-latency endpoint: "https://hk.proxystacks.com/v1" (or native Anthropic: "https://proxystacks.com/anthropic")
"provider": {
"relay": {
"options": {
"baseURL": "https://proxystacks.com/v1",
"apiKey": "{env:RELAY_API_KEY}"
},
"models": {
"claude-sonnet-5-5": {
"name": "Claude Sonnet 5.5 (-50% · Architect & Orchestrator)",
"tool_call": true,
"reasoning": true,
"limit": { "context": 1000000, "output": 64000 }
},
"gpt-6.1-sol": {
"name": "GPT-6.1 Sol (-30% · Deep Debug)",
"tool_call": true,
"reasoning": true,
"limit": { "context": 1000000, "output": 64000 }
},
"deepseek-v4.1-flash": {
"name": "DeepSeek V4.1 Flash ($0.18/1M · Fast Code Edits)",
"tool_call": true,
"limit": { "context": 1000000, "output": 64000 }
},
"glm-5.3": {
"name": "GLM-5.3 ($0.98/1M · 1M Repo Context)",
"tool_call": true,
"reasoning": true,
"limit": { "context": 1000000, "output": 64000 }
}
}
}
},
// Project MCP tools (.kilocode/mcp.json or top-level mcp block):
"mcp": {
"filesystem": {
"type": "local",
"command": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."],
"enabled": true
}
}
}Troubleshooting
- 401: check the Relay key and authentication header. Never paste a secret into a support ticket.
- 404: use an exact published model ID and the documented base URL, not an upstream alias.
- For streaming use stream: true. Codex uses Responses; keep disable_response_storage = true.
Common questions
Where are kilo.jsonc and .kilocode/mcp.json stored for project vs global settings?
Kilo Code loads workspace config from ./.kilo/kilo.jsonc (or root kilo.jsonc) and MCP server definitions from ./.kilocode/mcp.json before falling back to global ~/.config/kilo/kilo.jsonc. Reference "{env:RELAY_API_KEY}" so you can safely commit mode and model limits to Git.
Why must tool_call: true be set on custom models in kilo.jsonc?
Kilo Code's Orchestrator, Architect, Code, and Debug modes rely on structured tool calls for file edits and terminal commands. Declaring "tool_call": true and "limit": { "context": 1000000, "output": 64000 } ensures custom models unlock agentic editing without diff truncation.