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.

In short: Windsurf Cascade accepts a custom base URL through the OpenAI-compatible provider option in its Cascade settings, and caches the configuration until restart. Each turn resends the in-scope files plus history, which makes input — not output — the rate that decides the bill.
Before you start: you need an endpoint root ending in /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.

One Cascade turn at 250k input and 12k output tokens — the shape a multi-file refactor produces — at 25 turns a day over 20 working days. Rates checked 2026-09-20.
ModelVendorRate
in / out per 1M
Per Cascade turnPer month
gpt-5.6-lunaOpenAI$0.1 / $0.6$0.03$16
MiniMax-M3MiniMax$0.15 / $0.6$0.04$22
deepseek-v4-flashDeepSeek$0.22 / $0.66$0.06$31
gemini-3.7-flashGoogle$0.375 / $1.875$0.12$58
claude-haiku-4-5-20251001Anthropic$0.5 / $2.5$0.15$78
deepseek-v4-proDeepSeek$0.66 / $1.98$0.19$94
glm-5.3Zhipu$0.7 / $2.2$0.20$101
qwen3.8-maxAlibaba$1 / $3$0.29$143
claude-sonnet-5Anthropic$1 / $5$0.31$155
gpt-5.6-terraOpenAI$1 / $6$0.32$161
kimi-k3Moonshot$1.5 / $7.5$0.46$232
claude-opus-5Anthropic$2.5 / $12.5$0.78$388
Cost note. The cheapest lever in Cascade is scope, not model choice. Narrowing which files are in play cuts input on every single turn, and unlike switching to a cheaper model it does not cost you capability. A tightly scoped session on a flagship model frequently beats a broad session on a cheap one.

How this fails in practice

The failures that account for most setup problems, and what each one actually means.
What you seeWhat it usually isFix
Model not foundModel ID does not match the endpoint's list exactlyRead the ID from /v1/models and paste it
404 on every requestBase URL missing the /v1 segmentInclude the version segment in the base URL
Change has no effectProvider config is cached until restartRestart Windsurf after changing the endpoint
401 with a fresh keyKey not read, or a vendor-shaped request sent to a compatible endpointRe-enter the key; confirm the OpenAI-compatible provider is selected
Cannot find the settingMenu label differs by releaseSearch settings for the base URL field rather than a fixed menu path
Cost far higher than expectedEvery turn resends the whole in-scope contextNarrow file scope; shorten sessions
You need a key before the code below runs. Create an account, generate a key, and copy the base URL (https://aicomp.ai/v1). Create one free →
Check current rates → Free to sign up · $1 minimum top-up · No prepayment

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.

Related

Get API access