Skip to main content
Version: Latest (1.9.x dev)

Govern Cursor's model calls with DVARA (preview)

Preview

This is a preview. It is tested against Cursor's published request shapes, not yet against a live Cursor session. The setup and the limits below may change before it is final.

Cursor lets you replace the OpenAI base URL it uses with your own key. Set it to the DVARA AI governance platform and the model calls Cursor makes with that key get policy, PII rules, guardrails, budgets, cost records and an audit entry, billed to one DVARA workspace.

To govern the MCP tools Cursor's agent calls, see Govern Cursor's MCP tools. That works today and is separate from this page.

Point Cursor at DVARA​

You need:

  • A DVARA Gateway that is reachable from the internet over HTTPS. See the known limits below.
  • A provider on the Gateway for the models you pick.
  • A DVARA workspace API key. If the key has scopes, it needs completions:write.

In Cursor's model settings:

  1. Paste your DVARA workspace key into the OpenAI API Key field.
  2. Turn on the OpenAI base URL override and enter https://<gateway>/v1/cursor, for example https://gateway.acme.example.com/v1/cursor.
  3. Add the models you want, under names your Gateway routes.

Give each model a distinct name. Cursor refuses a model name that clashes with one of its built-in models. Use provider-prefixed ids that your Gateway routes, such as openai/<model-id>, or whatever names your routes use.

The /v1/cursor path is for Cursor only. Chat sends Chat Completions requests there; agent mode sends Responses-shaped requests. DVARA serves both.

What happens to Cursor's model variants?​

Cursor's model picker can send variants of a model name:

Cursor sendsDVARA does
<model>-fastRemoves -fast and routes <model>
<model>-thinking-<effort>, for example -thinking-highRemoves the suffix, routes <model>, and sets the reasoning effort to <effort>
Known limits
  • Tab completions never use a custom key, so they never reach DVARA.
  • Agent and Auto modes may still use Cursor's own models. Only calls made with a model you added go through DVARA.
  • Requests pass through Cursor's servers first, so the Gateway must be reachable from the internet. A Gateway on localhost or a private address fails with "Access to private networks is forbidden". Protect it with TLS and a key with only the scopes it needs.
  • While the base URL override is on, Cursor's built-in models stop working. Turn the override off to use them again.
  • The Cursor CLI (cursor-agent) cannot be pointed at a Gateway.
  • Cursor's local actions are not governed. File edits and terminal commands run on the developer's machine.

Troubleshooting​

Cursor does not accept the key. Paste your DVARA workspace key, as it is, into the OpenAI API Key field. Cursor does not need a key in OpenAI's own format.

"Access to private networks is forbidden". The base URL points at a private or local address. Use an internet-reachable address for the Gateway.

A model is refused with 400 no_provider. The model name, after any -fast or -thinking-<effort> suffix is removed, is not one your Gateway routes. Add a route, or rename the model in Cursor.

Where to go next​