copilot-custom-endpoint 1.0.4 → 1.0.5

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 CHANGED
@@ -113,7 +113,7 @@ Sign up at [platform.moonshot.ai](https://platform.moonshot.ai) and create an AP
113
113
 
114
114
  The proxy rewrites VS Code's requests into shapes Kimi actually accepts (fixed `temperature`, `top_p`, and disabling "thinking" during tool calls).
115
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.
116
+ > **Local config:** Create a `.env` file in this repo root to set environment variables like `KIMI_PROXY_PORT`, `KIMI_UPSTREAM_URL`, etc. It's loaded automatically via `dotenv` — no need to prefix commands.
117
117
 
118
118
  Run Kimi proxy
119
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilot-custom-endpoint",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Local proxies for VS Code Copilot custom endpoints — Kimi K2 & Qwen 3.x",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -51,4 +51,4 @@
51
51
  "dependencies": {
52
52
  "dotenv": "^17.4.2"
53
53
  }
54
- }
54
+ }
@@ -17,7 +17,10 @@ import { createProxy } from '../lib/create-proxy.mjs'
17
17
  */
18
18
  const upstreamUrl =
19
19
  process.env.KIMI_UPSTREAM_URL ?? 'https://api.moonshot.ai/v1/chat/completions'
20
- const port = Number.parseInt(process.env.PORT ?? '3457', 10)
20
+ const port = Number.parseInt(
21
+ process.env.KIMI_PROXY_PORT ?? process.env.PORT ?? '3457',
22
+ 10
23
+ )
21
24
  const forcedTemperature = Number(
22
25
  process.env.KIMI_PROXY_FORCE_TEMPERATURE ?? '1'
23
26
  )
@@ -38,7 +41,7 @@ if (process.argv.includes('--help')) {
38
41
  Starts a local HTTP proxy that rewrites the outbound chat-completions request body to use Kimi-compatible sampling values.
39
42
 
40
43
  Environment variables:
41
- PORT Local listen port. Default: 3457
44
+ KIMI_PROXY_PORT Local listen port. Default: 3457 (falls back to PORT)
42
45
  KIMI_UPSTREAM_URL Upstream Moonshot chat-completions URL.
43
46
  Default: https://api.moonshot.ai/v1/chat/completions
44
47
  KIMI_PROXY_FORCE_TEMPERATURE Temperature to force into the request body. Default: 1
@@ -15,7 +15,10 @@ import { createProxy } from '../lib/create-proxy.mjs'
15
15
  const upstreamUrl =
16
16
  process.env.QWEN_UPSTREAM_URL ??
17
17
  'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions'
18
- const port = Number.parseInt(process.env.PORT ?? '3458', 10)
18
+ const port = Number.parseInt(
19
+ process.env.QWEN_PROXY_PORT ?? process.env.PORT ?? '3458',
20
+ 10
21
+ )
19
22
  const disableThinkingWithTools =
20
23
  (process.env.QWEN_PROXY_DISABLE_THINKING_WITH_TOOLS ?? '1') !== '0'
21
24
  const defaultLogPath = fileURLToPath(
@@ -31,7 +34,7 @@ when the request includes a tools array, letting Qwen hybrid-thinking models
31
34
  show reasoning in plain chat while keeping tool loops stable.
32
35
 
33
36
  Environment variables:
34
- PORT Local listen port. Default: 3458
37
+ QWEN_PROXY_PORT Local listen port. Default: 3458 (falls back to PORT)
35
38
  QWEN_UPSTREAM_URL Upstream DashScope chat-completions URL.
36
39
  Default: https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions
37
40
  QWEN_PROXY_DISABLE_THINKING_WITH_TOOLS