@kikkimo/claude-launcher 3.0.0 → 3.1.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,106 @@
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
+ // Anthropic models — defined as const so the template factory can reference them
43
+ const anthropicModels = [
44
+ 'claude-opus-4-7',
45
+ 'claude-sonnet-4-6',
46
+ 'claude-haiku-4-5-20251001',
47
+ 'claude-sonnet-4-5',
48
+ 'claude-opus-4-6',
49
+ 'claude-opus-4-5',
50
+ ];
51
+
7
52
  const providers = {
8
53
  anthropic: {
9
54
  name: 'Anthropic (Official)',
10
55
  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
56
+ models: anthropicModels,
23
57
  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'
58
+ 'claude-opus-4': 'claude-opus-4-7',
59
+ 'claude-opus-4-1': 'claude-opus-4-7',
60
+ 'claude-opus-4-5': 'claude-opus-4-7',
61
+ 'claude-opus-4-6': 'claude-opus-4-7',
62
+ 'claude-sonnet-4': 'claude-sonnet-4-6',
63
+ 'claude-sonnet-4-5': 'claude-sonnet-4-6',
64
+ 'claude-3-7-sonnet': 'claude-sonnet-4-6',
31
65
  },
32
66
  authTokenFormat: 'sk-ant-api03-...',
33
67
  description: 'Official Anthropic API - Fully compatible',
34
68
  requiresToken: true,
35
- compatibility: 'native'
69
+ compatibility: 'native',
70
+ envVars: {
71
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
72
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
73
+ },
74
+ modelEnvTemplate: {
75
+ getValues(model) {
76
+ const latestSonnet = anthropicModels.find(m => m.includes('sonnet')) || model;
77
+ const latestOpus = anthropicModels.find(m => m.includes('opus')) || model;
78
+ const latestHaiku = anthropicModels.find(m => m.includes('haiku')) || model;
79
+ return {
80
+ ANTHROPIC_CUSTOM_MODEL_OPTION: model,
81
+ ANTHROPIC_CUSTOM_MODEL_OPTION_NAME: model,
82
+ ANTHROPIC_DEFAULT_SONNET_MODEL: latestSonnet,
83
+ ANTHROPIC_DEFAULT_OPUS_MODEL: latestOpus,
84
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: latestHaiku,
85
+ CLAUDE_CODE_SUBAGENT_MODEL: latestHaiku,
86
+ smallFastModel: latestHaiku,
87
+ };
88
+ },
89
+ },
36
90
  },
37
91
  moonshot: {
38
- name: 'Moonshot AI (Kimi-K2.5/K2-Thinking)',
92
+ name: 'Moonshot AI (Kimi-K2.6/K2.5/K2-Thinking)',
39
93
  baseUrl: 'https://api.moonshot.cn/anthropic',
40
94
  models: [
95
+ 'kimi-k2.6',
41
96
  'kimi-k2.5',
42
97
  'kimi-k2-thinking',
43
- 'kimi-k2-thinking-turbo'
98
+ 'kimi-k2-thinking-turbo',
44
99
  ],
45
100
  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'
101
+ 'kimi-k2-0711-preview': 'kimi-k2.6',
102
+ 'kimi-k2-0905-preview': 'kimi-k2.6',
103
+ 'kimi-k2-turbo-preview': 'kimi-k2.6',
104
+ 'kimi-k2-thinking': 'kimi-k2.6',
105
+ 'kimi-k2-thinking-turbo': 'kimi-k2.6',
106
+ 'kimi-k2.5': 'kimi-k2.6',
51
107
  },
52
108
  authTokenFormat: 'sk-...',
53
109
  description: 'Moonshot AI - Provides Anthropic-compatible API',
@@ -55,8 +111,12 @@ const providers = {
55
111
  compatibility: 'anthropic-compatible',
56
112
  envVars: {
57
113
  API_TIMEOUT_MS: '3000000',
58
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
114
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
115
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
116
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
117
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
59
118
  },
119
+ modelEnvTemplate: makeFastMapTemplate({"kimi-k2.6":"kimi-k2-thinking-turbo","kimi-k2-thinking":"kimi-k2-thinking-turbo"}),
60
120
  note: 'Requires extended timeout for large responses'
61
121
  },
62
122
  kimi_for_coding: {
@@ -71,8 +131,12 @@ const providers = {
71
131
  compatibility: 'anthropic-compatible',
72
132
  envVars: {
73
133
  API_TIMEOUT_MS: '3000000',
74
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
134
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
135
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
136
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
137
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
75
138
  },
139
+ modelEnvTemplate: makeSingleTemplate(),
76
140
  note: 'Requires extended timeout for large responses'
77
141
  },
78
142
  minimax_cn: {
@@ -80,8 +144,12 @@ const providers = {
80
144
  baseUrl: 'https://api.minimaxi.com/anthropic',
81
145
  models: [
82
146
  'MiniMax-M2.7',
147
+ 'MiniMax-M2.7-highspeed',
83
148
  'MiniMax-M2.5',
84
- 'MiniMax-M2.1'
149
+ 'MiniMax-M2.5-highspeed',
150
+ 'MiniMax-M2.1',
151
+ 'MiniMax-M2.1-highspeed',
152
+ 'MiniMax-M2',
85
153
  ],
86
154
  versionAliases: {
87
155
  'MiniMax-M2.1': 'MiniMax-M2.7',
@@ -93,8 +161,12 @@ const providers = {
93
161
  compatibility: 'anthropic-compatible',
94
162
  envVars: {
95
163
  API_TIMEOUT_MS: '3000000',
96
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
164
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
165
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
166
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
167
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
97
168
  },
169
+ modelEnvTemplate: makeFastMapTemplate({"MiniMax-M2.7":"MiniMax-M2.7-highspeed","MiniMax-M2.5":"MiniMax-M2.5-highspeed","MiniMax-M2.1":"MiniMax-M2.1-highspeed"}),
98
170
  note: 'Requires extended timeout for large responses'
99
171
  },
100
172
  minimax_global: {
@@ -102,8 +174,12 @@ const providers = {
102
174
  baseUrl: 'https://api.minimax.io/anthropic',
103
175
  models: [
104
176
  'MiniMax-M2.7',
177
+ 'MiniMax-M2.7-highspeed',
105
178
  'MiniMax-M2.5',
106
- 'MiniMax-M2.1'
179
+ 'MiniMax-M2.5-highspeed',
180
+ 'MiniMax-M2.1',
181
+ 'MiniMax-M2.1-highspeed',
182
+ 'MiniMax-M2',
107
183
  ],
108
184
  versionAliases: {
109
185
  'MiniMax-M2.1': 'MiniMax-M2.7',
@@ -115,26 +191,41 @@ const providers = {
115
191
  compatibility: 'anthropic-compatible',
116
192
  envVars: {
117
193
  API_TIMEOUT_MS: '3000000',
118
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
194
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
195
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
196
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
197
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
119
198
  },
199
+ modelEnvTemplate: makeFastMapTemplate({"MiniMax-M2.7":"MiniMax-M2.7-highspeed","MiniMax-M2.5":"MiniMax-M2.5-highspeed","MiniMax-M2.1":"MiniMax-M2.1-highspeed"}),
120
200
  note: 'Requires extended timeout for large responses'
121
201
  },
122
202
  deepseek: {
123
- name: 'DeepSeek (DeepSeek V3/V3.1)',
203
+ name: 'DeepSeek (V4-Pro/V4-Flash)',
124
204
  baseUrl: 'https://api.deepseek.com/anthropic',
125
205
  models: [
206
+ 'deepseek-v4-pro[1m]',
207
+ 'deepseek-v4-flash[1m]',
126
208
  'deepseek-chat',
127
- 'deepseek-reasoner'
209
+ 'deepseek-reasoner',
128
210
  ],
211
+ versionAliases: {
212
+ 'deepseek-chat': 'deepseek-v4-flash[1m]',
213
+ 'deepseek-reasoner': 'deepseek-v4-pro[1m]',
214
+ },
129
215
  authTokenFormat: 'sk-...',
130
216
  description: 'DeepSeek AI - Anthropic-compatible endpoint',
131
217
  requiresToken: true,
132
218
  compatibility: 'anthropic-compatible',
133
219
  envVars: {
134
220
  API_TIMEOUT_MS: '600000',
135
- 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',
225
+ CLAUDE_CODE_EFFORT_LEVEL: 'max',
136
226
  },
137
- note: 'Requires extended timeout for complex reasoning tasks'
227
+ modelEnvTemplate: makeFastMapTemplate({"deepseek-v4-pro[1m]":"deepseek-v4-flash[1m]"}),
228
+ note: 'Requires extended timeout for complex reasoning tasks',
138
229
  },
139
230
  zhipu: {
140
231
  name: 'ZhiPu AI (GLM-5.1/5-Turbo/5/4.7) - 智谱清言',
@@ -158,8 +249,12 @@ const providers = {
158
249
  compatibility: 'anthropic-compatible',
159
250
  envVars: {
160
251
  API_TIMEOUT_MS: '3000000',
161
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
252
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
253
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
254
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
255
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
162
256
  },
257
+ modelEnvTemplate: makeFastMapTemplate({"glm-5.1":"glm-5-turbo"}),
163
258
  note: 'Requires extended timeout for large responses'
164
259
  },
165
260
  zai: {
@@ -184,8 +279,12 @@ const providers = {
184
279
  compatibility: 'anthropic-compatible',
185
280
  envVars: {
186
281
  API_TIMEOUT_MS: '3000000',
187
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1'
282
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
283
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
284
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
285
+ CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'
188
286
  },
287
+ modelEnvTemplate: makeFastMapTemplate({"glm-5.1":"glm-5-turbo"}),
189
288
  note: 'Requires extended timeout for large responses'
190
289
  },
191
290
  custom: {
@@ -198,6 +297,11 @@ const providers = {
198
297
  description: 'Custom server with Anthropic-compatible API',
199
298
  requiresToken: true,
200
299
  compatibility: 'anthropic-compatible',
300
+ envVars: {
301
+ CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
302
+ CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1',
303
+ },
304
+ modelEnvTemplate: makeSingleTemplate(),
201
305
  note: 'Replace URL and model with your actual server details'
202
306
  }
203
307
  };