Files
cursor-byok/apps/docs/content/docs/model-configuration.en.mdx
T
leookun 217f984112 feat(docs): enhance documentation and UI consistency
- Updated the index.html to dynamically set the theme color based on user selection, improving user experience during theme switching.
- Modified proxy.ts to include 'icon.png' in the matcher for better asset handling.
- Added a new icon.png file for enhanced branding.
- Improved metadata in layout.tsx and page.tsx files for better clarity and consistency in documentation.
- Updated various documentation files to reflect the new branding of 'Cursor Byok' and ensure consistent terminology throughout.
- Removed outdated blog entries and added new content to better align with the current product direction.
2026-08-28 01:33:51 +08:00

84 lines
3.0 KiB
Plaintext

---
title: Model Configuration
description: Configure the model protocol, server address, credentials, and generation parameters.
icon: Settings2
---
Each model configuration is an independent upstream channel that can use a different provider, protocol, credentials, and generation parameters.
![Edit model dialog](/images/docs/model-edit-en.png)
## Choosing the type and protocol
Picking by model family avoids most compatibility issues:
| Model family | Model type | Request protocol |
| --- | --- | --- |
| Claude family | **Anthropic** | — |
| GPT / OpenAI family | **OpenAI** | **Responses API** |
| Everything else | **OpenAI** | **Chat Completions API** |
<Callout type="warn" title="Always use the Responses API for GPT models">
Running GPT models through Chat Completions loses prompt caching, which makes them noticeably slower and more expensive.
</Callout>
## Required fields
### Model type
Choose the upstream interface format:
- **OpenAI**: supports the Responses API and the Chat Completions API.
- **Anthropic**: supports Messages API-compatible services.
### Request protocol
For the OpenAI type, also choose **Responses API** or **Chat Completions API**. This option determines the request and response format; it does not change the server address you entered.
### Server address
You can enter the provider's base URL, or choose to use a full request URL:
- With a base URL, Cursor Byok appends the standard endpoint path for the chosen protocol.
- With a full request URL, Cursor Byok uses the address as-is.
Prefer the built-in provider presets in the UI to avoid protocol and endpoint mismatches.
### API key
Enter the access key required by the upstream service. The key is stored on your machine and used to send model requests.
### Model name
Enter the model identifier accepted by the provider's API. You can also click **Fetch Models** to load the model list returned by the API.
## Display information
- **Display name**: the name shown in Cursor's model list; it does not change the model identifier sent upstream.
- **Notes**: shown in Cursor's model description.
## Optional parameters
Fill in the following fields based on the model's capabilities; when left empty, the app or upstream defaults are used:
- Context window tokens
- Max output tokens
- Reasoning or thinking effort
- Custom headers
- Extra OpenAI or Anthropic parameters
<Callout type="warn" title="Extra parameter format">
Custom headers and extra parameters must be JSON objects. Extra parameters directly affect upstream requests, so only add fields the provider explicitly supports.
</Callout>
## Test the configuration
Run **Test** after saving. The result shows time to first token, generation speed, total duration, and the model output, which helps you confirm:
1. The address and protocol match.
2. The API key is valid.
3. The model identifier exists and is accessible.
4. The upstream returns streamed content correctly.
Once the test passes, switch to Cursor and start using the model.