Cursor

Route Cursor IDE AI requests through RelayPlane using the OpenAI-compatible API.

Setup

Cursor supports custom OpenAI-compatible API endpoints. Configure it to use RelayPlane:

  1. Open Cursor Settings → Models
  2. Set the OpenAI API Base URL to http://localhost:4100/v1
  3. Set your API key (this is passed through to the provider)
  4. Select a model name — use any supported model or relayplane:auto for smart routing

How It Works

Cursor sends requests to the /v1/chat/completions endpoint. RelayPlane:

  • Accepts the OpenAI-format request
  • Classifies task complexity from the conversation
  • Routes to the optimal model across any provider
  • Converts between API formats transparently (e.g., to Anthropic or Google)
  • Returns the response in OpenAI format

Recommended Model Names

Use these model names in Cursor for different routing strategies:

  • relayplane:auto — Automatic complexity-based routing
  • claude-sonnet-4-6 — Direct passthrough to a specific model
  • gpt-4o — Direct passthrough to OpenAI
Best practice: Use relayplane:auto as the model name and set routing.mode: "auto" in your config for maximum savings.