Skip to content

Connect Cursor#

Connect Cursor to OptScale AI so IDE agent chats use your organization's governed model catalog through the OpenAI-compatible gateway endpoint.

In Chat, copy Base URL, API key, and Model name from Get connection values from Chat before you open Cursor settings.

For shared model naming rules and limitations, see External Tools overview.

Prerequisites#

Ensure the following prerequisites are met before configuring Cursor:

  • An organization exists and at least one Active provider is configured.
  • Allowed providers are assigned for the user connecting Cursor to OptScale AI.
  • The cluster exposes a valid TLS certificate (HTTPS is required for the gateway Base URL).
  • When using Cursor agents with tools, select models that support tool execution before copying Model name.

Configure Cursor#

  1. Open the Cursor Settings page:

    • For Windows and Linux: FilePreferencesCursor Settings

      Cursor File menu with Preferences and Cursor Settings selected on Windows or Linux

    • For macOS: CursorSettingsCursor Settings

      Cursor menu with Settings and Cursor Settings selected on macOS

  2. Go to Models → click View All Models.

    Cursor Settings Models page with Models sidebar and View All Models highlighted

  3. Click +Add Custom Model.

    Cursor Settings Models page with Add Custom Model highlighted

  4. Enter the model name:

    • In OptScale AI Chat, select the provider and model you want to connect. Then go to Connect this model to external toolsCURSOR and copy the Model name value.

      OptScale AI Copy Model Name

    • In Cursor, paste the copied value into the Enter model name field, then click Add.

      Cursor Settings Models page Paste Model Name

  5. Enter the API key and Base URL:

    • In Cursor, expand the API Keys section.

      Cursor expand API Key section

    • In the Connect this model to external toolsCURSOR dialog in OptScale AI Chat, copy the API key value.

      OptScale AI Chat copy API Key

    • In Cursor, paste the copied value into the OpenAI API Key field.

      Cursor paste API Key

    • In Cursor, enable Override OpenAI Base URL.

    • In the same Connect this model to external toolsCURSOR dialog in OptScale AI Chat, copy the Base URL value.

      OptScale AI Chat copy Base URL

    • In Cursor, replace the existing value in the Override OpenAI Base URL field with the copied value.

      Cursor paste Base URL

  6. Save the configuration.

Configured models become available in Cursor chats and agent sessions.

Verify the Cursor connection#

  1. Start a Cursor chat or agent task and select one of the added models.
  2. Confirm the model responds without authentication errors.
  3. Check Analytics → Traces in the OptScale AI Admin UI for the corresponding request.

Cursor setup notes#

Note

Cursor supports only one OpenAI-compatible base URL and API key configuration at a time. When OptScale AI is configured as the OpenAI endpoint, models from the original OpenAI connection are no longer available in Cursor.

  • Use providers and models allowed for the user.
  • Prefer models that support tool execution when using Cursor agents.

See also#