Cursor
Cursor reads model configuration from its in-app settings panel rather than from environment variables. The gateway plugs in via the “OpenAI Base URL Override” field. Once configured, every Cursor completion (Cmd-K, Tab autocomplete, the in-editor chat) routes through the gateway.
Drop-in switch
Open Cursor settings → Models → expand the OpenAI section.
- OpenAI API Key: your gateway key (
gw_live_xxxxxxxx). - OpenAI Base URL:
https://gateway.iq-routing.com/v1 - Override: check the box.
Hit Verify. Cursor sends a single chat.completions.create against the
gateway and confirms the key works.
Verify it routes
After the verify step succeeds, open the Cursor chat panel and send a
short prompt (“say hello”). Within a few seconds the response
appears with the gateway's standard latency. Open your dashboard at
/requests and the most-recent row is the Cursor request, with the
classifier's chosen model and the cache-hit status.
Cursor's autocomplete uses a separate code-completion model that routes through the gateway transparently when the override is set. Tab autocomplete latency is the gateway's p50 (under 200 ms) plus Cursor's own debounce (about 250 ms by default).
Using capability aliases
The cap:<name> syntax in the model field tells the gateway to pick a
concrete model at routing time based on the capability's stable
intent rather than a pinned model id. The operator's per-org
overrides plus the focus-mode bias plus the circuit-breaker state shape
the resolved tuple. The six default capabilities are reason-heavy,
tool-call-strict, long-context-128k, vision, cheap-fast, and
json-mode.
Cursor's Models panel accepts a custom model id in the “Model
Name” field once the OpenAI Base URL Override is set to the
gateway. Type cap:reason-heavy (or any of the six capability ids) and
Cursor sends that string through as the model field on each
chat.completions.create call. For a JSON-config alternative, edit
~/.cursor/settings.json directly:
{
"openai.baseUrl": "https://gateway.iq-routing.com/v1",
"openai.apiKey": "gw_live_xxxxxxxx",
"openai.modelName": "cap:reason-heavy"
}
The resolved provider plus model surface in the x-iq-routing
response header (a JSON-encoded payload with chosen_provider and
chosen_model fields, among others), so the dashboard's /requests view
shows which concrete model handled each Cursor request. See the
capability aliases docs for the full resolver
decision tree plus the override mechanics. The operator can override
the default capability mapping via the capabilities dashboard editor at
/settings/capabilities.
Common gotchas
Cursor caches the “Verify” result. If you change the override and Cursor still uses the old base URL, restart Cursor; the cache clears on app launch.
The override applies to OpenAI-shape calls. Cursor's Anthropic
integration uses the Anthropic SDK separately; if you also use Cursor's
Claude features, configure the Anthropic section with the same gateway
origin (https://gateway.iq-routing.com, no /v1 suffix) and the
same gateway key.
The Composer feature (multi-file edits) sends batched requests. Each one
appears as its own row in /requests; the gateway does not collapse
them. If you exceed your daily budget mid-Composer-session, the gateway
returns 429 and Cursor surfaces the error in the Composer dialog with a
clear “daily budget exhausted” message.
The Cursor Tab feature respects the gateway's 429 cooldown; an
exhausted cap pauses Tab completions until the cooldown clears. Watch
your /dashboard spend bar during long coding sessions.
Privacy mode (Cursor's “Privacy Mode” setting) routes through Cursor's servers regardless of the override. To route Cursor privacy-mode traffic through the gateway, disable Cursor's privacy mode and rely on your own gateway-side logging policy.
Screenshot: the override panel layout is Cursor-version-specific. The screenshot at
/docs/cursor-config.pngwas captured on Cursor 0.46. If your Cursor version differs, the field labels may move; the override toggle remains the load-bearing configuration.