copilot-custom-endpoint 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,26 +38,37 @@ This repo is for those situations: validated, copy-paste-ready configs when Open
|
|
|
38
38
|
|
|
39
39
|
Pick the model you want and follow the corresponding section below.
|
|
40
40
|
|
|
41
|
-
### Config
|
|
41
|
+
### Config setup: two-step workflow
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
VS Code separates **model configuration** from **API key storage** for security. You set up each provider in two steps:
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
45
|
+
1. **Create/update `chatLanguageModels.json`** — this file defines the models, URLs, and settings. API keys are **not** stored here (leave `apiKey` out entirely, or use an empty string).
|
|
46
|
+
|
|
47
|
+
| OS | Path |
|
|
48
|
+
| ------- | ----------------------------------------------------------------- |
|
|
49
|
+
| Windows | `%APPDATA%\Code\User\chatLanguageModels.json` |
|
|
50
|
+
| macOS | `~/Library/Application Support/Code/User/chatLanguageModels.json` |
|
|
51
|
+
| Linux | `~/.config/Code/User/chatLanguageModels.json` |
|
|
52
|
+
|
|
53
|
+
2. **Set each API key through the Language Models UI:**
|
|
54
|
+
- Open the Command Palette (`Ctrl+Shift+P`).
|
|
55
|
+
- Run **Chat: Manage Language Models**.
|
|
56
|
+
- Find your provider group in the list.
|
|
57
|
+
- Right-click the group name → **Update API Key**.
|
|
58
|
+
- Paste your key. It is stored securely (not in the JSON file).
|
|
59
|
+
|
|
60
|
+
> **Why this way?** The JSON config file is often tracked in dotfile repos or shared across machines. API keys don't belong there. The VS Code UI stores them in your OS keychain instead.
|
|
50
61
|
|
|
51
62
|
### Full example config
|
|
52
63
|
|
|
53
|
-
Here's a complete, real-world example of `chatLanguageModels.json` combining all the providers documented in this repo.
|
|
64
|
+
Here's a complete, real-world example of `chatLanguageModels.json` combining all the providers documented in this repo. Note the `apiKey` fields are left as empty strings — you'll set them via the Language Models UI instead. After you set a key via the UI, VS Code replaces the empty string with a `${input:chat.lm.secret.<id>}` secret reference.
|
|
54
65
|
|
|
55
66
|
```json
|
|
56
67
|
[
|
|
57
68
|
{
|
|
58
69
|
"name": "Qwen",
|
|
59
70
|
"vendor": "customendpoint",
|
|
60
|
-
"apiKey": "
|
|
71
|
+
"apiKey": "",
|
|
61
72
|
"apiType": "chat-completions",
|
|
62
73
|
"models": [
|
|
63
74
|
{
|
|
@@ -87,7 +98,7 @@ Here's a complete, real-world example of `chatLanguageModels.json` combining all
|
|
|
87
98
|
{
|
|
88
99
|
"name": "Kimi",
|
|
89
100
|
"vendor": "customendpoint",
|
|
90
|
-
"apiKey": "
|
|
101
|
+
"apiKey": "",
|
|
91
102
|
"apiType": "chat-completions",
|
|
92
103
|
"models": [
|
|
93
104
|
{
|
|
@@ -108,7 +119,7 @@ Here's a complete, real-world example of `chatLanguageModels.json` combining all
|
|
|
108
119
|
{
|
|
109
120
|
"name": "MiMo",
|
|
110
121
|
"vendor": "customendpoint",
|
|
111
|
-
"apiKey": "
|
|
122
|
+
"apiKey": "",
|
|
112
123
|
"apiType": "chat-completions",
|
|
113
124
|
"models": [
|
|
114
125
|
{
|
|
@@ -161,7 +172,7 @@ Here's a complete, real-world example of `chatLanguageModels.json` combining all
|
|
|
161
172
|
{
|
|
162
173
|
"name": "MiniMax",
|
|
163
174
|
"vendor": "customendpoint",
|
|
164
|
-
"apiKey": "
|
|
175
|
+
"apiKey": "",
|
|
165
176
|
"apiType": "chat-completions",
|
|
166
177
|
"models": [
|
|
167
178
|
{
|
|
@@ -233,6 +244,10 @@ You should see:
|
|
|
233
244
|
|
|
234
245
|
```
|
|
235
246
|
[kimi-proxy] listening on http://127.0.0.1:3457/v1/chat/completions
|
|
247
|
+
[kimi-proxy] forwarding to https://api.moonshot.ai/v1/chat/completions
|
|
248
|
+
[kimi-proxy] forcing temperature=1, non-thinking temperature=0.6, and top_p=0.95
|
|
249
|
+
[kimi-proxy] disable thinking with tools=true
|
|
250
|
+
[kimi-proxy] writing redacted request summaries to debug_log/kimi-proxy.ndjson
|
|
236
251
|
```
|
|
237
252
|
|
|
238
253
|
Check it's alive:
|
|
@@ -257,13 +272,13 @@ Expected response:
|
|
|
257
272
|
|
|
258
273
|
#### 3. Register the model in VS Code
|
|
259
274
|
|
|
260
|
-
|
|
275
|
+
First, open (or create) your user config file (see [Config file location](#config-file-location) above) and paste this entry (leave `apiKey` as empty string — you'll set it via the UI):
|
|
261
276
|
|
|
262
277
|
```json
|
|
263
278
|
{
|
|
264
279
|
"name": "Kimi",
|
|
265
280
|
"vendor": "customendpoint",
|
|
266
|
-
"apiKey": "
|
|
281
|
+
"apiKey": "",
|
|
267
282
|
"apiType": "chat-completions",
|
|
268
283
|
"models": [
|
|
269
284
|
{
|
|
@@ -285,6 +300,13 @@ Open (or create) your user config file (see [Config file location](#config-file-
|
|
|
285
300
|
|
|
286
301
|
> **Note:** The `requestBody.temperature` here is a hint to VS Code, but the proxy will enforce the exact values Kimi requires regardless.
|
|
287
302
|
|
|
303
|
+
Then set your Moonshot API key via the Language Models UI:
|
|
304
|
+
|
|
305
|
+
- Open the Command Palette (`Ctrl+Shift+P`).
|
|
306
|
+
- Run **Chat: Manage Language Models**.
|
|
307
|
+
- Find the **Kimi** group, right-click it → **Update API Key**.
|
|
308
|
+
- Paste your Moonshot API key.
|
|
309
|
+
|
|
288
310
|
#### 4. Chat!
|
|
289
311
|
|
|
290
312
|
- Open the Copilot chat panel (`Ctrl+Alt+I` / `Cmd+Ctrl+I`).
|
|
@@ -323,13 +345,13 @@ Create an API key [here](https://modelstudio.console.alibabacloud.com/ap-southea
|
|
|
323
345
|
|
|
324
346
|
#### 2. Register the models in VS Code
|
|
325
347
|
|
|
326
|
-
|
|
348
|
+
First, open (or create) your user config file (see [Config file location](#config-file-location) above) and paste this entry (leave `apiKey` as empty string — you'll set it via the UI):
|
|
327
349
|
|
|
328
350
|
```json
|
|
329
351
|
{
|
|
330
352
|
"name": "Qwen",
|
|
331
353
|
"vendor": "customendpoint",
|
|
332
|
-
"apiKey": "
|
|
354
|
+
"apiKey": "",
|
|
333
355
|
"apiType": "chat-completions",
|
|
334
356
|
"models": [
|
|
335
357
|
{
|
|
@@ -358,6 +380,13 @@ Open (or create) your user config file (see [Config file location](#config-file-
|
|
|
358
380
|
}
|
|
359
381
|
```
|
|
360
382
|
|
|
383
|
+
Then set your DashScope API key via the Language Models UI:
|
|
384
|
+
|
|
385
|
+
- Open the Command Palette (`Ctrl+Shift+P`).
|
|
386
|
+
- Run **Chat: Manage Language Models**.
|
|
387
|
+
- Find the **Qwen** group, right-click it → **Update API Key**.
|
|
388
|
+
- Paste your DashScope API key.
|
|
389
|
+
|
|
361
390
|
> **Trade-off:** `enable_thinking: false` suppresses reasoning in all requests (both plain chat and tool loops). Tool loops stay stable, but you never see the model's thought process. The [optional proxy](#optional-local-proxy-for-dynamic-thinking) below avoids this trade-off.
|
|
362
391
|
|
|
363
392
|
#### 3. Chat!
|
|
@@ -417,13 +446,13 @@ Expected response:
|
|
|
417
446
|
}
|
|
418
447
|
```
|
|
419
448
|
|
|
420
|
-
Then update your VS Code config to point URLs at the proxy and remove `requestBody` — the proxy handles thinking dynamically:
|
|
449
|
+
Then update your VS Code config to point URLs at the proxy and remove `requestBody` — the proxy handles thinking dynamically (remember, `apiKey` stays empty — set it via the UI):
|
|
421
450
|
|
|
422
451
|
```json
|
|
423
452
|
{
|
|
424
453
|
"name": "Qwen",
|
|
425
454
|
"vendor": "customendpoint",
|
|
426
|
-
"apiKey": "
|
|
455
|
+
"apiKey": "",
|
|
427
456
|
"apiType": "chat-completions",
|
|
428
457
|
"models": [
|
|
429
458
|
{
|
|
@@ -524,13 +553,13 @@ Sign up at [platform.xiaomimimo.com](https://platform.xiaomimimo.com) and create
|
|
|
524
553
|
|
|
525
554
|
#### 2. Register the models in VS Code
|
|
526
555
|
|
|
527
|
-
|
|
556
|
+
First, open your user config file (see [Config file location](#config-file-location) above) and paste this entry (leave `apiKey` as empty string — you'll set it via the UI):
|
|
528
557
|
|
|
529
558
|
```json
|
|
530
559
|
{
|
|
531
560
|
"name": "MiMo",
|
|
532
561
|
"vendor": "customendpoint",
|
|
533
|
-
"apiKey": "
|
|
562
|
+
"apiKey": "",
|
|
534
563
|
"apiType": "chat-completions",
|
|
535
564
|
"models": [
|
|
536
565
|
{
|
|
@@ -582,6 +611,13 @@ Open your user config file (see [Config file location](#config-file-location) ab
|
|
|
582
611
|
}
|
|
583
612
|
```
|
|
584
613
|
|
|
614
|
+
Then set your MiMo API key via the Language Models UI:
|
|
615
|
+
|
|
616
|
+
- Open the Command Palette (`Ctrl+Shift+P`).
|
|
617
|
+
- Run **Chat: Manage Language Models**.
|
|
618
|
+
- Find the **MiMo** group, right-click it → **Update API Key**.
|
|
619
|
+
- Paste your MiMo API key.
|
|
620
|
+
|
|
585
621
|
> **Note:** `thinking: { "type": "disabled" }` is required for tool-calling stability. Without it, MiMo returns a 400 error when conversation history contains tool calls with missing `reasoning_content`.
|
|
586
622
|
|
|
587
623
|
#### 3. Chat!
|
|
@@ -620,13 +656,13 @@ Create an API key at the [MiniMax Developer Platform](https://platform.minimax.i
|
|
|
620
656
|
|
|
621
657
|
#### 2. Register the model in VS Code
|
|
622
658
|
|
|
623
|
-
|
|
659
|
+
First, open (or create) your user config file (see [Config file location](#config-file-location) above) and paste this entry (leave `apiKey` as empty string — you'll set it via the UI):
|
|
624
660
|
|
|
625
661
|
```json
|
|
626
662
|
{
|
|
627
663
|
"name": "MiniMax",
|
|
628
664
|
"vendor": "customendpoint",
|
|
629
|
-
"apiKey": "
|
|
665
|
+
"apiKey": "",
|
|
630
666
|
"apiType": "chat-completions",
|
|
631
667
|
"models": [
|
|
632
668
|
{
|
|
@@ -649,6 +685,13 @@ Open (or create) your user config file (see [Config file location](#config-file-
|
|
|
649
685
|
}
|
|
650
686
|
```
|
|
651
687
|
|
|
688
|
+
Then set your MiniMax API key via the Language Models UI:
|
|
689
|
+
|
|
690
|
+
- Open the Command Palette (`Ctrl+Shift+P`).
|
|
691
|
+
- Run **Chat: Manage Language Models**.
|
|
692
|
+
- Find the **MiniMax** group, right-click it → **Update API Key**.
|
|
693
|
+
- Paste your MiniMax API key.
|
|
694
|
+
|
|
652
695
|
**Why this config?**
|
|
653
696
|
|
|
654
697
|
- `thinking: { "type": "adaptive" }` — MiniMax's documented default. The model decides when to reason.
|