@kikkimo/claude-launcher 3.0.0 → 3.2.0

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.
@@ -4,50 +4,125 @@
4
4
  * Note: Only includes APIs that are compatible with Claude Code's Anthropic API format
5
5
  */
6
6
 
7
+ // Template factory: same-gen fast model downgrade via lookup map
8
+ function makeFastMapTemplate(fastMap) {
9
+ return {
10
+ getValues(model) {
11
+ const fastModel = fastMap[model] || model;
12
+ return {
13
+ ANTHROPIC_CUSTOM_MODEL_OPTION: model,
14
+ ANTHROPIC_CUSTOM_MODEL_OPTION_NAME: model,
15
+ ANTHROPIC_DEFAULT_SONNET_MODEL: model,
16
+ ANTHROPIC_DEFAULT_OPUS_MODEL: model,
17
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: fastModel,
18
+ CLAUDE_CODE_SUBAGENT_MODEL: fastModel,
19
+ smallFastModel: fastModel,
20
+ };
21
+ },
22
+ };
23
+ }
24
+
25
+ // Template factory: for providers with single model, no tier split
26
+ function makeSingleTemplate() {
27
+ return {
28
+ getValues(model) {
29
+ return {
30
+ ANTHROPIC_CUSTOM_MODEL_OPTION: model,
31
+ ANTHROPIC_CUSTOM_MODEL_OPTION_NAME: model,
32
+ ANTHROPIC_DEFAULT_SONNET_MODEL: model,
33
+ ANTHROPIC_DEFAULT_OPUS_MODEL: model,
34
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: model,
35
+ CLAUDE_CODE_SUBAGENT_MODEL: model,
36
+ smallFastModel: model,
37
+ };
38
+ },
39
+ };
40
+ }
41
+
42
+ // Template factory: GLM — fixed tier standards (Opus=Sonnet=flagship, Haiku=turbo),
43
+ // regardless of which model the user picked as CUSTOM. Matches Claude Code's
44
+ // "tier standards are fixed, CUSTOM is the current selection" semantics.
45
+ function makeGlmTierTemplate() {
46
+ return {
47
+ getValues(model) {
48
+ return {
49
+ ANTHROPIC_CUSTOM_MODEL_OPTION: model,
50
+ ANTHROPIC_CUSTOM_MODEL_OPTION_NAME: model,
51
+ ANTHROPIC_DEFAULT_OPUS_MODEL: 'glm-5.2[1m]',
52
+ ANTHROPIC_DEFAULT_SONNET_MODEL: 'glm-5.2[1m]',
53
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: 'glm-5-turbo',
54
+ CLAUDE_CODE_SUBAGENT_MODEL: 'glm-5-turbo',
55
+ smallFastModel: 'glm-5-turbo',
56
+ };
57
+ },
58
+ };
59
+ }
60
+
61
+ // Anthropic models — defined as const so the template factory can reference them
62
+ const anthropicModels = [
63
+ 'claude-opus-4-8',
64
+ 'claude-opus-4-7',
65
+ 'claude-sonnet-4-6',
66
+ 'claude-haiku-4-5-20251001',
67
+ 'claude-sonnet-4-5',
68
+ 'claude-opus-4-6',
69
+ 'claude-opus-4-5',
70
+ ];
71
+
7
72
  const providers = {
8
73
  anthropic: {
9
74
  name: 'Anthropic (Official)',
10
75
  baseUrl: 'https://api.anthropic.com',
11
- models: [
12
- 'claude-3-5-haiku-20241022',
13
- 'claude-3-7-sonnet',
14
- 'claude-sonnet-4',
15
- 'claude-sonnet-4-5',
16
- 'claude-opus-4',
17
- 'claude-opus-4-1',
18
- 'claude-opus-4-5',
19
- 'claude-opus-4-6'
20
- ],
21
- // Version aliases for upgrade detection (manually maintained)
22
- // Covers ALL models in each series for comprehensive upgrade detection
76
+ models: anthropicModels,
23
77
  versionAliases: {
24
- // Opus series -> latest opus
25
- 'claude-opus-4': 'claude-opus-4-6',
26
- 'claude-opus-4-1': 'claude-opus-4-6',
27
- 'claude-opus-4-5': 'claude-opus-4-6',
28
- // Sonnet series -> latest sonnet
29
- 'claude-sonnet-4': 'claude-sonnet-4-5',
30
- 'claude-3-7-sonnet': 'claude-sonnet-4-5'
78
+ 'claude-opus-4': 'claude-opus-4-8',
79
+ 'claude-opus-4-1': 'claude-opus-4-8',
80
+ 'claude-opus-4-5': 'claude-opus-4-8',
81
+ 'claude-opus-4-6': 'claude-opus-4-8',
82
+ 'claude-opus-4-7': 'claude-opus-4-8',
83
+ 'claude-sonnet-4': 'claude-sonnet-4-6',
84
+ 'claude-sonnet-4-5': 'claude-sonnet-4-6',
85
+ 'claude-3-7-sonnet': 'claude-sonnet-4-6',
31
86
  },
32
87
  authTokenFormat: 'sk-ant-api03-...',
33
88
  description: 'Official Anthropic API - Fully compatible',
34
89
  requiresToken: true,
35
- compatibility: 'native'
90
+ compatibility: 'native',
91
+ envVars: {
92
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
93
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
94
+ },
95
+ modelEnvTemplate: {
96
+ getValues(model) {
97
+ const latestSonnet = anthropicModels.find(m => m.includes('sonnet')) || model;
98
+ const latestOpus = anthropicModels.find(m => m.includes('opus')) || model;
99
+ const latestHaiku = anthropicModels.find(m => m.includes('haiku')) || model;
100
+ return {
101
+ ANTHROPIC_CUSTOM_MODEL_OPTION: model,
102
+ ANTHROPIC_CUSTOM_MODEL_OPTION_NAME: model,
103
+ ANTHROPIC_DEFAULT_SONNET_MODEL: latestSonnet,
104
+ ANTHROPIC_DEFAULT_OPUS_MODEL: latestOpus,
105
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: latestHaiku,
106
+ CLAUDE_CODE_SUBAGENT_MODEL: latestHaiku,
107
+ smallFastModel: latestHaiku,
108
+ };
109
+ },
110
+ },
36
111
  },
37
112
  moonshot: {
38
- name: 'Moonshot AI (Kimi-K2.5/K2-Thinking)',
113
+ name: 'Moonshot AI (Kimi-K2.7-Code)',
39
114
  baseUrl: 'https://api.moonshot.cn/anthropic',
40
115
  models: [
41
- 'kimi-k2.5',
42
- 'kimi-k2-thinking',
43
- 'kimi-k2-thinking-turbo'
116
+ 'kimi-k2.7-code',
44
117
  ],
45
118
  versionAliases: {
46
- 'kimi-k2-0711-preview': 'kimi-k2.5',
47
- 'kimi-k2-0905-preview': 'kimi-k2.5',
48
- 'kimi-k2-turbo-preview': 'kimi-k2.5',
49
- 'kimi-k2-thinking': 'kimi-k2.5',
50
- 'kimi-k2-thinking-turbo': 'kimi-k2.5'
119
+ 'kimi-k2.6': 'kimi-k2.7-code',
120
+ 'kimi-k2.5': 'kimi-k2.7-code',
121
+ 'kimi-k2-thinking': 'kimi-k2.7-code',
122
+ 'kimi-k2-thinking-turbo': 'kimi-k2.7-code',
123
+ 'kimi-k2-0711-preview': 'kimi-k2.7-code',
124
+ 'kimi-k2-0905-preview': 'kimi-k2.7-code',
125
+ 'kimi-k2-turbo-preview': 'kimi-k2.7-code',
51
126
  },
52
127
  authTokenFormat: 'sk-...',
53
128
  description: 'Moonshot AI - Provides Anthropic-compatible API',
@@ -55,8 +130,14 @@ const providers = {
55
130
  compatibility: 'anthropic-compatible',
56
131
  envVars: {
57
132
  API_TIMEOUT_MS: '3000000',
58
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
133
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
134
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
135
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
136
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1',
137
+ ENABLE_TOOL_SEARCH: 'false',
138
+ CLAUDE_CODE_AUTO_COMPACT_WINDOW: '262144',
59
139
  },
140
+ modelEnvTemplate: makeSingleTemplate(),
60
141
  note: 'Requires extended timeout for large responses'
61
142
  },
62
143
  kimi_for_coding: {
@@ -71,21 +152,32 @@ const providers = {
71
152
  compatibility: 'anthropic-compatible',
72
153
  envVars: {
73
154
  API_TIMEOUT_MS: '3000000',
74
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
155
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
156
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
157
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
158
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
75
159
  },
160
+ modelEnvTemplate: makeSingleTemplate(),
76
161
  note: 'Requires extended timeout for large responses'
77
162
  },
78
163
  minimax_cn: {
79
164
  name: 'MiniMax CN (国内版)',
80
165
  baseUrl: 'https://api.minimaxi.com/anthropic',
81
166
  models: [
167
+ 'MiniMax-M3',
82
168
  'MiniMax-M2.7',
169
+ 'MiniMax-M2.7-highspeed',
83
170
  'MiniMax-M2.5',
84
- 'MiniMax-M2.1'
171
+ 'MiniMax-M2.5-highspeed',
172
+ 'MiniMax-M2.1',
173
+ 'MiniMax-M2.1-highspeed',
174
+ 'MiniMax-M2',
85
175
  ],
86
176
  versionAliases: {
87
- 'MiniMax-M2.1': 'MiniMax-M2.7',
88
- 'MiniMax-M2.5': 'MiniMax-M2.7'
177
+ 'MiniMax-M2': 'MiniMax-M3',
178
+ 'MiniMax-M2.1': 'MiniMax-M3',
179
+ 'MiniMax-M2.5': 'MiniMax-M3',
180
+ 'MiniMax-M2.7': 'MiniMax-M3'
89
181
  },
90
182
  authTokenFormat: 'sk-...',
91
183
  description: 'MiniMax AI - Anthropic-compatible API for China users',
@@ -93,21 +185,32 @@ const providers = {
93
185
  compatibility: 'anthropic-compatible',
94
186
  envVars: {
95
187
  API_TIMEOUT_MS: '3000000',
96
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
188
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
189
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
190
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
191
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
97
192
  },
193
+ modelEnvTemplate: makeFastMapTemplate({"MiniMax-M2.7":"MiniMax-M2.7-highspeed","MiniMax-M2.5":"MiniMax-M2.5-highspeed","MiniMax-M2.1":"MiniMax-M2.1-highspeed"}),
98
194
  note: 'Requires extended timeout for large responses'
99
195
  },
100
196
  minimax_global: {
101
197
  name: 'MiniMax Global (国际版)',
102
198
  baseUrl: 'https://api.minimax.io/anthropic',
103
199
  models: [
200
+ 'MiniMax-M3',
104
201
  'MiniMax-M2.7',
202
+ 'MiniMax-M2.7-highspeed',
105
203
  'MiniMax-M2.5',
106
- 'MiniMax-M2.1'
204
+ 'MiniMax-M2.5-highspeed',
205
+ 'MiniMax-M2.1',
206
+ 'MiniMax-M2.1-highspeed',
207
+ 'MiniMax-M2',
107
208
  ],
108
209
  versionAliases: {
109
- 'MiniMax-M2.1': 'MiniMax-M2.7',
110
- 'MiniMax-M2.5': 'MiniMax-M2.7'
210
+ 'MiniMax-M2': 'MiniMax-M3',
211
+ 'MiniMax-M2.1': 'MiniMax-M3',
212
+ 'MiniMax-M2.5': 'MiniMax-M3',
213
+ 'MiniMax-M2.7': 'MiniMax-M3'
111
214
  },
112
215
  authTokenFormat: 'sk-...',
113
216
  description: 'MiniMax AI - Anthropic-compatible API for international users',
@@ -115,42 +218,56 @@ const providers = {
115
218
  compatibility: 'anthropic-compatible',
116
219
  envVars: {
117
220
  API_TIMEOUT_MS: '3000000',
118
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
221
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
222
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
223
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
224
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
119
225
  },
226
+ modelEnvTemplate: makeFastMapTemplate({"MiniMax-M2.7":"MiniMax-M2.7-highspeed","MiniMax-M2.5":"MiniMax-M2.5-highspeed","MiniMax-M2.1":"MiniMax-M2.1-highspeed"}),
120
227
  note: 'Requires extended timeout for large responses'
121
228
  },
122
229
  deepseek: {
123
- name: 'DeepSeek (DeepSeek V3/V3.1)',
230
+ name: 'DeepSeek (V4-Pro/V4-Flash)',
124
231
  baseUrl: 'https://api.deepseek.com/anthropic',
125
232
  models: [
233
+ 'deepseek-v4-pro[1m]',
234
+ 'deepseek-v4-flash',
126
235
  'deepseek-chat',
127
- 'deepseek-reasoner'
236
+ 'deepseek-reasoner',
128
237
  ],
238
+ versionAliases: {
239
+ 'deepseek-chat': 'deepseek-v4-flash',
240
+ 'deepseek-reasoner': 'deepseek-v4-pro[1m]',
241
+ 'deepseek-v4-flash[1m]': 'deepseek-v4-flash',
242
+ },
129
243
  authTokenFormat: 'sk-...',
130
244
  description: 'DeepSeek AI - Anthropic-compatible endpoint',
131
245
  requiresToken: true,
132
246
  compatibility: 'anthropic-compatible',
133
247
  envVars: {
134
248
  API_TIMEOUT_MS: '600000',
135
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
249
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
250
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
251
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
252
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1',
253
+ CLAUDE_CODE_EFFORT_LEVEL: 'max',
136
254
  },
137
- note: 'Requires extended timeout for complex reasoning tasks'
255
+ modelEnvTemplate: makeFastMapTemplate({"deepseek-v4-pro[1m]":"deepseek-v4-flash"}),
256
+ note: 'Requires extended timeout for complex reasoning tasks',
138
257
  },
139
258
  zhipu: {
140
- name: 'ZhiPu AI (GLM-5.1/5-Turbo/5/4.7) - 智谱清言',
259
+ name: 'ZhiPu AI (GLM-5.2/5-Turbo) - 智谱清言',
141
260
  baseUrl: 'https://open.bigmodel.cn/api/anthropic',
142
261
  models: [
262
+ 'glm-5.2[1m]',
143
263
  'glm-5.1',
144
264
  'glm-5-turbo',
145
- 'glm-5',
146
- 'glm-4.7'
265
+ 'glm-5'
147
266
  ],
148
267
  versionAliases: {
149
- 'glm-4.5': 'glm-5.1',
150
- 'glm-4.6': 'glm-5.1',
151
- 'glm-4.7': 'glm-5.1',
152
- 'glm-5': 'glm-5.1',
153
- 'glm-5-turbo': 'glm-5.1'
268
+ 'glm-4.5': 'glm-5.2[1m]',
269
+ 'glm-4.6': 'glm-5.2[1m]',
270
+ 'glm-4.7': 'glm-5.2[1m]',
154
271
  },
155
272
  authTokenFormat: 'sk-...',
156
273
  description: 'ZhiPu AI (智谱清言) - Anthropic-compatible API for mainland China',
@@ -158,25 +275,28 @@ const providers = {
158
275
  compatibility: 'anthropic-compatible',
159
276
  envVars: {
160
277
  API_TIMEOUT_MS: '3000000',
161
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
278
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
279
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
280
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
281
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1',
282
+ CLAUDE_CODE_AUTO_COMPACT_WINDOW: '1000000',
162
283
  },
284
+ modelEnvTemplate: makeGlmTierTemplate(),
163
285
  note: 'Requires extended timeout for large responses'
164
286
  },
165
287
  zai: {
166
- name: 'Z.ai (GLM-5.1/5-Turbo/5/4.7) - ZhiPu Global',
288
+ name: 'Z.ai (GLM-5.2/5-Turbo) - ZhiPu Global',
167
289
  baseUrl: 'https://api.z.ai/api/anthropic',
168
290
  models: [
291
+ 'glm-5.2[1m]',
169
292
  'glm-5.1',
170
293
  'glm-5-turbo',
171
- 'glm-5',
172
- 'glm-4.7'
294
+ 'glm-5'
173
295
  ],
174
296
  versionAliases: {
175
- 'glm-4.5': 'glm-5.1',
176
- 'glm-4.6': 'glm-5.1',
177
- 'glm-4.7': 'glm-5.1',
178
- 'glm-5': 'glm-5.1',
179
- 'glm-5-turbo': 'glm-5.1'
297
+ 'glm-4.5': 'glm-5.2[1m]',
298
+ 'glm-4.6': 'glm-5.2[1m]',
299
+ 'glm-4.7': 'glm-5.2[1m]',
180
300
  },
181
301
  authTokenFormat: 'sk-...',
182
302
  description: 'Z.ai (ZhiPu AI Global) - Anthropic-compatible API for international users',
@@ -184,8 +304,13 @@ const providers = {
184
304
  compatibility: 'anthropic-compatible',
185
305
  envVars: {
186
306
  API_TIMEOUT_MS: '3000000',
187
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
307
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
308
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
309
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
310
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1',
311
+ CLAUDE_CODE_AUTO_COMPACT_WINDOW: '1000000',
188
312
  },
313
+ modelEnvTemplate: makeGlmTierTemplate(),
189
314
  note: 'Requires extended timeout for large responses'
190
315
  },
191
316
  custom: {
@@ -198,6 +323,11 @@ const providers = {
198
323
  description: 'Custom server with Anthropic-compatible API',
199
324
  requiresToken: true,
200
325
  compatibility: 'anthropic-compatible',
326
+ envVars: {
327
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
328
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
329
+ },
330
+ modelEnvTemplate: makeSingleTemplate(),
201
331
  note: 'Replace URL and model with your actual server details'
202
332
  }
203
333
  };