copilot-custom-endpoint 1.0.3 → 1.0.4
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 +100 -14
- package/cli.mjs +1 -0
- package/package.json +5 -2
- package/proxy/kimi-proxy.mjs +1 -0
- package/proxy/qwen-proxy.mjs +1 -0
package/README.md
CHANGED
|
@@ -43,6 +43,66 @@ The Kimi and Qwen setups require editing the same VS Code config file:
|
|
|
43
43
|
| macOS | `~/Library/Application Support/Code/User/chatLanguageModels.json` |
|
|
44
44
|
| Linux | `~/.config/Code/User/chatLanguageModels.json` |
|
|
45
45
|
|
|
46
|
+
### Full example config
|
|
47
|
+
|
|
48
|
+
Here's a complete, real-world example of `chatLanguageModels.json` combining all the providers documented in this repo.
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
[
|
|
52
|
+
{
|
|
53
|
+
"name": "Qwen",
|
|
54
|
+
"vendor": "customendpoint",
|
|
55
|
+
"apiKey": "<your-dashscope-key>",
|
|
56
|
+
"apiType": "chat-completions",
|
|
57
|
+
"models": [
|
|
58
|
+
{
|
|
59
|
+
"id": "qwen3.7-max",
|
|
60
|
+
"name": "Qwen 3.7 Max",
|
|
61
|
+
"url": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions",
|
|
62
|
+
"toolCalling": true,
|
|
63
|
+
"vision": false,
|
|
64
|
+
"streaming": true,
|
|
65
|
+
"requestBody": {
|
|
66
|
+
"enable_thinking": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "qwen3.6-plus",
|
|
71
|
+
"name": "Qwen 3.6 Plus",
|
|
72
|
+
"url": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions",
|
|
73
|
+
"toolCalling": true,
|
|
74
|
+
"vision": true,
|
|
75
|
+
"streaming": true,
|
|
76
|
+
"requestBody": {
|
|
77
|
+
"enable_thinking": false
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "Kimi",
|
|
84
|
+
"vendor": "customendpoint",
|
|
85
|
+
"apiKey": "<your-moonshot-key>",
|
|
86
|
+
"apiType": "chat-completions",
|
|
87
|
+
"models": [
|
|
88
|
+
{
|
|
89
|
+
"id": "kimi-k2.6",
|
|
90
|
+
"name": "Kimi K2.6",
|
|
91
|
+
"url": "http://127.0.0.1:3457/v1/chat/completions",
|
|
92
|
+
"requestBody": {
|
|
93
|
+
"temperature": 1
|
|
94
|
+
},
|
|
95
|
+
"toolCalling": true,
|
|
96
|
+
"vision": true,
|
|
97
|
+
"streaming": true,
|
|
98
|
+
"maxInputTokens": 262144,
|
|
99
|
+
"maxOutputTokens": 32768
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
```
|
|
105
|
+
|
|
46
106
|
### Kimi K2.6 (Moonshot)
|
|
47
107
|
|
|
48
108
|
#### 1. Grab a Moonshot API key
|
|
@@ -53,18 +113,32 @@ Sign up at [platform.moonshot.ai](https://platform.moonshot.ai) and create an AP
|
|
|
53
113
|
|
|
54
114
|
The proxy rewrites VS Code's requests into shapes Kimi actually accepts (fixed `temperature`, `top_p`, and disabling "thinking" during tool calls).
|
|
55
115
|
|
|
116
|
+
> **Local config:** Create a `.env` file in this repo root to set environment variables like `PORT`, `KIMI_UPSTREAM_URL`, etc. It's loaded automatically via `dotenv` — no need to prefix commands.
|
|
117
|
+
|
|
118
|
+
Run Kimi proxy
|
|
119
|
+
|
|
56
120
|
```bash
|
|
57
|
-
# from this repo — Kimi only
|
|
58
121
|
npm run proxy:kimi
|
|
59
|
-
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Run all proxies
|
|
125
|
+
|
|
126
|
+
```bash
|
|
60
127
|
npm run proxy
|
|
61
|
-
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Run globally (from any directory)
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Kimi only
|
|
62
134
|
npx copilot-custom-endpoint kimi
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
135
|
+
# All proxies
|
|
136
|
+
npx copilot-custom-endpoint
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Clean up debug logs
|
|
66
140
|
|
|
67
|
-
|
|
141
|
+
```bash
|
|
68
142
|
npm run clean:logs
|
|
69
143
|
# or with npx
|
|
70
144
|
npx copilot-custom-endpoint clean
|
|
@@ -155,18 +229,30 @@ Sign up at [dashscope.aliyun.com](https://dashscope.aliyun.com) and create an AP
|
|
|
155
229
|
|
|
156
230
|
The proxy dynamically enables thinking in plain chat and disables it during tool calls:
|
|
157
231
|
|
|
232
|
+
Run Qwen proxy
|
|
233
|
+
|
|
158
234
|
```bash
|
|
159
|
-
# from this repo — Qwen only
|
|
160
235
|
npm run proxy:qwen
|
|
161
|
-
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Run all proxies
|
|
239
|
+
|
|
240
|
+
```bash
|
|
162
241
|
npm run proxy
|
|
163
|
-
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Run globally (from any directory)
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# Qwen only
|
|
164
248
|
npx copilot-custom-endpoint qwen
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
249
|
+
# All proxies
|
|
250
|
+
npx copilot-custom-endpoint
|
|
251
|
+
```
|
|
168
252
|
|
|
169
|
-
|
|
253
|
+
Clean up debug logs
|
|
254
|
+
|
|
255
|
+
```bash
|
|
170
256
|
npm run clean:logs
|
|
171
257
|
# or with npx
|
|
172
258
|
npx copilot-custom-endpoint clean
|
package/cli.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilot-custom-endpoint",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Local proxies for VS Code Copilot custom endpoints — Kimi K2 & Qwen 3.x",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,5 +47,8 @@
|
|
|
47
47
|
"eslint-config-prettier": "^10.1.8",
|
|
48
48
|
"globals": "^17.6.0",
|
|
49
49
|
"prettier": "^3.8.3"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"dotenv": "^17.4.2"
|
|
50
53
|
}
|
|
51
|
-
}
|
|
54
|
+
}
|
package/proxy/kimi-proxy.mjs
CHANGED