Melious
Integrations

Cursor

Cursor's built-in OpenAI compatibility lets it run against Melious with no extension

Cursor
by Anyspherecursor.com

Cursor is an AI-first code editor forked from VS Code, built by Anysphere. Core surfaces: Tab autocomplete, a chat sidebar, an agent mode that can edit across files in a single turn, and Cmd-K inline edit on a selection. It ships with OpenAI-compatible provider support baked into the settings UI — flipping the "Override OpenAI Base URL" toggle and pasting our base URL plus an API key is the whole integration. No plugin, no patched binary.

One thing up front: Tab autocomplete is the exception. It runs on Anysphere's own model (cursor-tab / cursor-small) on Anysphere infrastructure and isn't exposed to custom providers. Chat, agent mode, and Cmd-K inline edit honor the base URL override; Tab does not.

Setup

Open model settings

In Cursor: Settings → Models (or Cmd/Ctrl+, then search "Models").

Override the OpenAI base URL

Scroll to the OpenAI API Key section. Toggle Override OpenAI Base URL on. Paste:

https://api.melious.ai/v1

Paste your Melious key into OpenAI API Key:

sk-mel-<YOUR_API_KEY>

Click Verify. Cursor sends a probe request through the same auth headers — if your key works, you'll see a green check.

Register model IDs

Cursor's model picker only surfaces models you register. In the Model Names list, add the model IDs you want available — pick from melious.ai/hub/models. A safe single default:

glm-5.1

Save. The IDs now appear in the model dropdown at the bottom of the chat panel.

Switch the active model

In the chat panel, pick one of your Melious models. Chat, agent mode, and Cmd-K inline edit route through Melious. Tab autocomplete still uses Cursor's built-in model — Anysphere doesn't expose that surface to custom providers.

Which models work well in Cursor

Cursor's agent mode uses long tool-use chains and expects models to follow structured instructions reliably. Not every open-weight model is great at that. glm-5.1 is a safe starting point for chat, agent mode, and Cmd-K. For lighter inline edits you may want a smaller/faster model — check _meta.capabilities.tool_use on GET /v1/models?include_meta=true or filter at melious.ai/hub/models.

Tab autocomplete stays on Anysphere's own model regardless of what you set here.

What's different

  • No vendor-locked features. Anything Cursor labels "GPT-4 only" won't appear — that's a gate Cursor sets client-side, not something we control. Everything that works against any OpenAI-compatible provider works against us.
  • EU-residency for what we serve. Chat, agent, and Cmd-K calls stay in Melious's EU provider network. Tab autocomplete still goes to Anysphere — out of our hands.
  • Usage shows up on our side. Per-request cost is billed through your Melious account for chat and agent calls. Tab autocomplete keeps using Cursor's own model on Cursor's quota.
  • Per-developer keys with spend caps. Issue per-developer keys with monthly spend caps in the dashboard so a runaway agent loop doesn't surprise the team.

When it breaks

  • Invalid API key — you pasted without the sk-mel- prefix, or the key has been rotated. Generate a new one in account/api/keys.
  • Model not found — the name in Cursor's Model Names list is a typo. Check GET /v1/models for the canonical spelling.
  • Agent mode stalls — the model you picked doesn't tool-call reliably. Swap to glm-5.1.
  • Override OpenAI Base URL toggle grayed out — you're on a Cursor plan where admins lock the base URL. Neither chat nor agent will route to Melious until the admin allows the override.

Errors and retry patterns: Errors.

On this page