Integration guide
Cline & Roo Code Custom API Provider Setup (/v1 & /anthropic)
Connect VS Code Cline and Roo Code via OpenAI Compatible (https://proxystacks.com/v1) or native Anthropic (https://proxystacks.com/anthropic) to pair funsion-sonnet-5-5 (-50%) and gpt-6.1-sol (-30%) in Plan/Architect mode with deepseek-v4.1-flash ($0.18/1M) and glm-5.3 ($0.98/1M) in Act/Code mode.
Setup
- 1
Generate a Relay API key (sk-relay-...) in the console; a single prepaid balance (from US$10) works across both /v1 and /anthropic.
- 2
In VS Code Cline or Roo Code Settings, pick OpenAI Compatible with Base URL https://proxystacks.com/v1 — or pick Anthropic and set Custom Base URL to https://proxystacks.com/anthropic.
- 3
Set Model ID to funsion-sonnet-5-5, gpt-6.1-sol, deepseek-v4.1-flash, or glm-5.3, configure 1,000,000 context / 64,000 max output tokens, and save separate Plan & Act profiles.
Configuration
{
"apiProvider": "openai",
"openAiBaseUrl": "https://proxystacks.com/v1",
"openAiApiKey": "sk-relay-your-key",
"openAiModelId": "deepseek-v4.1-flash",
"openAiStreamingEnabled": true
}Supports both OpenAI Compatible (/v1) and native Anthropic (/anthropic) provider profiles for Plan/Act model pairing in VS Code Cline & Roo Code.
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 — Funsion 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.
{
// Cline / Roo Code multi-profile setup (/anthropic + /v1; CN edge: https://hk.proxystacks.com)
"providerProfiles": {
"currentApiConfigName": "relay-claude-agent",
"apiConfigs": {
"relay-claude-agent": {
// Native Anthropic Messages API — 50% off Claude 5.5 benchmark
"apiProvider": "anthropic",
"anthropicBaseUrl": "https://proxystacks.com/anthropic",
"apiKey": "sk-relay-your-key",
"apiModelId": "funsion-sonnet-5-5",
"modelMaxTokens": 64000
},
"relay-gpt-architect": {
// OpenAI-compatible /v1 — GPT-6.1 Sol (-30%) for Plan / Architect mode
"apiProvider": "openai",
"openAiBaseUrl": "https://proxystacks.com/v1",
"openAiApiKey": "sk-relay-your-key",
"openAiModelId": "gpt-6.1-sol",
"openAiCustomModelInfo": { "contextWindow": 1000000, "maxTokens": 64000 }
},
"relay-deepseek-act": {
// $0.18/1M input — high-speed Act / bulk file edits
"apiProvider": "openai",
"openAiBaseUrl": "https://proxystacks.com/v1",
"openAiApiKey": "sk-relay-your-key",
"openAiModelId": "deepseek-v4.1-flash",
"openAiCustomModelInfo": { "contextWindow": 1000000, "maxTokens": 64000 }
},
"relay-glm-repo": {
// $0.98/1M input — 1M context full-repo comprehension
"apiProvider": "openai",
"openAiBaseUrl": "https://proxystacks.com/v1",
"openAiApiKey": "sk-relay-your-key",
"openAiModelId": "glm-5.3",
"openAiCustomModelInfo": { "contextWindow": 1000000, "maxTokens": 64000 }
}
}
}
}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
Should I pick OpenAI Compatible (/v1) or Anthropic (/anthropic) in Cline and Roo Code?
Both endpoints accept the same sk-relay-... key. Use Anthropic with Custom Base URL https://proxystacks.com/anthropic for funsion-sonnet-5-5 or funsion-opus-5-5 (50% off Claude 5.5 benchmark) to preserve native Anthropic Messages formatting and prompt caching; use OpenAI Compatible with https://proxystacks.com/v1 for gpt-6.1-sol (-30%), deepseek-v4.1-flash ($0.18/1M), and glm-5.3 ($0.98/1M).
How do I pair Plan & Act models (or Roo Code Architect & Code profiles) to cut costs?
Save two API configuration profiles: bind Plan / Architect mode to funsion-sonnet-5-5 (-50%) or gpt-6.1-sol (-30%) for design and file planning, and bind Act / Code mode to deepseek-v4.1-flash ($0.18/1M input, $0.0895/1M off-peak) or glm-5.3 ($0.98/1M) for high-volume edits and terminal loops.
How do I prevent truncated file diffs on custom models in Cline / Roo Code?
Expand Model Configuration (or set openAiCustomModelInfo in exported Roo Code JSON), enable streaming, and set Context Window to 1000000 and Max Output Tokens to 64000 so large multi-file patches stream without early cutoff.