@anchrd/colab-sdk 0.1.44 → 0.1.45
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/connectors/connectors.d.ts +3 -0
- package/dist/connectors/connectors.js +7 -0
- package/dist/grammar/grammar.d.ts +2 -0
- package/dist/grammar/grammar.js +7 -0
- package/dist/operators/operators.d.ts +129 -1
- package/dist/operators/operators.js +52 -3
- package/dist/relations/relations.d.ts +336 -0
- package/dist/relations/relations.js +125 -0
- package/dist/sdk.d.ts +3 -1
- package/dist/sdk.js +3 -1
- package/dist/types/types.d.ts +166 -0
- package/dist/types/types.js +112 -0
- package/dist/written/written.d.ts +4 -0
- package/dist/written/written.js +5 -0
- package/package.json +1 -1
|
@@ -62,6 +62,7 @@ export declare const ConnectorManifestTool: z.ZodObject<{
|
|
|
62
62
|
description: z.ZodString;
|
|
63
63
|
writes: z.ZodBoolean;
|
|
64
64
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
65
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
66
|
}, z.core.$strict>;
|
|
66
67
|
export type ConnectorManifestTool = z.infer<typeof ConnectorManifestTool>;
|
|
67
68
|
export declare const ConnectorManifest: z.ZodObject<{
|
|
@@ -114,6 +115,7 @@ export declare const ConnectorManifest: z.ZodObject<{
|
|
|
114
115
|
description: z.ZodString;
|
|
115
116
|
writes: z.ZodBoolean;
|
|
116
117
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
118
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
119
|
}, z.core.$strict>>>;
|
|
118
120
|
}, z.core.$strict>;
|
|
119
121
|
export type ConnectorManifest = z.infer<typeof ConnectorManifest>;
|
|
@@ -466,6 +468,7 @@ export declare const ConnectorDetail: z.ZodObject<{
|
|
|
466
468
|
description: z.ZodString;
|
|
467
469
|
writes: z.ZodBoolean;
|
|
468
470
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
471
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
469
472
|
}, z.core.$strict>>>;
|
|
470
473
|
}, z.core.$strict>>;
|
|
471
474
|
files: z.ZodArray<z.ZodObject<{
|
|
@@ -82,6 +82,13 @@ export const ConnectorManifestTool = z.strictObject({
|
|
|
82
82
|
writes: z.boolean(),
|
|
83
83
|
// A JSON Schema of an object without further keys (`additionalProperties: false`).
|
|
84
84
|
input: z.record(z.string(), z.unknown()),
|
|
85
|
+
// The fields of `input` that carry the id of a file in Colab (E248, #1158): Colab reads each with
|
|
86
|
+
// the caller's rights before the code runs and hands it over as `files.<field>`.
|
|
87
|
+
files: z
|
|
88
|
+
.array(z.string().regex(/^[A-Za-z][A-Za-z0-9]*$/))
|
|
89
|
+
.min(1)
|
|
90
|
+
.max(10)
|
|
91
|
+
.optional(),
|
|
85
92
|
});
|
|
86
93
|
// `connector.json`. Strict although it is a file: a misspelt key must be refused, not dropped.
|
|
87
94
|
export const ConnectorManifest = z.strictObject({
|
|
@@ -46,6 +46,8 @@ export declare const resources: {
|
|
|
46
46
|
readonly organisation: "organisations";
|
|
47
47
|
readonly home: "homes";
|
|
48
48
|
readonly job: "jobs";
|
|
49
|
+
readonly type: "types";
|
|
50
|
+
readonly relation: "relations";
|
|
49
51
|
};
|
|
50
52
|
export declare const actions: readonly ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
51
53
|
export declare const verbs: readonly ["invite", "resend", "disable", "enable", "rotate", "share", "move", "start", "complete", "test", "revoke", "remove", "unlock", "publish", "schedule", "unpublish", "cancel", "describe"];
|
package/dist/grammar/grammar.js
CHANGED
|
@@ -101,6 +101,13 @@ export const resources = {
|
|
|
101
101
|
// how far it is, `_list` the person's jobs still running. Only a person in the browser starts or
|
|
102
102
|
// reads one; no AI (D124). Decided by the orchestrator.
|
|
103
103
|
job: "jobs",
|
|
104
|
+
// The ontology (#1124, E250): a type describes what something is (an object, a relation, an action
|
|
105
|
+
// or an actor), `intelligence_type_*`, and changing types is a right of its own
|
|
106
|
+
// (`intelligence / type / update`). A relation connects two things, computed from a rule or set by
|
|
107
|
+
// somebody, `intelligence_relation_*`; "Beziehung" in the UI. Not `link`, which is the public link.
|
|
108
|
+
// Both named by the ticket.
|
|
109
|
+
type: "types",
|
|
110
|
+
relation: "relations",
|
|
104
111
|
};
|
|
105
112
|
// The closed list of actions with a route of their own shape.
|
|
106
113
|
export const actions = ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
@@ -12,6 +12,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
12
12
|
readonly cacheRead: 0.044;
|
|
13
13
|
readonly output: 3.96;
|
|
14
14
|
};
|
|
15
|
+
readonly reasoning: {
|
|
16
|
+
readonly level: "medium";
|
|
17
|
+
readonly adjustable: true;
|
|
18
|
+
};
|
|
15
19
|
}, {
|
|
16
20
|
readonly model: "workers-ai/@cf/deepseek-ai/deepseek-v4.1-flash-1017";
|
|
17
21
|
readonly name: "DeepSeek V4.1 Flash";
|
|
@@ -21,6 +25,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
21
25
|
readonly cacheRead: 0.006;
|
|
22
26
|
readonly output: 1.2;
|
|
23
27
|
};
|
|
28
|
+
readonly reasoning: {
|
|
29
|
+
readonly level: "medium";
|
|
30
|
+
readonly adjustable: true;
|
|
31
|
+
};
|
|
24
32
|
}, {
|
|
25
33
|
readonly model: "anthropic/claude-haiku-5-5";
|
|
26
34
|
readonly name: "Claude Haiku 5.5";
|
|
@@ -31,6 +39,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
31
39
|
readonly cacheWrite: 0.125;
|
|
32
40
|
readonly output: 0.5;
|
|
33
41
|
};
|
|
42
|
+
readonly reasoning: {
|
|
43
|
+
readonly level: "off";
|
|
44
|
+
readonly adjustable: false;
|
|
45
|
+
};
|
|
34
46
|
}, {
|
|
35
47
|
readonly model: "anthropic/claude-sonnet-5-5";
|
|
36
48
|
readonly name: "Claude Sonnet 5.5";
|
|
@@ -41,6 +53,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
41
53
|
readonly cacheWrite: 2.5;
|
|
42
54
|
readonly output: 10;
|
|
43
55
|
};
|
|
56
|
+
readonly reasoning: {
|
|
57
|
+
readonly level: "off";
|
|
58
|
+
readonly adjustable: false;
|
|
59
|
+
};
|
|
44
60
|
}, {
|
|
45
61
|
readonly model: "anthropic/claude-opus-5-5";
|
|
46
62
|
readonly name: "Claude Opus 5.5";
|
|
@@ -51,6 +67,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
51
67
|
readonly cacheWrite: 5;
|
|
52
68
|
readonly output: 20;
|
|
53
69
|
};
|
|
70
|
+
readonly reasoning: {
|
|
71
|
+
readonly level: "off";
|
|
72
|
+
readonly adjustable: false;
|
|
73
|
+
};
|
|
54
74
|
}, {
|
|
55
75
|
readonly model: "anthropic/claude-fable-5-1";
|
|
56
76
|
readonly name: "Claude Fable 5.1";
|
|
@@ -61,6 +81,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
61
81
|
readonly cacheWrite: 12.5;
|
|
62
82
|
readonly output: 50;
|
|
63
83
|
};
|
|
84
|
+
readonly reasoning: {
|
|
85
|
+
readonly level: "off";
|
|
86
|
+
readonly adjustable: false;
|
|
87
|
+
};
|
|
64
88
|
}, {
|
|
65
89
|
readonly model: "xai/grok-4.7";
|
|
66
90
|
readonly name: "Grok 4.7";
|
|
@@ -70,6 +94,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
70
94
|
readonly cacheRead: 0.5;
|
|
71
95
|
readonly output: 6;
|
|
72
96
|
};
|
|
97
|
+
readonly reasoning: {
|
|
98
|
+
readonly level: "medium";
|
|
99
|
+
readonly adjustable: false;
|
|
100
|
+
};
|
|
73
101
|
}, {
|
|
74
102
|
readonly model: "moonshotai/kimi-k3";
|
|
75
103
|
readonly name: "Kimi K3";
|
|
@@ -79,6 +107,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
79
107
|
readonly cacheRead: 0.3;
|
|
80
108
|
readonly output: 15;
|
|
81
109
|
};
|
|
110
|
+
readonly reasoning: {
|
|
111
|
+
readonly level: "medium";
|
|
112
|
+
readonly adjustable: false;
|
|
113
|
+
};
|
|
82
114
|
}, {
|
|
83
115
|
readonly model: "workers-ai/@cf/moonshotai/kimi-k2.7-code";
|
|
84
116
|
readonly name: "Kimi K2.7 Code";
|
|
@@ -88,6 +120,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
88
120
|
readonly cacheRead: 0.19;
|
|
89
121
|
readonly output: 4;
|
|
90
122
|
};
|
|
123
|
+
readonly reasoning: {
|
|
124
|
+
readonly level: "medium";
|
|
125
|
+
readonly adjustable: false;
|
|
126
|
+
};
|
|
91
127
|
}, {
|
|
92
128
|
readonly model: "workers-ai/@cf/moonshotai/kimi-k2.6";
|
|
93
129
|
readonly name: "Kimi K2.6";
|
|
@@ -97,6 +133,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
97
133
|
readonly cacheRead: 0.16;
|
|
98
134
|
readonly output: 4;
|
|
99
135
|
};
|
|
136
|
+
readonly reasoning: {
|
|
137
|
+
readonly level: "medium";
|
|
138
|
+
readonly adjustable: false;
|
|
139
|
+
};
|
|
100
140
|
}, {
|
|
101
141
|
readonly model: "workers-ai/@cf/zai-org/glm-5.3";
|
|
102
142
|
readonly name: "GLM 5.3";
|
|
@@ -106,6 +146,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
106
146
|
readonly cacheRead: 0.26;
|
|
107
147
|
readonly output: 4.4;
|
|
108
148
|
};
|
|
149
|
+
readonly reasoning: {
|
|
150
|
+
readonly level: "medium";
|
|
151
|
+
readonly adjustable: false;
|
|
152
|
+
};
|
|
109
153
|
}, {
|
|
110
154
|
readonly model: "workers-ai/@cf/zai-org/glm-5.3-flash";
|
|
111
155
|
readonly name: "GLM 5.3 Flash";
|
|
@@ -115,6 +159,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
115
159
|
readonly cacheRead: 0.03;
|
|
116
160
|
readonly output: 0.5;
|
|
117
161
|
};
|
|
162
|
+
readonly reasoning: {
|
|
163
|
+
readonly level: "medium";
|
|
164
|
+
readonly adjustable: false;
|
|
165
|
+
};
|
|
118
166
|
}, {
|
|
119
167
|
readonly model: "workers-ai/@cf/qwen/qwen3.8-27b";
|
|
120
168
|
readonly name: "Qwen3.8 27B";
|
|
@@ -124,6 +172,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
124
172
|
readonly cacheRead: 0.05;
|
|
125
173
|
readonly output: 3.2;
|
|
126
174
|
};
|
|
175
|
+
readonly reasoning: {
|
|
176
|
+
readonly level: "medium";
|
|
177
|
+
readonly adjustable: false;
|
|
178
|
+
};
|
|
127
179
|
}, {
|
|
128
180
|
readonly model: "workers-ai/@cf/google/gemma-4-26b-a4b-it";
|
|
129
181
|
readonly name: "Gemma 4 26B";
|
|
@@ -133,6 +185,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
133
185
|
readonly cacheRead: 0.1;
|
|
134
186
|
readonly output: 0.3;
|
|
135
187
|
};
|
|
188
|
+
readonly reasoning: {
|
|
189
|
+
readonly level: "off";
|
|
190
|
+
readonly adjustable: false;
|
|
191
|
+
};
|
|
136
192
|
}, {
|
|
137
193
|
readonly model: "workers-ai/@cf/nvidia/nemotron-3-120b-a12b";
|
|
138
194
|
readonly name: "Nemotron 3 120B";
|
|
@@ -142,6 +198,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
142
198
|
readonly cacheRead: 0.5;
|
|
143
199
|
readonly output: 1.5;
|
|
144
200
|
};
|
|
201
|
+
readonly reasoning: {
|
|
202
|
+
readonly level: "medium";
|
|
203
|
+
readonly adjustable: false;
|
|
204
|
+
};
|
|
145
205
|
}, {
|
|
146
206
|
readonly model: "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct";
|
|
147
207
|
readonly name: "Llama 4 Scout";
|
|
@@ -151,6 +211,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
151
211
|
readonly cacheRead: 0.27;
|
|
152
212
|
readonly output: 0.85;
|
|
153
213
|
};
|
|
214
|
+
readonly reasoning: {
|
|
215
|
+
readonly level: "off";
|
|
216
|
+
readonly adjustable: false;
|
|
217
|
+
};
|
|
154
218
|
}, {
|
|
155
219
|
readonly model: "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct";
|
|
156
220
|
readonly name: "Mistral Small 3.1";
|
|
@@ -160,6 +224,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
160
224
|
readonly cacheRead: 0.351;
|
|
161
225
|
readonly output: 0.555;
|
|
162
226
|
};
|
|
227
|
+
readonly reasoning: {
|
|
228
|
+
readonly level: "off";
|
|
229
|
+
readonly adjustable: false;
|
|
230
|
+
};
|
|
163
231
|
}, {
|
|
164
232
|
readonly model: "openai/gpt-6.1-terra";
|
|
165
233
|
readonly name: "GPT-6.1 Terra";
|
|
@@ -170,6 +238,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
170
238
|
readonly cacheWrite: 1.25;
|
|
171
239
|
readonly output: 5;
|
|
172
240
|
};
|
|
241
|
+
readonly reasoning: {
|
|
242
|
+
readonly level: "off";
|
|
243
|
+
readonly adjustable: false;
|
|
244
|
+
};
|
|
173
245
|
readonly outputLimit: "max_completion_tokens";
|
|
174
246
|
readonly reasoningEffort: "none";
|
|
175
247
|
}, {
|
|
@@ -182,6 +254,10 @@ export declare const gatewayCatalog: readonly [{
|
|
|
182
254
|
readonly cacheWrite: 0.125;
|
|
183
255
|
readonly output: 0.5;
|
|
184
256
|
};
|
|
257
|
+
readonly reasoning: {
|
|
258
|
+
readonly level: "off";
|
|
259
|
+
readonly adjustable: false;
|
|
260
|
+
};
|
|
185
261
|
readonly outputLimit: "max_completion_tokens";
|
|
186
262
|
readonly reasoningEffort: "none";
|
|
187
263
|
}];
|
|
@@ -208,7 +284,29 @@ export type RetiredGatewayModel = (typeof retiredGatewayModels)[number]["model"]
|
|
|
208
284
|
export declare function gatewayModelOf(model: string): GatewayModelEntry | null;
|
|
209
285
|
export type GatewayOutputLimit = "max_tokens" | "max_completion_tokens";
|
|
210
286
|
export declare function outputLimitOf(model: string): GatewayOutputLimit;
|
|
211
|
-
export declare
|
|
287
|
+
export declare const ReasoningLevel: z.ZodEnum<{
|
|
288
|
+
medium: "medium";
|
|
289
|
+
off: "off";
|
|
290
|
+
low: "low";
|
|
291
|
+
high: "high";
|
|
292
|
+
}>;
|
|
293
|
+
export type ReasoningLevel = z.infer<typeof ReasoningLevel>;
|
|
294
|
+
export declare const ReasoningStage: z.ZodEnum<{
|
|
295
|
+
default: "default";
|
|
296
|
+
medium: "medium";
|
|
297
|
+
off: "off";
|
|
298
|
+
low: "low";
|
|
299
|
+
high: "high";
|
|
300
|
+
}>;
|
|
301
|
+
export type ReasoningStage = z.infer<typeof ReasoningStage>;
|
|
302
|
+
export declare const reasoningDefault: ReasoningStage;
|
|
303
|
+
export declare function reasoningOfModel(model: string): {
|
|
304
|
+
level: ReasoningLevel;
|
|
305
|
+
adjustable: boolean;
|
|
306
|
+
} | null;
|
|
307
|
+
export declare function reasoningAdjustable(model: string): boolean;
|
|
308
|
+
export type ReasoningEffort = "none" | "low" | "medium" | "high";
|
|
309
|
+
export declare function reasoningEffortOf(model: string, stage: ReasoningStage): ReasoningEffort | null;
|
|
212
310
|
export declare function cacheWritePriceOf(entry: GatewayModelEntry): number;
|
|
213
311
|
export declare const GatewayModelEntrySchema: z.ZodObject<{
|
|
214
312
|
model: z.ZodString;
|
|
@@ -225,6 +323,15 @@ export declare const GatewayModelEntrySchema: z.ZodObject<{
|
|
|
225
323
|
max_tokens: "max_tokens";
|
|
226
324
|
}>>;
|
|
227
325
|
reasoningEffort: z.ZodOptional<z.ZodLiteral<"none">>;
|
|
326
|
+
reasoning: z.ZodObject<{
|
|
327
|
+
level: z.ZodEnum<{
|
|
328
|
+
medium: "medium";
|
|
329
|
+
off: "off";
|
|
330
|
+
low: "low";
|
|
331
|
+
high: "high";
|
|
332
|
+
}>;
|
|
333
|
+
adjustable: z.ZodBoolean;
|
|
334
|
+
}, z.core.$strip>;
|
|
228
335
|
}, z.core.$strip>;
|
|
229
336
|
export declare const operatorProviders: readonly [{
|
|
230
337
|
readonly provider: "claude";
|
|
@@ -844,6 +951,13 @@ export declare const OperatorMachineUpdateInput: z.ZodObject<{
|
|
|
844
951
|
"gemini-2.5-flash": "gemini-2.5-flash";
|
|
845
952
|
"gemini-2.5-flash-lite": "gemini-2.5-flash-lite";
|
|
846
953
|
}>>;
|
|
954
|
+
reasoning: z.ZodOptional<z.ZodEnum<{
|
|
955
|
+
default: "default";
|
|
956
|
+
medium: "medium";
|
|
957
|
+
off: "off";
|
|
958
|
+
low: "low";
|
|
959
|
+
high: "high";
|
|
960
|
+
}>>;
|
|
847
961
|
subagents: z.ZodOptional<z.ZodObject<{
|
|
848
962
|
allowed: z.ZodBoolean;
|
|
849
963
|
max: z.ZodInt;
|
|
@@ -928,6 +1042,13 @@ export declare const Operator: z.ZodObject<{
|
|
|
928
1042
|
"gemini-2.5-flash": "gemini-2.5-flash";
|
|
929
1043
|
"gemini-2.5-flash-lite": "gemini-2.5-flash-lite";
|
|
930
1044
|
}>;
|
|
1045
|
+
reasoning: z.ZodEnum<{
|
|
1046
|
+
default: "default";
|
|
1047
|
+
medium: "medium";
|
|
1048
|
+
off: "off";
|
|
1049
|
+
low: "low";
|
|
1050
|
+
high: "high";
|
|
1051
|
+
}>;
|
|
931
1052
|
subagents: z.ZodObject<{
|
|
932
1053
|
allowed: z.ZodBoolean;
|
|
933
1054
|
max: z.ZodInt;
|
|
@@ -1131,6 +1252,13 @@ export declare const OperatorList: z.ZodObject<{
|
|
|
1131
1252
|
"gemini-2.5-flash": "gemini-2.5-flash";
|
|
1132
1253
|
"gemini-2.5-flash-lite": "gemini-2.5-flash-lite";
|
|
1133
1254
|
}>;
|
|
1255
|
+
reasoning: z.ZodEnum<{
|
|
1256
|
+
default: "default";
|
|
1257
|
+
medium: "medium";
|
|
1258
|
+
off: "off";
|
|
1259
|
+
low: "low";
|
|
1260
|
+
high: "high";
|
|
1261
|
+
}>;
|
|
1134
1262
|
subagents: z.ZodObject<{
|
|
1135
1263
|
allowed: z.ZodBoolean;
|
|
1136
1264
|
max: z.ZodInt;
|
|
@@ -37,6 +37,12 @@ import { OperatorProvider, UserId } from "../users/users.js";
|
|
|
37
37
|
// `reasoning_effort: "none"` (`reasoningEffort`); `openai/gpt-6.1-sol` and `gpt-6-sol` call tools only
|
|
38
38
|
// through `/responses` (Spike #979). GPT-6.1 Terra stays (#1059 keeps it) although it left its test
|
|
39
39
|
// card open twice (#1066).
|
|
40
|
+
// `reasoning` (E249, #1139): how strongly the model thinks unasked (`level`, `off` not at all), and
|
|
41
|
+
// whether its path through `/compat` takes a stage while it calls tools (`adjustable`). Adjustable is
|
|
42
|
+
// DeepSeek: its runs think at `high` and not at `off` (#1139). Claude does not think through
|
|
43
|
+
// `/compat` at any stage (Sonnet 5.5 at `high`: no thinking, the same output, #1139) until #1161;
|
|
44
|
+
// GPT calls tools only without thinking; Grok, Kimi, GLM, Qwen and Nemotron think by themselves, but
|
|
45
|
+
// no stage of theirs is proven.
|
|
40
46
|
export const gatewayCatalog = [
|
|
41
47
|
{
|
|
42
48
|
gateway: "cloudflare",
|
|
@@ -47,108 +53,126 @@ export const gatewayCatalog = [
|
|
|
47
53
|
name: "DeepSeek V4 Pro",
|
|
48
54
|
context: 1_000_000,
|
|
49
55
|
price: { input: 1.32, cacheRead: 0.044, output: 3.96 },
|
|
56
|
+
reasoning: { level: "medium", adjustable: true },
|
|
50
57
|
},
|
|
51
58
|
{
|
|
52
59
|
model: "workers-ai/@cf/deepseek-ai/deepseek-v4.1-flash-1017",
|
|
53
60
|
name: "DeepSeek V4.1 Flash",
|
|
54
61
|
context: 1_048_576,
|
|
55
62
|
price: { input: 0.3, cacheRead: 0.006, output: 1.2 },
|
|
63
|
+
reasoning: { level: "medium", adjustable: true },
|
|
56
64
|
},
|
|
57
65
|
{
|
|
58
66
|
model: "anthropic/claude-haiku-5-5",
|
|
59
67
|
name: "Claude Haiku 5.5",
|
|
60
68
|
context: 1_000_000,
|
|
61
69
|
price: { input: 0.1, cacheRead: 0.01, cacheWrite: 0.125, output: 0.5 },
|
|
70
|
+
reasoning: { level: "off", adjustable: false },
|
|
62
71
|
},
|
|
63
72
|
{
|
|
64
73
|
model: "anthropic/claude-sonnet-5-5",
|
|
65
74
|
name: "Claude Sonnet 5.5",
|
|
66
75
|
context: 1_000_000,
|
|
67
76
|
price: { input: 2, cacheRead: 0.1, cacheWrite: 2.5, output: 10 },
|
|
77
|
+
reasoning: { level: "off", adjustable: false },
|
|
68
78
|
},
|
|
69
79
|
{
|
|
70
80
|
model: "anthropic/claude-opus-5-5",
|
|
71
81
|
name: "Claude Opus 5.5",
|
|
72
82
|
context: 1_000_000,
|
|
73
83
|
price: { input: 4, cacheRead: 0.2, cacheWrite: 5, output: 20 },
|
|
84
|
+
reasoning: { level: "off", adjustable: false },
|
|
74
85
|
},
|
|
75
86
|
{
|
|
76
87
|
model: "anthropic/claude-fable-5-1",
|
|
77
88
|
name: "Claude Fable 5.1",
|
|
78
89
|
context: 1_000_000,
|
|
79
90
|
price: { input: 10, cacheRead: 0.25, cacheWrite: 12.5, output: 50 },
|
|
91
|
+
reasoning: { level: "off", adjustable: false },
|
|
80
92
|
},
|
|
81
93
|
{
|
|
82
94
|
model: "xai/grok-4.7",
|
|
83
95
|
name: "Grok 4.7",
|
|
84
96
|
context: 500_000,
|
|
85
97
|
price: { input: 2, cacheRead: 0.5, output: 6 },
|
|
98
|
+
reasoning: { level: "medium", adjustable: false },
|
|
86
99
|
},
|
|
87
100
|
{
|
|
88
101
|
model: "moonshotai/kimi-k3",
|
|
89
102
|
name: "Kimi K3",
|
|
90
103
|
context: 1_048_576,
|
|
91
104
|
price: { input: 3, cacheRead: 0.3, output: 15 },
|
|
105
|
+
reasoning: { level: "medium", adjustable: false },
|
|
92
106
|
},
|
|
93
107
|
{
|
|
94
108
|
model: "workers-ai/@cf/moonshotai/kimi-k2.7-code",
|
|
95
109
|
name: "Kimi K2.7 Code",
|
|
96
110
|
context: 262_144,
|
|
97
111
|
price: { input: 0.95, cacheRead: 0.19, output: 4 },
|
|
112
|
+
reasoning: { level: "medium", adjustable: false },
|
|
98
113
|
},
|
|
99
114
|
{
|
|
100
115
|
model: "workers-ai/@cf/moonshotai/kimi-k2.6",
|
|
101
116
|
name: "Kimi K2.6",
|
|
102
117
|
context: 262_144,
|
|
103
118
|
price: { input: 0.95, cacheRead: 0.16, output: 4 },
|
|
119
|
+
reasoning: { level: "medium", adjustable: false },
|
|
104
120
|
},
|
|
105
121
|
{
|
|
106
122
|
model: "workers-ai/@cf/zai-org/glm-5.3",
|
|
107
123
|
name: "GLM 5.3",
|
|
108
124
|
context: 1_048_576,
|
|
109
125
|
price: { input: 1.4, cacheRead: 0.26, output: 4.4 },
|
|
126
|
+
reasoning: { level: "medium", adjustable: false },
|
|
110
127
|
},
|
|
111
128
|
{
|
|
112
129
|
model: "workers-ai/@cf/zai-org/glm-5.3-flash",
|
|
113
130
|
name: "GLM 5.3 Flash",
|
|
114
131
|
context: 1_048_576,
|
|
115
132
|
price: { input: 0.15, cacheRead: 0.03, output: 0.5 },
|
|
133
|
+
reasoning: { level: "medium", adjustable: false },
|
|
116
134
|
},
|
|
117
135
|
{
|
|
118
136
|
model: "workers-ai/@cf/qwen/qwen3.8-27b",
|
|
119
137
|
name: "Qwen3.8 27B",
|
|
120
138
|
context: 262_144,
|
|
121
139
|
price: { input: 0.45, cacheRead: 0.05, output: 3.2 },
|
|
140
|
+
reasoning: { level: "medium", adjustable: false },
|
|
122
141
|
},
|
|
123
142
|
{
|
|
124
143
|
model: "workers-ai/@cf/google/gemma-4-26b-a4b-it",
|
|
125
144
|
name: "Gemma 4 26B",
|
|
126
145
|
context: 256_000,
|
|
127
146
|
price: { input: 0.1, cacheRead: 0.1, output: 0.3 },
|
|
147
|
+
reasoning: { level: "off", adjustable: false },
|
|
128
148
|
},
|
|
129
149
|
{
|
|
130
150
|
model: "workers-ai/@cf/nvidia/nemotron-3-120b-a12b",
|
|
131
151
|
name: "Nemotron 3 120B",
|
|
132
152
|
context: 256_000,
|
|
133
153
|
price: { input: 0.5, cacheRead: 0.5, output: 1.5 },
|
|
154
|
+
reasoning: { level: "medium", adjustable: false },
|
|
134
155
|
},
|
|
135
156
|
{
|
|
136
157
|
model: "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct",
|
|
137
158
|
name: "Llama 4 Scout",
|
|
138
159
|
context: 131_000,
|
|
139
160
|
price: { input: 0.27, cacheRead: 0.27, output: 0.85 },
|
|
161
|
+
reasoning: { level: "off", adjustable: false },
|
|
140
162
|
},
|
|
141
163
|
{
|
|
142
164
|
model: "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct",
|
|
143
165
|
name: "Mistral Small 3.1",
|
|
144
166
|
context: 128_000,
|
|
145
167
|
price: { input: 0.351, cacheRead: 0.351, output: 0.555 },
|
|
168
|
+
reasoning: { level: "off", adjustable: false },
|
|
146
169
|
},
|
|
147
170
|
{
|
|
148
171
|
model: "openai/gpt-6.1-terra",
|
|
149
172
|
name: "GPT-6.1 Terra",
|
|
150
173
|
context: 1_050_000,
|
|
151
174
|
price: { input: 1, cacheRead: 0.05, cacheWrite: 1.25, output: 5 },
|
|
175
|
+
reasoning: { level: "off", adjustable: false },
|
|
152
176
|
outputLimit: "max_completion_tokens",
|
|
153
177
|
reasoningEffort: "none",
|
|
154
178
|
},
|
|
@@ -157,6 +181,7 @@ export const gatewayCatalog = [
|
|
|
157
181
|
name: "GPT-6 Luna",
|
|
158
182
|
context: 1_050_000,
|
|
159
183
|
price: { input: 0.1, cacheRead: 0.01, cacheWrite: 0.125, output: 0.5 },
|
|
184
|
+
reasoning: { level: "off", adjustable: false },
|
|
160
185
|
outputLimit: "max_completion_tokens",
|
|
161
186
|
reasoningEffort: "none",
|
|
162
187
|
},
|
|
@@ -189,10 +214,29 @@ export function outputLimitOf(model) {
|
|
|
189
214
|
const entry = gatewayModelOf(model);
|
|
190
215
|
return entry && "outputLimit" in entry ? entry.outputLimit : "max_tokens";
|
|
191
216
|
}
|
|
192
|
-
// The
|
|
193
|
-
|
|
217
|
+
// The stage an Operator of the kind Gateway thinks at (E249, #1139): `default` sends nothing, so the
|
|
218
|
+
// model thinks as the catalog's `level` says; every other stage goes to the model.
|
|
219
|
+
export const ReasoningLevel = z.enum(["off", "low", "medium", "high"]);
|
|
220
|
+
export const ReasoningStage = z.enum(["default", ...ReasoningLevel.options]);
|
|
221
|
+
export const reasoningDefault = "default";
|
|
222
|
+
// A model's thinking in the catalog, or null for a model outside it.
|
|
223
|
+
export function reasoningOfModel(model) {
|
|
224
|
+
return gatewayModelOf(model)?.reasoning ?? null;
|
|
225
|
+
}
|
|
226
|
+
// Whether an Operator on this model may take a stage other than `default`.
|
|
227
|
+
export function reasoningAdjustable(model) {
|
|
228
|
+
return reasoningOfModel(model)?.adjustable ?? false;
|
|
229
|
+
}
|
|
230
|
+
export function reasoningEffortOf(model, stage) {
|
|
194
231
|
const entry = gatewayModelOf(model);
|
|
195
|
-
|
|
232
|
+
if (!entry)
|
|
233
|
+
return null;
|
|
234
|
+
if (!entry.reasoning.adjustable) {
|
|
235
|
+
return "reasoningEffort" in entry ? entry.reasoningEffort : null;
|
|
236
|
+
}
|
|
237
|
+
if (stage === "default")
|
|
238
|
+
return null;
|
|
239
|
+
return stage === "off" ? "none" : stage;
|
|
196
240
|
}
|
|
197
241
|
// A cache write at its own price where the catalog names one, else at the input's.
|
|
198
242
|
export function cacheWritePriceOf(entry) {
|
|
@@ -212,6 +256,7 @@ export const GatewayModelEntrySchema = z.object({
|
|
|
212
256
|
}),
|
|
213
257
|
outputLimit: z.enum(["max_tokens", "max_completion_tokens"]).optional(),
|
|
214
258
|
reasoningEffort: z.literal("none").optional(),
|
|
259
|
+
reasoning: z.object({ level: ReasoningLevel, adjustable: z.boolean() }),
|
|
215
260
|
});
|
|
216
261
|
// The catalog (Einstellungen › Operator › Katalog), two kinds (E210):
|
|
217
262
|
// - `claude`: Claude Code in a container, with the sign-in of a subscription or an API key. Its
|
|
@@ -655,6 +700,8 @@ export const OperatorMachineUpdateInput = z
|
|
|
655
700
|
rev: Rev.describe("The revision of the Operator this change is based on, as the last read returned it. If someone saved it in between, the call answers conflict, changes nothing and names under current what stands now: decide, and send it again with that rev."),
|
|
656
701
|
credentialId: CredentialId.optional(),
|
|
657
702
|
model: OperatorModel.optional(),
|
|
703
|
+
// The stage of thinking (E249, #1139); only a model of the kind Gateway whose path takes one.
|
|
704
|
+
reasoning: ReasoningStage.optional(),
|
|
658
705
|
subagents: Subagents.optional(),
|
|
659
706
|
trigger: ChangeTrigger.optional(),
|
|
660
707
|
limits: OperatorLimits.partial().optional(),
|
|
@@ -689,6 +736,8 @@ export const Operator = z.object({
|
|
|
689
736
|
// company's, whose Actions its page does not count.
|
|
690
737
|
open: z.int().min(0).nullable(),
|
|
691
738
|
model: OperatorModel,
|
|
739
|
+
// The stage of thinking (E249, #1139); `default` for every Operator that never set one.
|
|
740
|
+
reasoning: ReasoningStage,
|
|
692
741
|
subagents: Subagents,
|
|
693
742
|
trigger: Trigger,
|
|
694
743
|
limits: OperatorLimits,
|