Cursor is an AI code editor built on VS Code that supports code generation, code understanding, cross-file refactoring, and intelligent debugging through natural language. This document describes how to configure and use Tencent Cloud CMR in Cursor.
Installing Cursor
Attention:
Due to Cursor limitations, only users subscribed to the Cursor Pro plan or higher can customize model configurations.
Obtaining an API Key
Log in to the CMR console and create a CMR API Key. For detailed instructions, see CMR Access Key. Attention:
After creation, make sure to copy and securely store the API Key. Once you close the success dialog, you will not be able to view the complete API Key again.
Configuring Cursor
1. Launch Cursor and click Settings in the lower-left corner. Alternatively, you can press Cmd/Ctrl+Shift+P, type Cursor Settings, and press Enter.
2. In the left sidebar, select Models and expand API Keys.
3. Configure the following information:
OpenAI API Key: Enter the CMR API Key.
Override OpenAI Base URL: Enable this option and enter https://<user domain>/v1.
Add Custom Model: Click View All Models > Add Custom Model and enter a model name or intent route name supported by the current CMR instance.
Note:
When entering a model name, make sure the model is already associated with the current CMR instance. Alternatively, you can enter ModelRouter/auto, which allows the L1 CMR policy to select an available model.
4. After configuration, select the added model in the Cursor conversation window to start using it.