@bubblebrain-ai/bubble 0.0.61 → 0.0.62
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/dist/model-catalog.js
CHANGED
|
@@ -62,8 +62,16 @@ const KIMI_THINKING_ONLY_LEVELS = ["medium"];
|
|
|
62
62
|
// verified against the live endpoint: low spent 92 reasoning tokens on a task
|
|
63
63
|
// where high spent 1310. Thinking is disableable on k3 (thinking.type
|
|
64
64
|
// "disabled"); the 256k variant exposes effort only, so it has no "off".
|
|
65
|
+
// K3.1 Pro (and its highspeed slot) is effort-only too: GET /coding/v1/models
|
|
66
|
+
// reports reasoning.type "only" and the endpoint 400s on thinking disabled.
|
|
67
|
+
// The default of "high" is Bubble's choice and matches the coding endpoint's
|
|
68
|
+
// reported default; Moonshot's open platform defaults to max server-side.
|
|
65
69
|
const KIMI_K3_LEVELS = ["off", "low", "high", "max"];
|
|
66
70
|
const KIMI_K3_EFFORT_ONLY_LEVELS = ["low", "high", "max"];
|
|
71
|
+
// DashScope's Moonshot passthrough (kimi/ ids) documents K3 as thinking-only
|
|
72
|
+
// with reasoning_effort "max" as its sole value. Not live-verified: the probing
|
|
73
|
+
// account has the passthrough product disabled.
|
|
74
|
+
const KIMI_PASSTHROUGH_K3_LEVELS = ["max"];
|
|
67
75
|
// DeepSeek V4 defaults to thinking/high, but the OpenAI-compatible API also
|
|
68
76
|
// supports disabling thinking and selecting low/high/max effort explicitly.
|
|
69
77
|
const DEEPSEEK_V4_LEVELS = ["off", "low", "high", "max"];
|
|
@@ -188,6 +196,20 @@ export const BUILTIN_MODELS = [
|
|
|
188
196
|
{ id: "glm-4.6", name: "GLM-4.6", providerId: "zai-coding-plan", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 200000 },
|
|
189
197
|
{ id: "qwen3.6-plus", name: "Qwen3.6 Plus", providerId: "alibaba", tier: "balanced", reasoningLevels: ["off"], contextWindow: 1048576 },
|
|
190
198
|
{ id: "qwen3.7-max", name: "Qwen3.7 Max", providerId: "alibaba", tier: "strong", reasoningLevels: ["off"], contextWindow: 1048576 },
|
|
199
|
+
// DashScope Kimi, first-party ids (probed 2026-10-26: kimi-k3 tiers track
|
|
200
|
+
// upstream, k2.5/k2.6 default to thinking off, K2.7 Code always thinks).
|
|
201
|
+
{ id: "kimi-k3", name: "Kimi K3", providerId: "alibaba", tier: "strong", reasoningLevels: KIMI_K3_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
202
|
+
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code", providerId: "alibaba", tier: "strong", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
203
|
+
{ id: "kimi-k2.6", name: "Kimi K2.6", providerId: "alibaba", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 256000 },
|
|
204
|
+
{ id: "kimi-k2.5", name: "Kimi K2.5", providerId: "alibaba", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 256000 },
|
|
205
|
+
// Moonshot passthrough ids, per DashScope's Kimi doc: K3 is max-only, K2.7
|
|
206
|
+
// Code always thinks, K2.6 toggles via enable_thinking.
|
|
207
|
+
{ id: "kimi/kimi-k3.1-pro", name: "Kimi K3.1 Pro", providerId: "alibaba", tier: "strong", reasoningLevels: KIMI_PASSTHROUGH_K3_LEVELS, defaultReasoningLevel: "max", contextWindow: 1048576 },
|
|
208
|
+
{ id: "kimi/kimi-k3.1-pro-highspeed", name: "Kimi K3.1 Pro Highspeed", providerId: "alibaba", tier: "fast", reasoningLevels: KIMI_PASSTHROUGH_K3_LEVELS, defaultReasoningLevel: "max", contextWindow: 1048576 },
|
|
209
|
+
{ id: "kimi/kimi-k3", name: "Kimi K3 (Moonshot)", providerId: "alibaba", tier: "strong", reasoningLevels: KIMI_PASSTHROUGH_K3_LEVELS, defaultReasoningLevel: "max", contextWindow: 1048576 },
|
|
210
|
+
{ id: "kimi/kimi-k2.7-code", name: "Kimi K2.7 Code (Moonshot)", providerId: "alibaba", tier: "strong", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
211
|
+
{ id: "kimi/kimi-k2.7-code-highspeed", name: "Kimi K2.7 Code Highspeed", providerId: "alibaba", tier: "fast", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
212
|
+
{ id: "kimi/kimi-k2.6", name: "Kimi K2.6 (Moonshot)", providerId: "alibaba", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 256000 },
|
|
191
213
|
// Bailian token plan (GET /models on the plan endpoint, probed 2026-08-04).
|
|
192
214
|
// Image/TTS entries from that list are omitted — this is a text agent.
|
|
193
215
|
{ id: "qwen3.8-max", name: "Qwen3.8 Max", providerId: "bailian-token-plan", tier: "strong", reasoningLevels: BAILIAN_FULL_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
@@ -220,17 +242,24 @@ export const BUILTIN_MODELS = [
|
|
|
220
242
|
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code", providerId: "moonshot-cn", tier: "strong", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
221
243
|
{ id: "kimi-k2.7-code-highspeed", name: "Kimi K2.7 Code Highspeed", providerId: "moonshot-cn", tier: "fast", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
222
244
|
{ id: "kimi-k3", name: "Kimi K3", providerId: "moonshot-cn", tier: "strong", reasoningLevels: KIMI_K3_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
245
|
+
{ id: "kimi-k3.1-pro", name: "Kimi K3.1 Pro", providerId: "moonshot-cn", tier: "strong", reasoningLevels: KIMI_K3_EFFORT_ONLY_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
246
|
+
{ id: "kimi-k3.1-pro-highspeed", name: "Kimi K3.1 Pro Highspeed", providerId: "moonshot-cn", tier: "fast", reasoningLevels: KIMI_K3_EFFORT_ONLY_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
223
247
|
{ id: "kimi-k2.6", name: "Kimi K2.6", providerId: "moonshot-cn", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 256000 },
|
|
224
248
|
{ id: "kimi-k2.5", name: "Kimi K2.5", providerId: "moonshot-cn", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 256000 },
|
|
225
249
|
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code", providerId: "moonshot-intl", tier: "strong", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
226
250
|
{ id: "kimi-k2.7-code-highspeed", name: "Kimi K2.7 Code Highspeed", providerId: "moonshot-intl", tier: "fast", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
227
251
|
{ id: "kimi-k3", name: "Kimi K3", providerId: "moonshot-intl", tier: "strong", reasoningLevels: KIMI_K3_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
252
|
+
{ id: "kimi-k3.1-pro", name: "Kimi K3.1 Pro", providerId: "moonshot-intl", tier: "strong", reasoningLevels: KIMI_K3_EFFORT_ONLY_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
253
|
+
{ id: "kimi-k3.1-pro-highspeed", name: "Kimi K3.1 Pro Highspeed", providerId: "moonshot-intl", tier: "fast", reasoningLevels: KIMI_K3_EFFORT_ONLY_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
228
254
|
{ id: "kimi-k2.6", name: "Kimi K2.6", providerId: "moonshot-intl", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 256000 },
|
|
229
255
|
{ id: "kimi-k2.5", name: "Kimi K2.5", providerId: "moonshot-intl", reasoningLevels: TOGGLE_THINKING_LEVELS, contextWindow: 256000 },
|
|
230
256
|
// Kimi for Coding serves plan-slot ids (verified via GET /coding/v1/models):
|
|
231
|
-
// k3, k3-256k,
|
|
257
|
+
// k3, k3-256k, k3.1-pro, k3.1-pro-highspeed, kimi-for-coding,
|
|
258
|
+
// kimi-for-coding-highspeed.
|
|
232
259
|
{ id: "k3", name: "Kimi K3", providerId: "kimi-for-coding", tier: "strong", reasoningLevels: KIMI_K3_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
233
260
|
{ id: "k3-256k", name: "Kimi K3 256K", providerId: "kimi-for-coding", tier: "strong", reasoningLevels: KIMI_K3_EFFORT_ONLY_LEVELS, defaultReasoningLevel: "high", contextWindow: 262144 },
|
|
261
|
+
{ id: "k3.1-pro", name: "Kimi K3.1 Pro", providerId: "kimi-for-coding", tier: "strong", reasoningLevels: KIMI_K3_EFFORT_ONLY_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
262
|
+
{ id: "k3.1-pro-highspeed", name: "Kimi K3.1 Pro Highspeed", providerId: "kimi-for-coding", tier: "fast", reasoningLevels: KIMI_K3_EFFORT_ONLY_LEVELS, defaultReasoningLevel: "high", contextWindow: 1048576 },
|
|
234
263
|
{ id: "kimi-for-coding", name: "Kimi for Coding", providerId: "kimi-for-coding", tier: "strong", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
235
264
|
{ id: "kimi-for-coding-highspeed", name: "Kimi for Coding Highspeed", providerId: "kimi-for-coding", tier: "fast", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
236
265
|
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code", providerId: "kimi-for-coding", tier: "strong", reasoningLevels: KIMI_THINKING_ONLY_LEVELS, contextWindow: 262144 },
|
|
@@ -12,7 +12,17 @@ const KIMI_K27_FAMILY = new Set([
|
|
|
12
12
|
// K3 takes OpenAI-style reasoning_effort (low/high/max, no "medium"); "off"
|
|
13
13
|
// disables thinking via top-level thinking.type. Verified live: effort changes
|
|
14
14
|
// reasoning-token spend, and nested extra_body.thinking is ignored server-side.
|
|
15
|
-
|
|
15
|
+
// K3.1 Pro takes the same body but is thinking-only (thinking.type "disabled"
|
|
16
|
+
// 400s); its catalog levels have no "off", so the disabled branch never fires.
|
|
17
|
+
const KIMI_K3_FAMILY = new Set([
|
|
18
|
+
"k3",
|
|
19
|
+
"k3-256k",
|
|
20
|
+
"kimi-k3",
|
|
21
|
+
"k3.1-pro",
|
|
22
|
+
"k3.1-pro-highspeed",
|
|
23
|
+
"kimi-k3.1-pro",
|
|
24
|
+
"kimi-k3.1-pro-highspeed",
|
|
25
|
+
]);
|
|
16
26
|
const KIMI_TOGGLE_THINKING_FAMILY = new Set(["kimi-k2.5", "kimi-k2.6"]);
|
|
17
27
|
const KIMI_K26_DEFAULT_MAX_TOKENS = 32768;
|
|
18
28
|
const MINIMAX_M3_FAMILY = new Set(["MiniMax-M3"]);
|
|
@@ -22,6 +32,21 @@ const DEEPSEEK_V4_FAMILY = new Set([
|
|
|
22
32
|
"deepseek-v4-flash-vision-exp",
|
|
23
33
|
"deepseek-v4-pro",
|
|
24
34
|
]);
|
|
35
|
+
// DashScope serves Kimi first-party ("kimi-k3") and as a Moonshot passthrough
|
|
36
|
+
// under a vendor prefix ("kimi/kimi-k3.1-pro"). The two take different thinking
|
|
37
|
+
// controls; the passthrough contract comes from DashScope's Kimi doc
|
|
38
|
+
// (help.aliyun.com/zh/model-studio/kimi-api-by-moonshot-ai): its K3 ids accept
|
|
39
|
+
// reasoning_effort "max" only, K2.6 toggles via enable_thinking, and the K2.7
|
|
40
|
+
// Code ids take no thinking parameter at all.
|
|
41
|
+
const ALIBABA_KIMI_PASSTHROUGH_EFFORT = new Set([
|
|
42
|
+
"kimi/kimi-k3",
|
|
43
|
+
"kimi/kimi-k3.1-pro",
|
|
44
|
+
"kimi/kimi-k3.1-pro-highspeed",
|
|
45
|
+
]);
|
|
46
|
+
const ALIBABA_KIMI_PASSTHROUGH_TOGGLE = new Set(["kimi/kimi-k2.6"]);
|
|
47
|
+
function isAlibabaKimi(providerId, modelId) {
|
|
48
|
+
return providerId === "alibaba" && /^(kimi\/)?kimi-/i.test(modelId);
|
|
49
|
+
}
|
|
25
50
|
function isFireworksKimi(providerId, modelId) {
|
|
26
51
|
const model = modelId.toLowerCase();
|
|
27
52
|
return providerId === "fireworks" && (model.includes("kimi")
|
|
@@ -120,6 +145,31 @@ export function resolveProviderRequestConfig(providerId, modelId, requestedLevel
|
|
|
120
145
|
},
|
|
121
146
|
};
|
|
122
147
|
}
|
|
148
|
+
// DashScope-hosted Kimi: the server rejects any temperature but the locked
|
|
149
|
+
// one ("Parameter 'temperature'=0.2 is not supported for kimi-k3 model").
|
|
150
|
+
// First-party ids take reasoning_effort validated against DashScope's own
|
|
151
|
+
// list, where "none" disables thinking (verified on kimi-k3/k2.5/k2.6; K2.7
|
|
152
|
+
// Code stays in thinking mode whatever is sent). Passthrough ids follow the
|
|
153
|
+
// documented contract above. Models missing from the catalog get no
|
|
154
|
+
// thinking field, so a thinking-only newcomer is never switched off.
|
|
155
|
+
if (isAlibabaKimi(providerId, modelId)) {
|
|
156
|
+
let extraBody;
|
|
157
|
+
if (ALIBABA_KIMI_PASSTHROUGH_EFFORT.has(modelId)) {
|
|
158
|
+
extraBody = { reasoning_effort: effectiveThinkingLevel };
|
|
159
|
+
}
|
|
160
|
+
else if (ALIBABA_KIMI_PASSTHROUGH_TOGGLE.has(modelId)) {
|
|
161
|
+
extraBody = { enable_thinking: effectiveThinkingLevel !== "off" };
|
|
162
|
+
}
|
|
163
|
+
else if (!modelId.toLowerCase().startsWith("kimi/") && getBuiltinModel(providerId, modelId)) {
|
|
164
|
+
extraBody = { reasoning_effort: effectiveThinkingLevel === "off" ? "none" : effectiveThinkingLevel };
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
effectiveThinkingLevel,
|
|
168
|
+
omitTemperature: true,
|
|
169
|
+
reasoningContentEcho: "tool_calls",
|
|
170
|
+
extraBody,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
123
173
|
if (providerId === "stepfun-api") {
|
|
124
174
|
return { effectiveThinkingLevel, reasoningContentEcho: "none" };
|
|
125
175
|
}
|
|
@@ -223,7 +273,12 @@ export function resolveProviderRequestConfig(providerId, modelId, requestedLevel
|
|
|
223
273
|
},
|
|
224
274
|
};
|
|
225
275
|
}
|
|
226
|
-
|
|
276
|
+
// Unlisted Moonshot models: every generation since K2.5 locks temperature
|
|
277
|
+
// and 400s on any other value, so let the server pick its own default.
|
|
278
|
+
// Pre-K2.5 ids (moonshot-v1, kimi-k2-*-preview) are deliberately not
|
|
279
|
+
// supported: the endpoints no longer list them, and they would merely lose
|
|
280
|
+
// the 0.2 default here rather than fail.
|
|
281
|
+
return { effectiveThinkingLevel, omitTemperature: true };
|
|
227
282
|
}
|
|
228
283
|
if (providerId === "openai"
|
|
229
284
|
|| providerId === "google"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CombinedAutocompleteProvider, } from "@bubblebrain-ai/pi-tui";
|
|
2
2
|
import { BUILTIN_PROVIDERS, encodeModel, isUserVisibleProvider, } from "../provider-registry.js";
|
|
3
|
-
import { getAvailableThinkingLevels, isThinkingToggleModel, normalizeThinkingLevel, } from "../provider-transform.js";
|
|
3
|
+
import { getAvailableThinkingLevels, isThinkingOnlyLevels, isThinkingToggleModel, normalizeThinkingLevel, } from "../provider-transform.js";
|
|
4
4
|
import { GROK_SUBSCRIPTION_PROVIDER_ID, isGrokSubscriptionProviderId, } from "../external-runtime/grok-provider.js";
|
|
5
5
|
import { discoverModelProviderGroups, getVisibleModelProviders, localModelsForProvider, } from "./model-picker-data.js";
|
|
6
6
|
const MODEL_COMMAND_PREFIX = "/model ";
|
|
@@ -109,9 +109,14 @@ export function buildModelAutocompleteItems(groups, argumentPrefix = "", current
|
|
|
109
109
|
for (const selection of selections) {
|
|
110
110
|
const { provider, model, value, levels } = selection;
|
|
111
111
|
const label = model.name || model.id;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
// A model with one fixed grade skips the effort step, so name the grade
|
|
113
|
+
// here or the user never learns which effort it runs at.
|
|
114
|
+
const fixedEffort = levels.length === 1 && levels[0] !== "off" && !isThinkingOnlyLevels(levels)
|
|
115
|
+
? `${levels[0]} effort`
|
|
116
|
+
: undefined;
|
|
117
|
+
const description = [provider.name, label === model.id ? undefined : model.id, fixedEffort]
|
|
118
|
+
.filter(Boolean)
|
|
119
|
+
.join(" · ");
|
|
115
120
|
const searchable = `${value} ${label} ${description}`.toLowerCase();
|
|
116
121
|
if (query && !searchable.includes(query))
|
|
117
122
|
continue;
|
|
@@ -2,9 +2,11 @@ import type { ThinkingLevel } from "../types.js";
|
|
|
2
2
|
export declare function getAvailableThinkingLevels(providerId: string, modelId: string): ThinkingLevel[];
|
|
3
3
|
export declare function getDefaultThinkingLevel(providerId: string, modelId: string): ThinkingLevel;
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
5
|
+
* A lone "medium" means the model is always in thinking mode with no
|
|
6
6
|
* user-facing grades (e.g. kimi-k2.7-code) — the level value is an internal
|
|
7
|
-
* placeholder and must not be shown to the user as an effort grade.
|
|
7
|
+
* placeholder and must not be shown to the user as an effort grade. Any other
|
|
8
|
+
* lone level (e.g. DashScope's max-only Kimi K3) is a real fixed grade that
|
|
9
|
+
* the provider sends verbatim, so it is shown.
|
|
8
10
|
*/
|
|
9
11
|
export declare function isThinkingOnlyLevels(levels: readonly ThinkingLevel[]): boolean;
|
|
10
12
|
export declare function isThinkingOnlyModel(providerId?: string, modelId?: string): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getBuiltinModel, getModelDefaultReasoningLevel } from "../model-catalog.js";
|
|
2
2
|
import { clampThinkingLevel } from "./thinking-level.js";
|
|
3
|
-
const KIMI_TOGGLE_PROVIDER_IDS = new Set(["moonshot-cn", "moonshot-intl", "kimi-for-coding"]);
|
|
4
|
-
const KIMI_THINKING_TOGGLE_MODELS = new Set(["kimi-k2.5", "kimi-k2.6"]);
|
|
3
|
+
const KIMI_TOGGLE_PROVIDER_IDS = new Set(["moonshot-cn", "moonshot-intl", "kimi-for-coding", "alibaba"]);
|
|
4
|
+
const KIMI_THINKING_TOGGLE_MODELS = new Set(["kimi-k2.5", "kimi-k2.6", "kimi/kimi-k2.6"]);
|
|
5
5
|
export function getAvailableThinkingLevels(providerId, modelId) {
|
|
6
6
|
return getBuiltinModel(providerId, modelId)?.reasoningLevels ?? ["off"];
|
|
7
7
|
}
|
|
@@ -13,12 +13,14 @@ export function getDefaultThinkingLevel(providerId, modelId) {
|
|
|
13
13
|
return levels.includes("medium") ? "medium" : levels[0] || "off";
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* A
|
|
16
|
+
* A lone "medium" means the model is always in thinking mode with no
|
|
17
17
|
* user-facing grades (e.g. kimi-k2.7-code) — the level value is an internal
|
|
18
|
-
* placeholder and must not be shown to the user as an effort grade.
|
|
18
|
+
* placeholder and must not be shown to the user as an effort grade. Any other
|
|
19
|
+
* lone level (e.g. DashScope's max-only Kimi K3) is a real fixed grade that
|
|
20
|
+
* the provider sends verbatim, so it is shown.
|
|
19
21
|
*/
|
|
20
22
|
export function isThinkingOnlyLevels(levels) {
|
|
21
|
-
return levels.length === 1 && levels[0]
|
|
23
|
+
return levels.length === 1 && levels[0] === "medium";
|
|
22
24
|
}
|
|
23
25
|
export function isThinkingOnlyModel(providerId = "", modelId = "") {
|
|
24
26
|
return isThinkingOnlyLevels(getAvailableThinkingLevels(providerId, modelId));
|