zcf 3.6.0 → 3.6.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 CHANGED
@@ -42,6 +42,10 @@ Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB
42
42
  <td width="180"><a href="https://www.packyapi.com/register?aff=zcf"><img src="./src/assets/packycode.png" alt="PackyCode" width="150"></a></td>
43
43
  <td>Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: register using <a href="https://www.packyapi.com/register?aff=zcf">this link</a> and enter the "zcf" promo code during recharge to get 10% off.</td>
44
44
  </tr>
45
+ <tr>
46
+ <td width="180"><a href="https://www.aicodemirror.com/register?invitecode=ZCFZCF"><img src="./src/assets/AICodeMirror.jpg" alt="AICodeMirror" width="150"></a></td>
47
+ <td>Thanks to AICodeMirror for sponsoring this project! AICodeMirror provides official high-stability relay services for Claude Code/Codex/Gemini CLI, supporting enterprise-level high concurrency, fast invoicing, and 7x24 dedicated technical support. Official channels for Claude Code/Codex/Gemini at discounts as low as 38%/2%/10.9% off, with additional discounts on top-ups! AICodeMirror offers special benefits for ZCF users: users who register through <a href="https://www.aicodemirror.com/register?invitecode=ZCFZCF">this link</a> can enjoy 20% off on first top-up, and enterprise customers can get up to 25% off!</td>
48
+ </tr>
45
49
  <tbody>
46
50
  </table>
47
51
 
@@ -108,6 +112,7 @@ A huge thank you to all our sponsors for their generous support!
108
112
  - [302.AI](https://share.302.ai/gAT9VG) (first corporate sponsorship 🤠)
109
113
  - [GLM](https://z.ai/subscribe?ic=8JVLJQFSKB) (first AI model sponsorship 🤖)
110
114
  - [PackyCode](https://www.packyapi.com/register?aff=zcf) (first API proxy service sponsor 🧝🏻‍♀️)
115
+ - [AICodeMirror](https://www.aicodemirror.com/register?invitecode=ZCFZCF) (official high-stability relay service sponsor 🪞)
111
116
  - [UUCode](https://www.uucode.org/auth?ref=JQ2DJ1T8) (sponsored $100 proxy credits 💰)
112
117
 
113
118
  【Individual Sponsors】
@@ -28,49 +28,62 @@ const API_PROVIDER_PRESETS = [
28
28
  description: "PackyCode API Service"
29
29
  },
30
30
  {
31
- id: "glm",
32
- name: "GLM",
31
+ id: "aicodemirror",
32
+ name: "AICodeMirror",
33
33
  supportedCodeTools: ["claude-code", "codex"],
34
34
  claudeCode: {
35
- baseUrl: "https://open.bigmodel.cn/api/anthropic",
35
+ baseUrl: "https://api.aicodemirror.com/api/claudecode",
36
+ authType: "auth_token"
37
+ },
38
+ codex: {
39
+ baseUrl: "https://api.aicodemirror.com/api/codex/backend-api/codex",
40
+ wireApi: "responses"
41
+ },
42
+ description: "AICodeMirror Global High-Quality Line"
43
+ },
44
+ {
45
+ id: "aicodemirror-cn",
46
+ name: "AICodeMirror CN",
47
+ supportedCodeTools: ["claude-code", "codex"],
48
+ claudeCode: {
49
+ baseUrl: "https://api.claudecode.net.cn/api/claudecode",
36
50
  authType: "auth_token"
37
51
  },
38
52
  codex: {
39
- baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
40
- wireApi: "chat",
41
- defaultModel: "GLM-4.7"
53
+ baseUrl: "https://api.claudecode.net.cn/api/codex/backend-api/codex",
54
+ wireApi: "responses"
55
+ },
56
+ description: "AICodeMirror China Optimized Line"
57
+ },
58
+ {
59
+ id: "glm",
60
+ name: "GLM",
61
+ supportedCodeTools: ["claude-code"],
62
+ claudeCode: {
63
+ baseUrl: "https://open.bigmodel.cn/api/anthropic",
64
+ authType: "auth_token"
42
65
  },
43
66
  description: "GLM (\u667A\u8C31AI)"
44
67
  },
45
68
  {
46
69
  id: "minimax",
47
70
  name: "MiniMax",
48
- supportedCodeTools: ["claude-code", "codex"],
71
+ supportedCodeTools: ["claude-code"],
49
72
  claudeCode: {
50
73
  baseUrl: "https://api.minimaxi.com/anthropic",
51
74
  authType: "auth_token",
52
75
  defaultModels: ["MiniMax-M2", "MiniMax-M2"]
53
76
  },
54
- codex: {
55
- baseUrl: "https://api.minimaxi.com/v1",
56
- wireApi: "chat",
57
- defaultModel: "MiniMax-M2"
58
- },
59
77
  description: "MiniMax API Service"
60
78
  },
61
79
  {
62
80
  id: "kimi",
63
81
  name: "Kimi",
64
- supportedCodeTools: ["claude-code", "codex"],
82
+ supportedCodeTools: ["claude-code"],
65
83
  claudeCode: {
66
84
  baseUrl: "https://api.kimi.com/coding/",
67
85
  authType: "auth_token"
68
86
  },
69
- codex: {
70
- baseUrl: "https://api.kimi.com/coding/v1",
71
- wireApi: "chat",
72
- defaultModel: "kimi-for-coding"
73
- },
74
87
  description: "Kimi (Moonshot AI)"
75
88
  }
76
89
  ];
@@ -111,17 +111,6 @@ async function handleAddProvider() {
111
111
  when: () => selectedProvider === "custom",
112
112
  validate: (input) => !!input.trim() || i18n.t("codex:providerBaseUrlRequired")
113
113
  },
114
- {
115
- type: "list",
116
- name: "wireApi",
117
- message: i18n.t("codex:providerProtocolPrompt"),
118
- choices: [
119
- { name: i18n.t("codex:protocolResponses"), value: "responses" },
120
- { name: i18n.t("codex:protocolChat"), value: "chat" }
121
- ],
122
- default: prefilledWireApi || "responses",
123
- when: () => selectedProvider === "custom"
124
- },
125
114
  {
126
115
  type: "input",
127
116
  name: "apiKey",
@@ -149,7 +138,7 @@ async function handleAddProvider() {
149
138
  id: providerId,
150
139
  name: answers.providerName.trim(),
151
140
  baseUrl: selectedProvider === "custom" ? answers.baseUrl.trim() : prefilledBaseUrl,
152
- wireApi: selectedProvider === "custom" ? answers.wireApi : prefilledWireApi,
141
+ wireApi: prefilledWireApi || "responses",
153
142
  tempEnvKey: `${providerId.toUpperCase().replace(/-/g, "_")}_API_KEY`,
154
143
  requiresOpenaiAuth: true,
155
144
  model: prefilledModel || "gpt-5.2"
@@ -220,16 +209,6 @@ async function handleEditProvider(providers) {
220
209
  default: provider.baseUrl,
221
210
  validate: (input) => !!input.trim() || i18n.t("codex:providerBaseUrlRequired")
222
211
  },
223
- {
224
- type: "list",
225
- name: "wireApi",
226
- message: i18n.t("codex:providerProtocolPrompt"),
227
- choices: [
228
- { name: i18n.t("codex:protocolResponses"), value: "responses" },
229
- { name: i18n.t("codex:protocolChat"), value: "chat" }
230
- ],
231
- default: provider.wireApi
232
- },
233
212
  {
234
213
  type: "input",
235
214
  name: "apiKey",
@@ -251,7 +230,7 @@ async function handleEditProvider(providers) {
251
230
  const updates = {
252
231
  name: answers.providerName.trim(),
253
232
  baseUrl: answers.baseUrl.trim(),
254
- wireApi: answers.wireApi,
233
+ wireApi: "responses",
255
234
  apiKey: answers.apiKey.trim(),
256
235
  model: model.trim()
257
236
  };
@@ -312,16 +291,6 @@ ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
312
291
  default: provider.baseUrl,
313
292
  validate: (input) => !!input.trim() || i18n.t("codex:providerBaseUrlRequired")
314
293
  },
315
- {
316
- type: "list",
317
- name: "wireApi",
318
- message: i18n.t("codex:providerProtocolPrompt"),
319
- choices: [
320
- { name: i18n.t("codex:protocolResponses"), value: "responses" },
321
- { name: i18n.t("codex:protocolChat"), value: "chat" }
322
- ],
323
- default: provider.wireApi
324
- },
325
294
  {
326
295
  type: "input",
327
296
  name: "apiKey",
@@ -345,7 +314,7 @@ ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
345
314
  id: providerId,
346
315
  name: answers.providerName.trim(),
347
316
  baseUrl: answers.baseUrl.trim(),
348
- wireApi: answers.wireApi,
317
+ wireApi: "responses",
349
318
  tempEnvKey: `${providerId.toUpperCase().replace(/-/g, "_")}_API_KEY`,
350
319
  requiresOpenaiAuth: provider.requiresOpenaiAuth ?? true,
351
320
  model: model.trim()
@@ -18,7 +18,7 @@ import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
18
18
  import i18next from 'i18next';
19
19
  import Backend from 'i18next-fs-backend';
20
20
 
21
- const version = "3.6.0";
21
+ const version = "3.6.1";
22
22
  const homepage = "https://github.com/UfoMiao/zcf";
23
23
 
24
24
  const i18n = i18next.createInstance();
@@ -4733,18 +4733,6 @@ async function configureCodexApi(options) {
4733
4733
  when: () => selectedProvider2 === "custom",
4734
4734
  validate: (input) => !!input || i18n.t("codex:providerBaseUrlRequired")
4735
4735
  },
4736
- {
4737
- type: "list",
4738
- name: "wireApi",
4739
- message: i18n.t("codex:providerProtocolPrompt"),
4740
- choices: [
4741
- { name: i18n.t("codex:protocolResponses"), value: "responses" },
4742
- { name: i18n.t("codex:protocolChat"), value: "chat" }
4743
- ],
4744
- default: prefilledWireApi || ((answers2) => existingMap.get(sanitizeProviderName(answers2.providerName))?.wireApi || "responses"),
4745
- when: () => selectedProvider2 === "custom"
4746
- // Only ask if custom
4747
- },
4748
4736
  {
4749
4737
  type: "input",
4750
4738
  name: "apiKey",
@@ -4794,7 +4782,7 @@ async function configureCodexApi(options) {
4794
4782
  id: providerId,
4795
4783
  name: answers.providerName,
4796
4784
  baseUrl: selectedProvider2 === "custom" ? answers.baseUrl : prefilledBaseUrl,
4797
- wireApi: selectedProvider2 === "custom" ? answers.wireApi || "responses" : prefilledWireApi,
4785
+ wireApi: prefilledWireApi || "responses",
4798
4786
  tempEnvKey,
4799
4787
  requiresOpenaiAuth: true,
4800
4788
  model: customModel || prefilledModel || "gpt-5.2"
@@ -20,7 +20,6 @@
20
20
  "providerBaseUrlRequired": "Base URL is required",
21
21
  "providerProtocolPrompt": "Select protocol to use",
22
22
  "protocolResponses": "Responses (Recommended, new-generation response API with state management)",
23
- "protocolChat": "Chat (Traditional chat completion API, requires message history)",
24
23
  "providerApiKeyPrompt": "API key value",
25
24
  "providerApiKeyRequired": "API key is required",
26
25
  "addProviderPrompt": "Add another provider?",
@@ -118,7 +117,7 @@
118
117
  "providerManager.providerIdRequired": "Provider ID is required",
119
118
  "providerManager.providerNameRequired": "Provider name is required",
120
119
  "providerManager.baseUrlRequired": "Base URL is required",
121
- "providerManager.wireApiInvalid": "Wire API must be either \"responses\" or \"chat\"",
120
+ "providerManager.wireApiInvalid": "Wire API must be \"responses\"",
122
121
  "providerManager.unknownError": "Unknown error",
123
122
  "envKeyMigrationComplete": "✔ env_key to temp_env_key migration completed"
124
123
  }
@@ -20,7 +20,6 @@
20
20
  "providerBaseUrlRequired": "必须填写基础 URL",
21
21
  "providerProtocolPrompt": "选择使用的协议",
22
22
  "protocolResponses": "Responses(推荐,新一代响应 API,支持状态管理)",
23
- "protocolChat": "Chat(传统聊天补全 API,需要消息历史记录)",
24
23
  "providerApiKeyPrompt": "API Key 内容",
25
24
  "providerApiKeyRequired": "必须填写 API Key",
26
25
  "addProviderPrompt": "是否继续添加其他提供商?",
@@ -118,7 +117,7 @@
118
117
  "providerManager.providerIdRequired": "提供商 ID 是必需的",
119
118
  "providerManager.providerNameRequired": "提供商名称是必需的",
120
119
  "providerManager.baseUrlRequired": "基础 URL 是必需的",
121
- "providerManager.wireApiInvalid": "Wire API 必须是 \"responses\" 或 \"chat\"",
120
+ "providerManager.wireApiInvalid": "Wire API 必须是 \"responses\"",
122
121
  "providerManager.unknownError": "未知错误",
123
122
  "envKeyMigrationComplete": "✔ 已完成 env_key 到 temp_env_key 的迁移"
124
123
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "3.6.0",
4
+ "version": "3.6.1",
5
5
  "description": "Zero-Config Code Flow - One-click configuration tool for Code Cli",
6
6
  "author": {
7
7
  "name": "Miao Da",