Windsurf Cascade with a custom OpenAI-compatible endpoint
Cascade is an agent, not a chat box. Every turn re-reads the files in scope plus everything that came before it, which makes Windsurf one of the most input-heavy tools you can point at a gateway — and makes the input rate, not the headline output rate, the number that decides the bill.
/v1 and a key from that endpoint. The setting below is the only thing that changes — request and response handling stay identical. Rates checked 2026-09-20.Finding the setting
Windsurf's provider configuration lives in Settings under the Cascade section. The label has moved between releases — some versions call it Model, others API Endpoint or Custom Provider — so the reliable approach is to open Settings and search for the base URL field rather than following a fixed menu path. You are looking for three things: a provider selection, a base URL, and a key.
Select the OpenAI-compatible provider rather than a named vendor. That choice is what makes Windsurf send standard /v1/chat/completions requests instead of a vendor-specific shape, and it is the reason the same endpoint works across every tool in this cluster.
The same thing in settings JSON
If you prefer configuration you can commit or switch by script, Windsurf exposes the same three values as JSON keys. The names have varied across releases, so treat this as the shape rather than a literal to paste:
{
"ai.provider": "openai-compatible",
"ai.baseUrl": "https://aicomp.ai/v1",
"ai.apiKey": "sk-..."
}
The base URL needs its version segment. Windsurf appends the resource path to whatever you give it, so a URL missing /v1 produces a 404 on every call — and unlike some tools it does not warn you that the path looks wrong.
Model IDs are passed through verbatim
Cascade does not fuzzy-match model names. Whatever you enter goes into the request as the model field, and an inexact identifier comes back as a model-not-found error rather than a suggestion. This is the single most common setup failure, and the fix is boring: read the ID from the endpoint's own model list and paste it.
curl -s https://aicomp.ai/v1/models -H "Authorization: Bearer $KEY" \
| python3 -c "import sys,json;print('\n'.join(m['id'] for m in json.load(sys.stdin)['data']))"
What Cascade actually costs
Cascade's request shape is lopsided. A working turn carries the files in scope, the retrieved context and the whole prior conversation before the model produces a single token of output — so a session that ends in a twenty-line diff can easily have moved hundreds of thousands of input tokens. Any comparison based on output rates is measuring the wrong half of the request.
| Model | Vendor | Rate in / out per 1M | Per Cascade turn | Per month |
|---|---|---|---|---|
| gpt-5.6-luna | OpenAI | $0.1 / $0.6 | $0.03 | $16 |
| MiniMax-M3 | MiniMax | $0.15 / $0.6 | $0.04 | $22 |
| deepseek-v4-flash | DeepSeek | $0.22 / $0.66 | $0.06 | $31 |
| gemini-3.7-flash | $0.375 / $1.875 | $0.12 | $58 | |
| claude-haiku-4-5-20251001 | Anthropic | $0.5 / $2.5 | $0.15 | $78 |
| deepseek-v4-pro | DeepSeek | $0.66 / $1.98 | $0.19 | $94 |
| glm-5.3 | Zhipu | $0.7 / $2.2 | $0.20 | $101 |
| qwen3.8-max | Alibaba | $1 / $3 | $0.29 | $143 |
| claude-sonnet-5 | Anthropic | $1 / $5 | $0.31 | $155 |
| gpt-5.6-terra | OpenAI | $1 / $6 | $0.32 | $161 |
| kimi-k3 | Moonshot | $1.5 / $7.5 | $0.46 | $232 |
| claude-opus-5 | Anthropic | $2.5 / $12.5 | $0.78 | $388 |
How this fails in practice
| What you see | What it usually is | Fix |
|---|---|---|
| Model not found | Model ID does not match the endpoint's list exactly | Read the ID from /v1/models and paste it |
| 404 on every request | Base URL missing the /v1 segment | Include the version segment in the base URL |
| Change has no effect | Provider config is cached until restart | Restart Windsurf after changing the endpoint |
| 401 with a fresh key | Key not read, or a vendor-shaped request sent to a compatible endpoint | Re-enter the key; confirm the OpenAI-compatible provider is selected |
| Cannot find the setting | Menu label differs by release | Search settings for the base URL field rather than a fixed menu path |
| Cost far higher than expected | Every turn resends the whole in-scope context | Narrow file scope; shorten sessions |
https://aicomp.ai/v1).
Create one free →
Confirming it took effect
Run one Cascade turn, then check the gateway usage log for the request. A response alone proves nothing — Cascade will happily answer from a previously configured provider, and the UI does not label which one replied. If nothing appears in the log, restart the editor first; cached provider configuration is the usual cause.
FAQ
Where is the custom endpoint setting in Windsurf?
In Settings, under the Cascade section — look for the model provider or custom API endpoint control. The label has moved between releases (sometimes Model, sometimes API Endpoint, sometimes Custom Provider), so search the settings for the base URL field rather than hunting for a fixed menu path. The two values you need are always the same: a base URL and a key.
Do I have to use the settings JSON instead of the UI?
No, but it is worth knowing the keys exist. Windsurf also exposes the same configuration through its settings JSON as a provider, base URL and key, which is handy when you want the endpoint checked into a project or switched by script. The UI is the supported path; the JSON is the one that survives a reinstall.
Why does Cascade say the model was not found?
Because the model ID has to match exactly. Cascade passes whatever string you enter straight through as the model field, so a shortened or reordered identifier is a model error rather than a typo warning. Read the ID from the endpoint's own model list and paste it rather than typing it.
Does changing the endpoint require a restart?
Usually yes. Windsurf caches provider configuration, and a Cascade session opened before the change keeps using the old endpoint until the editor restarts. If a change appears to have no effect, restart before you start debugging the URL.
Is Cascade's cost driven by input or output?
Overwhelmingly input. Each turn carries the files in scope plus the accumulated history before the model writes anything, so a session that produces a short diff can consume a very large multiple of that diff in tokens. That is why the table above prices a 250k-input turn rather than a chat-shaped one.
Can I run Cascade and my own key at the same time?
Yes — keep the default provider configured and switch between them, which is the cheapest way to compare. Cost per completed task is the metric to use, not cost per token: a model that finishes in fewer turns often wins even at a higher rate.