mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 05:12:03 +08:00
Console — provider presets inside the model editor: - Preset chips for five coding-plan providers (Zhipu GLM / Kimi / DeepSeek / Volcengine Ark / MiniMax) rendered at the top of the add/edit model dialog - All five providers expose both an Anthropic-protocol and an OpenAI-protocol endpoint; a click fills the endpoint matching the current model type, and switching the type automatically swaps to the same provider's other endpoint (no stale URL/protocol mismatches) - Switching to a different provider clears the API key; switching protocols within the same provider keeps it - Fills base URL (full-request-URL form for irregular paths), request protocol, claude-cli custom headers for Anthropic endpoints, token limits, remark, and the default model id + display name; known preset model ids merge into the model-name combobox Server — model discovery for sub-path endpoints: - model_discovery_url previously replaced the whole path with /v1/models, which strips the /api/anthropic, /coding, /api/paas/v4 style prefixes every coding-plan provider uses, so discovery always 404'd for them. It now appends to the existing path and normalizes endpoint/version suffixes (/chat/completions, /responses, /messages, /v1, /v3, /v4) - Verified live against Zhipu (10 models) and Kimi (4 models) coding plans; existing tests updated to the append semantics plus new URL cases Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
48 lines
825 B
SCSS
48 lines
825 B
SCSS
.wrap {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.label {
|
|
font-size: 12px;
|
|
color: var(--vscode-descriptionForeground, rgba(255, 255, 255, 0.7));
|
|
}
|
|
|
|
.chips {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
padding: 3px 10px;
|
|
border: 1px solid var(--vscode-editorWidget-border, rgba(255, 255, 255, 0.16));
|
|
border-radius: 999px;
|
|
background: transparent;
|
|
color: inherit;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
border-color: var(--vscode-focusBorder, #49b0ff);
|
|
}
|
|
|
|
&.active {
|
|
border-color: var(--vscode-focusBorder, #49b0ff);
|
|
color: var(--vscode-focusBorder, #49b0ff);
|
|
}
|
|
}
|
|
|
|
.icon {
|
|
width: 14px;
|
|
height: 14px;
|
|
border-radius: 3px;
|
|
object-fit: contain;
|
|
}
|