smoltalk 0.4.0 → 0.4.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/dist/clients/anthropic.d.ts +7 -0
- package/dist/clients/anthropic.js +58 -19
- package/dist/models.d.ts +46 -24
- package/dist/models.js +18 -12
- package/package.json +1 -1
|
@@ -12,6 +12,13 @@ export declare class SmolAnthropic extends BaseClient implements SmolClient {
|
|
|
12
12
|
getModel(): ModelName;
|
|
13
13
|
private calculateUsageAndCost;
|
|
14
14
|
private buildRequest;
|
|
15
|
+
/**
|
|
16
|
+
* Translate `thinking` / `reasoningEffort` into the correct Anthropic
|
|
17
|
+
* parameters for this model. Callers shouldn't have to know whether a model
|
|
18
|
+
* speaks the legacy `budget_tokens` API or the newer adaptive + effort API —
|
|
19
|
+
* that's exactly the vendor difference this package smooths over.
|
|
20
|
+
*/
|
|
21
|
+
private resolveThinking;
|
|
15
22
|
private rethrowAsSmolError;
|
|
16
23
|
_textSync(config: SmolConfig): Promise<Result<PromptResult>>;
|
|
17
24
|
_textStream(config: SmolConfig): AsyncGenerator<StreamChunk>;
|
|
@@ -6,8 +6,22 @@ import { success, } from "../types.js";
|
|
|
6
6
|
import { zodToAnthropicTool } from "../util/tool.js";
|
|
7
7
|
import { SmolContentPolicyError, SmolContextWindowExceededError, } from "../smolError.js";
|
|
8
8
|
import { BaseClient } from "./baseClient.js";
|
|
9
|
+
import { getModel, isTextModel } from "../models.js";
|
|
9
10
|
import { Model } from "../model.js";
|
|
10
11
|
const DEFAULT_MAX_TOKENS = 4096;
|
|
12
|
+
/**
|
|
13
|
+
* Which thinking API a model speaks. New flagship Anthropic models (Opus 4.7+)
|
|
14
|
+
* reject the legacy `{type: "enabled", budget_tokens}` form with a 400, so we
|
|
15
|
+
* default unknown/unregistered models to "adaptive" (the forward-looking shape)
|
|
16
|
+
* rather than the form that's being phased out.
|
|
17
|
+
*/
|
|
18
|
+
function thinkingStyleFor(modelName) {
|
|
19
|
+
const model = getModel(modelName);
|
|
20
|
+
if (model && isTextModel(model) && model.reasoning?.thinkingStyle) {
|
|
21
|
+
return model.reasoning.thinkingStyle;
|
|
22
|
+
}
|
|
23
|
+
return "adaptive";
|
|
24
|
+
}
|
|
11
25
|
/**
|
|
12
26
|
* Attach ephemeral cache_control breakpoints to (up to) three places:
|
|
13
27
|
* 1. the last tool definition
|
|
@@ -152,28 +166,49 @@ export class SmolAnthropic extends BaseClient {
|
|
|
152
166
|
description: tool.description,
|
|
153
167
|
}))
|
|
154
168
|
: undefined;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
};
|
|
160
|
-
const thinking = config.thinking?.enabled
|
|
161
|
-
? {
|
|
162
|
-
type: "enabled",
|
|
163
|
-
budget_tokens: config.thinking.budgetTokens ?? 5000,
|
|
164
|
-
}
|
|
165
|
-
: config.reasoningEffort
|
|
166
|
-
? {
|
|
167
|
-
type: "enabled",
|
|
168
|
-
budget_tokens: reasoningBudgetMap[config.reasoningEffort],
|
|
169
|
-
}
|
|
170
|
-
: undefined;
|
|
169
|
+
// Normalize the user's provider-agnostic thinking/effort config into the
|
|
170
|
+
// shape this specific model accepts. Both `thinking.enabled` and
|
|
171
|
+
// `reasoningEffort` are treated as a request to think.
|
|
172
|
+
const { thinking, outputConfig } = this.resolveThinking(config);
|
|
171
173
|
const cachingEnabled = config.caching?.enabled !== false;
|
|
172
174
|
const baseRequest = { system, messages: anthropicMessages, tools };
|
|
173
175
|
const finalRequest = cachingEnabled
|
|
174
176
|
? applyCacheBreakpoints(baseRequest)
|
|
175
177
|
: baseRequest;
|
|
176
|
-
return { ...finalRequest, thinking };
|
|
178
|
+
return { ...finalRequest, thinking, outputConfig };
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Translate `thinking` / `reasoningEffort` into the correct Anthropic
|
|
182
|
+
* parameters for this model. Callers shouldn't have to know whether a model
|
|
183
|
+
* speaks the legacy `budget_tokens` API or the newer adaptive + effort API —
|
|
184
|
+
* that's exactly the vendor difference this package smooths over.
|
|
185
|
+
*/
|
|
186
|
+
resolveThinking(config) {
|
|
187
|
+
const wantsThinking = config.thinking?.enabled === true;
|
|
188
|
+
const effort = config.reasoningEffort;
|
|
189
|
+
if (!wantsThinking && !effort) {
|
|
190
|
+
return { thinking: undefined, outputConfig: undefined };
|
|
191
|
+
}
|
|
192
|
+
if (thinkingStyleFor(this.getModel()) === "adaptive") {
|
|
193
|
+
// `output_config.effort` controls depth; the budget is irrelevant here.
|
|
194
|
+
return {
|
|
195
|
+
thinking: { type: "adaptive" },
|
|
196
|
+
outputConfig: effort ? { effort } : undefined,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
// Legacy budget-based thinking (Haiku 4.5 and older models).
|
|
200
|
+
const reasoningBudgetMap = {
|
|
201
|
+
low: 2048,
|
|
202
|
+
medium: 5000,
|
|
203
|
+
high: 10000,
|
|
204
|
+
};
|
|
205
|
+
const budget_tokens = wantsThinking
|
|
206
|
+
? (config.thinking?.budgetTokens ?? 5000)
|
|
207
|
+
: reasoningBudgetMap[effort];
|
|
208
|
+
return {
|
|
209
|
+
thinking: { type: "enabled", budget_tokens },
|
|
210
|
+
outputConfig: undefined,
|
|
211
|
+
};
|
|
177
212
|
}
|
|
178
213
|
rethrowAsSmolError(error) {
|
|
179
214
|
if (error instanceof Anthropic.APIError) {
|
|
@@ -194,7 +229,7 @@ export class SmolAnthropic extends BaseClient {
|
|
|
194
229
|
throw error;
|
|
195
230
|
}
|
|
196
231
|
async _textSync(config) {
|
|
197
|
-
const { system, messages, tools, thinking } = this.buildRequest(config);
|
|
232
|
+
const { system, messages, tools, thinking, outputConfig } = this.buildRequest(config);
|
|
198
233
|
let debugData = {
|
|
199
234
|
model: this.getModel(),
|
|
200
235
|
max_tokens: config.maxTokens ?? DEFAULT_MAX_TOKENS,
|
|
@@ -202,6 +237,7 @@ export class SmolAnthropic extends BaseClient {
|
|
|
202
237
|
system,
|
|
203
238
|
tools,
|
|
204
239
|
thinking,
|
|
240
|
+
output_config: outputConfig,
|
|
205
241
|
};
|
|
206
242
|
this.logger.debug("Sending request to Anthropic:", debugData);
|
|
207
243
|
this.statelogClient?.promptRequest(debugData);
|
|
@@ -215,6 +251,7 @@ export class SmolAnthropic extends BaseClient {
|
|
|
215
251
|
...(system && { system }),
|
|
216
252
|
...(tools && { tools }),
|
|
217
253
|
...(thinking && { thinking }),
|
|
254
|
+
...(outputConfig && { output_config: outputConfig }),
|
|
218
255
|
...(config.temperature !== undefined && {
|
|
219
256
|
temperature: config.temperature,
|
|
220
257
|
}),
|
|
@@ -253,7 +290,7 @@ export class SmolAnthropic extends BaseClient {
|
|
|
253
290
|
});
|
|
254
291
|
}
|
|
255
292
|
async *_textStream(config) {
|
|
256
|
-
const { system, messages, tools, thinking } = this.buildRequest(config);
|
|
293
|
+
const { system, messages, tools, thinking, outputConfig } = this.buildRequest(config);
|
|
257
294
|
const streamDebugData = {
|
|
258
295
|
model: this.model,
|
|
259
296
|
max_tokens: config.maxTokens ?? DEFAULT_MAX_TOKENS,
|
|
@@ -261,6 +298,7 @@ export class SmolAnthropic extends BaseClient {
|
|
|
261
298
|
system,
|
|
262
299
|
tools,
|
|
263
300
|
thinking,
|
|
301
|
+
output_config: outputConfig,
|
|
264
302
|
};
|
|
265
303
|
this.logger.debug("Sending streaming request to Anthropic:", streamDebugData);
|
|
266
304
|
this.statelogClient?.promptRequest(streamDebugData);
|
|
@@ -274,6 +312,7 @@ export class SmolAnthropic extends BaseClient {
|
|
|
274
312
|
...(system && { system }),
|
|
275
313
|
...(tools && { tools }),
|
|
276
314
|
...(thinking && { thinking }),
|
|
315
|
+
...(outputConfig && { output_config: outputConfig }),
|
|
277
316
|
...(config.temperature !== undefined && {
|
|
278
317
|
temperature: config.temperature,
|
|
279
318
|
}),
|
package/dist/models.d.ts
CHANGED
|
@@ -42,6 +42,16 @@ export type TextModel = BaseModel & {
|
|
|
42
42
|
levels?: readonly string[];
|
|
43
43
|
/** Default reasoning level */
|
|
44
44
|
defaultLevel?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Anthropic thinking API shape:
|
|
47
|
+
* "adaptive" → `thinking: {type: "adaptive"}` + `output_config: {effort}`
|
|
48
|
+
* (Opus 4.6/4.7/4.8, Sonnet 4.6). Required on 4.7+, where the
|
|
49
|
+
* legacy `enabled` form returns a 400.
|
|
50
|
+
* "budget" → `thinking: {type: "enabled", budget_tokens: N}`
|
|
51
|
+
* (Haiku 4.5 and older models).
|
|
52
|
+
* Omit for non-Anthropic models.
|
|
53
|
+
*/
|
|
54
|
+
thinkingStyle?: "adaptive" | "budget";
|
|
45
55
|
/** Whether reasoning/thinking can be fully disabled */
|
|
46
56
|
canDisable?: boolean;
|
|
47
57
|
/** Whether the response includes visible thinking content (thinking blocks/parts) */
|
|
@@ -251,7 +261,7 @@ export declare const textModels: readonly [{
|
|
|
251
261
|
readonly outputsThinking: false;
|
|
252
262
|
readonly outputsSignatures: false;
|
|
253
263
|
};
|
|
254
|
-
readonly provider: "openai";
|
|
264
|
+
readonly provider: "openai-responses";
|
|
255
265
|
}, {
|
|
256
266
|
readonly type: "text";
|
|
257
267
|
readonly modelName: "gpt-5-mini";
|
|
@@ -269,7 +279,7 @@ export declare const textModels: readonly [{
|
|
|
269
279
|
readonly outputsThinking: false;
|
|
270
280
|
readonly outputsSignatures: false;
|
|
271
281
|
};
|
|
272
|
-
readonly provider: "openai";
|
|
282
|
+
readonly provider: "openai-responses";
|
|
273
283
|
}, {
|
|
274
284
|
readonly type: "text";
|
|
275
285
|
readonly modelName: "gpt-5-nano";
|
|
@@ -287,7 +297,7 @@ export declare const textModels: readonly [{
|
|
|
287
297
|
readonly outputsThinking: false;
|
|
288
298
|
readonly outputsSignatures: false;
|
|
289
299
|
};
|
|
290
|
-
readonly provider: "openai";
|
|
300
|
+
readonly provider: "openai-responses";
|
|
291
301
|
}, {
|
|
292
302
|
readonly type: "text";
|
|
293
303
|
readonly modelName: "gpt-5.1";
|
|
@@ -304,7 +314,7 @@ export declare const textModels: readonly [{
|
|
|
304
314
|
readonly outputsThinking: false;
|
|
305
315
|
readonly outputsSignatures: false;
|
|
306
316
|
};
|
|
307
|
-
readonly provider: "openai";
|
|
317
|
+
readonly provider: "openai-responses";
|
|
308
318
|
}, {
|
|
309
319
|
readonly type: "text";
|
|
310
320
|
readonly modelName: "gpt-5.2";
|
|
@@ -322,7 +332,7 @@ export declare const textModels: readonly [{
|
|
|
322
332
|
readonly outputsThinking: false;
|
|
323
333
|
readonly outputsSignatures: false;
|
|
324
334
|
};
|
|
325
|
-
readonly provider: "openai";
|
|
335
|
+
readonly provider: "openai-responses";
|
|
326
336
|
}, {
|
|
327
337
|
readonly type: "text";
|
|
328
338
|
readonly modelName: "gpt-5.2-pro";
|
|
@@ -336,7 +346,7 @@ export declare const textModels: readonly [{
|
|
|
336
346
|
readonly outputsThinking: false;
|
|
337
347
|
readonly outputsSignatures: false;
|
|
338
348
|
};
|
|
339
|
-
readonly provider: "openai";
|
|
349
|
+
readonly provider: "openai-responses";
|
|
340
350
|
}, {
|
|
341
351
|
readonly type: "text";
|
|
342
352
|
readonly modelName: "gpt-5.4";
|
|
@@ -353,7 +363,7 @@ export declare const textModels: readonly [{
|
|
|
353
363
|
readonly outputsThinking: false;
|
|
354
364
|
readonly outputsSignatures: false;
|
|
355
365
|
};
|
|
356
|
-
readonly provider: "openai";
|
|
366
|
+
readonly provider: "openai-responses";
|
|
357
367
|
}, {
|
|
358
368
|
readonly type: "text";
|
|
359
369
|
readonly modelName: "gpt-5.4-mini";
|
|
@@ -371,7 +381,7 @@ export declare const textModels: readonly [{
|
|
|
371
381
|
readonly outputsThinking: false;
|
|
372
382
|
readonly outputsSignatures: false;
|
|
373
383
|
};
|
|
374
|
-
readonly provider: "openai";
|
|
384
|
+
readonly provider: "openai-responses";
|
|
375
385
|
}, {
|
|
376
386
|
readonly type: "text";
|
|
377
387
|
readonly modelName: "gpt-5.4-nano";
|
|
@@ -389,7 +399,7 @@ export declare const textModels: readonly [{
|
|
|
389
399
|
readonly outputsThinking: false;
|
|
390
400
|
readonly outputsSignatures: false;
|
|
391
401
|
};
|
|
392
|
-
readonly provider: "openai";
|
|
402
|
+
readonly provider: "openai-responses";
|
|
393
403
|
}, {
|
|
394
404
|
readonly type: "text";
|
|
395
405
|
readonly modelName: "gpt-5.4-pro";
|
|
@@ -405,7 +415,7 @@ export declare const textModels: readonly [{
|
|
|
405
415
|
readonly outputsThinking: false;
|
|
406
416
|
readonly outputsSignatures: false;
|
|
407
417
|
};
|
|
408
|
-
readonly provider: "openai";
|
|
418
|
+
readonly provider: "openai-responses";
|
|
409
419
|
}, {
|
|
410
420
|
readonly type: "text";
|
|
411
421
|
readonly modelName: "gpt-5.5";
|
|
@@ -423,7 +433,7 @@ export declare const textModels: readonly [{
|
|
|
423
433
|
readonly outputsThinking: false;
|
|
424
434
|
readonly outputsSignatures: false;
|
|
425
435
|
};
|
|
426
|
-
readonly provider: "openai";
|
|
436
|
+
readonly provider: "openai-responses";
|
|
427
437
|
}, {
|
|
428
438
|
readonly type: "text";
|
|
429
439
|
readonly modelName: "gpt-5.5-pro";
|
|
@@ -439,7 +449,7 @@ export declare const textModels: readonly [{
|
|
|
439
449
|
readonly outputsThinking: false;
|
|
440
450
|
readonly outputsSignatures: false;
|
|
441
451
|
};
|
|
442
|
-
readonly provider: "openai";
|
|
452
|
+
readonly provider: "openai-responses";
|
|
443
453
|
}, {
|
|
444
454
|
readonly type: "text";
|
|
445
455
|
readonly modelName: "gemini-3.1-pro-preview";
|
|
@@ -652,6 +662,7 @@ export declare const textModels: readonly [{
|
|
|
652
662
|
readonly cachedInputTokenCost: 0.5;
|
|
653
663
|
readonly outputTokenCost: 25;
|
|
654
664
|
readonly reasoning: {
|
|
665
|
+
readonly thinkingStyle: "adaptive";
|
|
655
666
|
readonly canDisable: false;
|
|
656
667
|
readonly outputsThinking: true;
|
|
657
668
|
readonly outputsSignatures: true;
|
|
@@ -669,6 +680,7 @@ export declare const textModels: readonly [{
|
|
|
669
680
|
readonly outputTokenCost: 25;
|
|
670
681
|
readonly outputTokensPerSecond: 72;
|
|
671
682
|
readonly reasoning: {
|
|
683
|
+
readonly thinkingStyle: "adaptive";
|
|
672
684
|
readonly canDisable: false;
|
|
673
685
|
readonly outputsThinking: true;
|
|
674
686
|
readonly outputsSignatures: true;
|
|
@@ -686,6 +698,7 @@ export declare const textModels: readonly [{
|
|
|
686
698
|
readonly outputTokenCost: 25;
|
|
687
699
|
readonly outputTokensPerSecond: 53;
|
|
688
700
|
readonly reasoning: {
|
|
701
|
+
readonly thinkingStyle: "adaptive";
|
|
689
702
|
readonly canDisable: true;
|
|
690
703
|
readonly outputsThinking: true;
|
|
691
704
|
readonly outputsSignatures: true;
|
|
@@ -703,6 +716,7 @@ export declare const textModels: readonly [{
|
|
|
703
716
|
readonly outputTokenCost: 15;
|
|
704
717
|
readonly outputTokensPerSecond: 52;
|
|
705
718
|
readonly reasoning: {
|
|
719
|
+
readonly thinkingStyle: "adaptive";
|
|
706
720
|
readonly canDisable: true;
|
|
707
721
|
readonly outputsThinking: true;
|
|
708
722
|
readonly outputsSignatures: true;
|
|
@@ -720,6 +734,7 @@ export declare const textModels: readonly [{
|
|
|
720
734
|
readonly outputTokenCost: 5;
|
|
721
735
|
readonly outputTokensPerSecond: 97;
|
|
722
736
|
readonly reasoning: {
|
|
737
|
+
readonly thinkingStyle: "budget";
|
|
723
738
|
readonly canDisable: true;
|
|
724
739
|
readonly outputsThinking: true;
|
|
725
740
|
readonly outputsSignatures: true;
|
|
@@ -735,6 +750,7 @@ export declare const textModels: readonly [{
|
|
|
735
750
|
readonly outputTokenCost: 15;
|
|
736
751
|
readonly outputTokensPerSecond: 78;
|
|
737
752
|
readonly reasoning: {
|
|
753
|
+
readonly thinkingStyle: "budget";
|
|
738
754
|
readonly canDisable: true;
|
|
739
755
|
readonly outputsThinking: true;
|
|
740
756
|
readonly outputsSignatures: true;
|
|
@@ -997,7 +1013,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
997
1013
|
readonly outputsThinking: false;
|
|
998
1014
|
readonly outputsSignatures: false;
|
|
999
1015
|
};
|
|
1000
|
-
readonly provider: "openai";
|
|
1016
|
+
readonly provider: "openai-responses";
|
|
1001
1017
|
} | {
|
|
1002
1018
|
readonly type: "text";
|
|
1003
1019
|
readonly modelName: "gpt-5-mini";
|
|
@@ -1015,7 +1031,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1015
1031
|
readonly outputsThinking: false;
|
|
1016
1032
|
readonly outputsSignatures: false;
|
|
1017
1033
|
};
|
|
1018
|
-
readonly provider: "openai";
|
|
1034
|
+
readonly provider: "openai-responses";
|
|
1019
1035
|
} | {
|
|
1020
1036
|
readonly type: "text";
|
|
1021
1037
|
readonly modelName: "gpt-5-nano";
|
|
@@ -1033,7 +1049,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1033
1049
|
readonly outputsThinking: false;
|
|
1034
1050
|
readonly outputsSignatures: false;
|
|
1035
1051
|
};
|
|
1036
|
-
readonly provider: "openai";
|
|
1052
|
+
readonly provider: "openai-responses";
|
|
1037
1053
|
} | {
|
|
1038
1054
|
readonly type: "text";
|
|
1039
1055
|
readonly modelName: "gpt-5.1";
|
|
@@ -1050,7 +1066,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1050
1066
|
readonly outputsThinking: false;
|
|
1051
1067
|
readonly outputsSignatures: false;
|
|
1052
1068
|
};
|
|
1053
|
-
readonly provider: "openai";
|
|
1069
|
+
readonly provider: "openai-responses";
|
|
1054
1070
|
} | {
|
|
1055
1071
|
readonly type: "text";
|
|
1056
1072
|
readonly modelName: "gpt-5.2";
|
|
@@ -1068,7 +1084,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1068
1084
|
readonly outputsThinking: false;
|
|
1069
1085
|
readonly outputsSignatures: false;
|
|
1070
1086
|
};
|
|
1071
|
-
readonly provider: "openai";
|
|
1087
|
+
readonly provider: "openai-responses";
|
|
1072
1088
|
} | {
|
|
1073
1089
|
readonly type: "text";
|
|
1074
1090
|
readonly modelName: "gpt-5.2-pro";
|
|
@@ -1082,7 +1098,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1082
1098
|
readonly outputsThinking: false;
|
|
1083
1099
|
readonly outputsSignatures: false;
|
|
1084
1100
|
};
|
|
1085
|
-
readonly provider: "openai";
|
|
1101
|
+
readonly provider: "openai-responses";
|
|
1086
1102
|
} | {
|
|
1087
1103
|
readonly type: "text";
|
|
1088
1104
|
readonly modelName: "gpt-5.4";
|
|
@@ -1099,7 +1115,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1099
1115
|
readonly outputsThinking: false;
|
|
1100
1116
|
readonly outputsSignatures: false;
|
|
1101
1117
|
};
|
|
1102
|
-
readonly provider: "openai";
|
|
1118
|
+
readonly provider: "openai-responses";
|
|
1103
1119
|
} | {
|
|
1104
1120
|
readonly type: "text";
|
|
1105
1121
|
readonly modelName: "gpt-5.4-mini";
|
|
@@ -1117,7 +1133,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1117
1133
|
readonly outputsThinking: false;
|
|
1118
1134
|
readonly outputsSignatures: false;
|
|
1119
1135
|
};
|
|
1120
|
-
readonly provider: "openai";
|
|
1136
|
+
readonly provider: "openai-responses";
|
|
1121
1137
|
} | {
|
|
1122
1138
|
readonly type: "text";
|
|
1123
1139
|
readonly modelName: "gpt-5.4-nano";
|
|
@@ -1135,7 +1151,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1135
1151
|
readonly outputsThinking: false;
|
|
1136
1152
|
readonly outputsSignatures: false;
|
|
1137
1153
|
};
|
|
1138
|
-
readonly provider: "openai";
|
|
1154
|
+
readonly provider: "openai-responses";
|
|
1139
1155
|
} | {
|
|
1140
1156
|
readonly type: "text";
|
|
1141
1157
|
readonly modelName: "gpt-5.4-pro";
|
|
@@ -1151,7 +1167,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1151
1167
|
readonly outputsThinking: false;
|
|
1152
1168
|
readonly outputsSignatures: false;
|
|
1153
1169
|
};
|
|
1154
|
-
readonly provider: "openai";
|
|
1170
|
+
readonly provider: "openai-responses";
|
|
1155
1171
|
} | {
|
|
1156
1172
|
readonly type: "text";
|
|
1157
1173
|
readonly modelName: "gpt-5.5";
|
|
@@ -1169,7 +1185,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1169
1185
|
readonly outputsThinking: false;
|
|
1170
1186
|
readonly outputsSignatures: false;
|
|
1171
1187
|
};
|
|
1172
|
-
readonly provider: "openai";
|
|
1188
|
+
readonly provider: "openai-responses";
|
|
1173
1189
|
} | {
|
|
1174
1190
|
readonly type: "text";
|
|
1175
1191
|
readonly modelName: "gpt-5.5-pro";
|
|
@@ -1185,7 +1201,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1185
1201
|
readonly outputsThinking: false;
|
|
1186
1202
|
readonly outputsSignatures: false;
|
|
1187
1203
|
};
|
|
1188
|
-
readonly provider: "openai";
|
|
1204
|
+
readonly provider: "openai-responses";
|
|
1189
1205
|
} | {
|
|
1190
1206
|
readonly type: "text";
|
|
1191
1207
|
readonly modelName: "gemini-3.1-pro-preview";
|
|
@@ -1398,6 +1414,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1398
1414
|
readonly cachedInputTokenCost: 0.5;
|
|
1399
1415
|
readonly outputTokenCost: 25;
|
|
1400
1416
|
readonly reasoning: {
|
|
1417
|
+
readonly thinkingStyle: "adaptive";
|
|
1401
1418
|
readonly canDisable: false;
|
|
1402
1419
|
readonly outputsThinking: true;
|
|
1403
1420
|
readonly outputsSignatures: true;
|
|
@@ -1415,6 +1432,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1415
1432
|
readonly outputTokenCost: 25;
|
|
1416
1433
|
readonly outputTokensPerSecond: 72;
|
|
1417
1434
|
readonly reasoning: {
|
|
1435
|
+
readonly thinkingStyle: "adaptive";
|
|
1418
1436
|
readonly canDisable: false;
|
|
1419
1437
|
readonly outputsThinking: true;
|
|
1420
1438
|
readonly outputsSignatures: true;
|
|
@@ -1432,6 +1450,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1432
1450
|
readonly outputTokenCost: 25;
|
|
1433
1451
|
readonly outputTokensPerSecond: 53;
|
|
1434
1452
|
readonly reasoning: {
|
|
1453
|
+
readonly thinkingStyle: "adaptive";
|
|
1435
1454
|
readonly canDisable: true;
|
|
1436
1455
|
readonly outputsThinking: true;
|
|
1437
1456
|
readonly outputsSignatures: true;
|
|
@@ -1449,6 +1468,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1449
1468
|
readonly outputTokenCost: 15;
|
|
1450
1469
|
readonly outputTokensPerSecond: 52;
|
|
1451
1470
|
readonly reasoning: {
|
|
1471
|
+
readonly thinkingStyle: "adaptive";
|
|
1452
1472
|
readonly canDisable: true;
|
|
1453
1473
|
readonly outputsThinking: true;
|
|
1454
1474
|
readonly outputsSignatures: true;
|
|
@@ -1466,6 +1486,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1466
1486
|
readonly outputTokenCost: 5;
|
|
1467
1487
|
readonly outputTokensPerSecond: 97;
|
|
1468
1488
|
readonly reasoning: {
|
|
1489
|
+
readonly thinkingStyle: "budget";
|
|
1469
1490
|
readonly canDisable: true;
|
|
1470
1491
|
readonly outputsThinking: true;
|
|
1471
1492
|
readonly outputsSignatures: true;
|
|
@@ -1481,6 +1502,7 @@ export declare function getModel(modelName: ModelName): TextModel | EmbeddingsMo
|
|
|
1481
1502
|
readonly outputTokenCost: 15;
|
|
1482
1503
|
readonly outputTokensPerSecond: 78;
|
|
1483
1504
|
readonly reasoning: {
|
|
1505
|
+
readonly thinkingStyle: "budget";
|
|
1484
1506
|
readonly canDisable: true;
|
|
1485
1507
|
readonly outputsThinking: true;
|
|
1486
1508
|
readonly outputsSignatures: true;
|
package/dist/models.js
CHANGED
|
@@ -229,7 +229,7 @@ export const textModels = [
|
|
|
229
229
|
outputsThinking: false,
|
|
230
230
|
outputsSignatures: false,
|
|
231
231
|
},
|
|
232
|
-
provider: "openai",
|
|
232
|
+
provider: "openai-responses",
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
235
|
type: "text",
|
|
@@ -248,7 +248,7 @@ export const textModels = [
|
|
|
248
248
|
outputsThinking: false,
|
|
249
249
|
outputsSignatures: false,
|
|
250
250
|
},
|
|
251
|
-
provider: "openai",
|
|
251
|
+
provider: "openai-responses",
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
type: "text",
|
|
@@ -267,7 +267,7 @@ export const textModels = [
|
|
|
267
267
|
outputsThinking: false,
|
|
268
268
|
outputsSignatures: false,
|
|
269
269
|
},
|
|
270
|
-
provider: "openai",
|
|
270
|
+
provider: "openai-responses",
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
type: "text",
|
|
@@ -285,7 +285,7 @@ export const textModels = [
|
|
|
285
285
|
outputsThinking: false,
|
|
286
286
|
outputsSignatures: false,
|
|
287
287
|
},
|
|
288
|
-
provider: "openai",
|
|
288
|
+
provider: "openai-responses",
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
type: "text",
|
|
@@ -304,7 +304,7 @@ export const textModels = [
|
|
|
304
304
|
outputsThinking: false,
|
|
305
305
|
outputsSignatures: false,
|
|
306
306
|
},
|
|
307
|
-
provider: "openai",
|
|
307
|
+
provider: "openai-responses",
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
type: "text",
|
|
@@ -319,7 +319,7 @@ export const textModels = [
|
|
|
319
319
|
outputsThinking: false,
|
|
320
320
|
outputsSignatures: false,
|
|
321
321
|
},
|
|
322
|
-
provider: "openai",
|
|
322
|
+
provider: "openai-responses",
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
type: "text",
|
|
@@ -337,7 +337,7 @@ export const textModels = [
|
|
|
337
337
|
outputsThinking: false,
|
|
338
338
|
outputsSignatures: false,
|
|
339
339
|
},
|
|
340
|
-
provider: "openai",
|
|
340
|
+
provider: "openai-responses",
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
type: "text",
|
|
@@ -356,7 +356,7 @@ export const textModels = [
|
|
|
356
356
|
outputsThinking: false,
|
|
357
357
|
outputsSignatures: false,
|
|
358
358
|
},
|
|
359
|
-
provider: "openai",
|
|
359
|
+
provider: "openai-responses",
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
type: "text",
|
|
@@ -375,7 +375,7 @@ export const textModels = [
|
|
|
375
375
|
outputsThinking: false,
|
|
376
376
|
outputsSignatures: false,
|
|
377
377
|
},
|
|
378
|
-
provider: "openai",
|
|
378
|
+
provider: "openai-responses",
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
type: "text",
|
|
@@ -392,7 +392,7 @@ export const textModels = [
|
|
|
392
392
|
outputsThinking: false,
|
|
393
393
|
outputsSignatures: false,
|
|
394
394
|
},
|
|
395
|
-
provider: "openai",
|
|
395
|
+
provider: "openai-responses",
|
|
396
396
|
},
|
|
397
397
|
{
|
|
398
398
|
type: "text",
|
|
@@ -411,7 +411,7 @@ export const textModels = [
|
|
|
411
411
|
outputsThinking: false,
|
|
412
412
|
outputsSignatures: false,
|
|
413
413
|
},
|
|
414
|
-
provider: "openai",
|
|
414
|
+
provider: "openai-responses",
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
417
|
type: "text",
|
|
@@ -428,7 +428,7 @@ export const textModels = [
|
|
|
428
428
|
outputsThinking: false,
|
|
429
429
|
outputsSignatures: false,
|
|
430
430
|
},
|
|
431
|
-
provider: "openai",
|
|
431
|
+
provider: "openai-responses",
|
|
432
432
|
},
|
|
433
433
|
{
|
|
434
434
|
type: "text",
|
|
@@ -657,6 +657,7 @@ export const textModels = [
|
|
|
657
657
|
cachedInputTokenCost: 0.5,
|
|
658
658
|
outputTokenCost: 25,
|
|
659
659
|
reasoning: {
|
|
660
|
+
thinkingStyle: "adaptive",
|
|
660
661
|
canDisable: false,
|
|
661
662
|
outputsThinking: true,
|
|
662
663
|
outputsSignatures: true,
|
|
@@ -675,6 +676,7 @@ export const textModels = [
|
|
|
675
676
|
outputTokenCost: 25,
|
|
676
677
|
outputTokensPerSecond: 72,
|
|
677
678
|
reasoning: {
|
|
679
|
+
thinkingStyle: "adaptive",
|
|
678
680
|
canDisable: false,
|
|
679
681
|
outputsThinking: true,
|
|
680
682
|
outputsSignatures: true,
|
|
@@ -693,6 +695,7 @@ export const textModels = [
|
|
|
693
695
|
outputTokenCost: 25,
|
|
694
696
|
outputTokensPerSecond: 53,
|
|
695
697
|
reasoning: {
|
|
698
|
+
thinkingStyle: "adaptive",
|
|
696
699
|
canDisable: true,
|
|
697
700
|
outputsThinking: true,
|
|
698
701
|
outputsSignatures: true,
|
|
@@ -711,6 +714,7 @@ export const textModels = [
|
|
|
711
714
|
outputTokenCost: 15,
|
|
712
715
|
outputTokensPerSecond: 52,
|
|
713
716
|
reasoning: {
|
|
717
|
+
thinkingStyle: "adaptive",
|
|
714
718
|
canDisable: true,
|
|
715
719
|
outputsThinking: true,
|
|
716
720
|
outputsSignatures: true,
|
|
@@ -729,6 +733,7 @@ export const textModels = [
|
|
|
729
733
|
outputTokenCost: 5,
|
|
730
734
|
outputTokensPerSecond: 97,
|
|
731
735
|
reasoning: {
|
|
736
|
+
thinkingStyle: "budget",
|
|
732
737
|
canDisable: true,
|
|
733
738
|
outputsThinking: true,
|
|
734
739
|
outputsSignatures: true,
|
|
@@ -745,6 +750,7 @@ export const textModels = [
|
|
|
745
750
|
outputTokenCost: 15,
|
|
746
751
|
outputTokensPerSecond: 78,
|
|
747
752
|
reasoning: {
|
|
753
|
+
thinkingStyle: "budget",
|
|
748
754
|
canDisable: true,
|
|
749
755
|
outputsThinking: true,
|
|
750
756
|
outputsSignatures: true,
|