@molecule/api-resource-ai-models 1.8.0 → 1.9.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.
- package/README.md +21 -1
- package/dist/models.d.ts +7 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +57 -22
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-09-
|
|
6
|
+
Generated: 2026-09-25T13:04:49.248Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-resource-ai-models
|
|
@@ -188,8 +188,21 @@ interface ModelDefinition {
|
|
|
188
188
|
* Provider-specific server tool type for web search (e.g. `'web_search_20250305'`).
|
|
189
189
|
* When set, the chat handler sends this as a ServerTool alongside custom tools.
|
|
190
190
|
* Omit if the model / provider does not support native web search.
|
|
191
|
+
*
|
|
192
|
+
* Set it only when a search actually runs on a Synthase-shaped request
|
|
193
|
+
* (function tools present, streaming) — some providers accept the tool and
|
|
194
|
+
* silently never search in that shape. Requires {@link webSearchPricePer1k}.
|
|
191
195
|
*/
|
|
192
196
|
webSearchToolType?: string
|
|
197
|
+
/**
|
|
198
|
+
* USD per 1,000 web searches the provider bills on top of tokens, applied to
|
|
199
|
+
* `TokenUsage.webSearchRequests`. Required whenever `webSearchToolType` is
|
|
200
|
+
* set (enforced by the catalog tests) — a search tool with no price is
|
|
201
|
+
* unmetered spend. Search-result tokens are billed as ordinary input tokens
|
|
202
|
+
* and need nothing here. Free monthly allowances are account-wide, not
|
|
203
|
+
* per-user, so they are not modeled: every search is metered at list price.
|
|
204
|
+
*/
|
|
205
|
+
webSearchPricePer1k?: number
|
|
193
206
|
/**
|
|
194
207
|
* Provider-specific server tool type for code execution (e.g. `'code_execution_20250825'`).
|
|
195
208
|
* Omit if the model / provider does not support native code execution.
|
|
@@ -830,6 +843,13 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
|
|
|
830
843
|
2026-07-30 GPT-5.6 repricing — cross-check prices against models.dev with
|
|
831
844
|
`npm run check:model-freshness` from the workspace root):
|
|
832
845
|
|
|
846
|
+
- Web search (`webSearchPricePer1k`, billed per search on top of tokens;
|
|
847
|
+
verified 2026-09-25 on each provider's pricing page): Anthropic $10 per
|
|
848
|
+
1,000 searches (failed searches are not billed); OpenAI $10 per 1,000
|
|
849
|
+
web_search_call items on reasoning models; Google $14 per 1,000 search
|
|
850
|
+
queries after 5,000/month free, shared across the account, so not
|
|
851
|
+
modeled; Z.ai $0.01 per use, but its search never runs on a Synthase-shaped
|
|
852
|
+
request, so GLM entries carry no webSearchToolType.
|
|
833
853
|
- Anthropic: https://platform.claude.com/docs/en/about-claude/models/overview
|
|
834
854
|
- /docs/en/build-with-claude/effort (fable-5-1 / opus-5-5 / sonnet-5
|
|
835
855
|
current as of 2026-09-23 — see the dated notes below; historically fable-5 / opus-5 / sonnet-5 current;
|
package/dist/models.d.ts
CHANGED
|
@@ -53,6 +53,13 @@ import type { ModelDefinition } from './types.js';
|
|
|
53
53
|
* Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
|
|
54
54
|
* 2026-07-30 GPT-5.6 repricing — cross-check prices against models.dev with
|
|
55
55
|
* `npm run check:model-freshness` from the workspace root):
|
|
56
|
+
* - Web search (`webSearchPricePer1k`, billed per search on top of tokens;
|
|
57
|
+
* verified 2026-09-25 on each provider's pricing page): Anthropic $10 per
|
|
58
|
+
* 1,000 searches (failed searches are not billed); OpenAI $10 per 1,000
|
|
59
|
+
* web_search_call items on reasoning models; Google $14 per 1,000 search
|
|
60
|
+
* queries after 5,000/month free, shared across the account, so not
|
|
61
|
+
* modeled; Z.ai $0.01 per use, but its search never runs on a Synthase-shaped
|
|
62
|
+
* request, so GLM entries carry no webSearchToolType.
|
|
56
63
|
* - Anthropic: https://platform.claude.com/docs/en/about-claude/models/overview
|
|
57
64
|
* + /docs/en/build-with-claude/effort (fable-5-1 / opus-5-5 / sonnet-5
|
|
58
65
|
* current as of 2026-09-23 — see the dated notes below; historically fable-5 / opus-5 / sonnet-5 current;
|
package/dist/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAwDjD
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAwDjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2QG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAimEnC,CAAA"}
|
package/dist/models.js
CHANGED
|
@@ -102,6 +102,13 @@ const CHINA_PUBLIC_HOLIDAYS = [
|
|
|
102
102
|
* Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
|
|
103
103
|
* 2026-07-30 GPT-5.6 repricing — cross-check prices against models.dev with
|
|
104
104
|
* `npm run check:model-freshness` from the workspace root):
|
|
105
|
+
* - Web search (`webSearchPricePer1k`, billed per search on top of tokens;
|
|
106
|
+
* verified 2026-09-25 on each provider's pricing page): Anthropic $10 per
|
|
107
|
+
* 1,000 searches (failed searches are not billed); OpenAI $10 per 1,000
|
|
108
|
+
* web_search_call items on reasoning models; Google $14 per 1,000 search
|
|
109
|
+
* queries after 5,000/month free, shared across the account, so not
|
|
110
|
+
* modeled; Z.ai $0.01 per use, but its search never runs on a Synthase-shaped
|
|
111
|
+
* request, so GLM entries carry no webSearchToolType.
|
|
105
112
|
* - Anthropic: https://platform.claude.com/docs/en/about-claude/models/overview
|
|
106
113
|
* + /docs/en/build-with-claude/effort (fable-5-1 / opus-5-5 / sonnet-5
|
|
107
114
|
* current as of 2026-09-23 — see the dated notes below; historically fable-5 / opus-5 / sonnet-5 current;
|
|
@@ -354,6 +361,7 @@ export const MODELS = [
|
|
|
354
361
|
supportsPromptCaching: true,
|
|
355
362
|
supportsTools: true,
|
|
356
363
|
webSearchToolType: 'web_search_20260209',
|
|
364
|
+
webSearchPricePer1k: 10,
|
|
357
365
|
// Dynamic-filtering server tools, same as the rest of the 4.6+ Anthropic
|
|
358
366
|
// fleet. Not currently sent by Synthase beyond webSearchToolType
|
|
359
367
|
// (request-shape.ts forwards only that one).
|
|
@@ -392,6 +400,7 @@ export const MODELS = [
|
|
|
392
400
|
supportsPromptCaching: true,
|
|
393
401
|
supportsTools: true,
|
|
394
402
|
webSearchToolType: 'web_search_20260209',
|
|
403
|
+
webSearchPricePer1k: 10,
|
|
395
404
|
// Current server-tool type per the API reference (verified 2026-08-28);
|
|
396
405
|
// 'code_execution_20250825' was the BETA HEADER date (code-execution-2025-08-25),
|
|
397
406
|
// not a tool type — sending it as one is a 400. Not currently sent by
|
|
@@ -448,6 +457,7 @@ export const MODELS = [
|
|
|
448
457
|
supportsPromptCaching: true,
|
|
449
458
|
supportsTools: true,
|
|
450
459
|
webSearchToolType: 'web_search_20260209',
|
|
460
|
+
webSearchPricePer1k: 10,
|
|
451
461
|
// Same server-tool versions as the rest of the 4.6+ Anthropic fleet. Not
|
|
452
462
|
// currently sent by Synthase beyond webSearchToolType.
|
|
453
463
|
codeExecutionToolType: 'code_execution_20260521',
|
|
@@ -495,6 +505,7 @@ export const MODELS = [
|
|
|
495
505
|
supportsPromptCaching: true,
|
|
496
506
|
supportsTools: true,
|
|
497
507
|
webSearchToolType: 'web_search_20260209',
|
|
508
|
+
webSearchPricePer1k: 10,
|
|
498
509
|
// Current server-tool type per the API reference (verified 2026-08-28);
|
|
499
510
|
// 'code_execution_20250825' was the BETA HEADER date (code-execution-2025-08-25),
|
|
500
511
|
// not a tool type — sending it as one is a 400. Not currently sent by
|
|
@@ -536,6 +547,7 @@ export const MODELS = [
|
|
|
536
547
|
supportsPromptCaching: true,
|
|
537
548
|
supportsTools: true,
|
|
538
549
|
webSearchToolType: 'web_search_20260209',
|
|
550
|
+
webSearchPricePer1k: 10,
|
|
539
551
|
// Current server-tool type per the API reference (verified 2026-08-28);
|
|
540
552
|
// 'code_execution_20250825' was the BETA HEADER date (code-execution-2025-08-25),
|
|
541
553
|
// not a tool type — sending it as one is a 400. Not currently sent by
|
|
@@ -577,6 +589,7 @@ export const MODELS = [
|
|
|
577
589
|
supportsPromptCaching: true,
|
|
578
590
|
supportsTools: true,
|
|
579
591
|
webSearchToolType: 'web_search_20260209',
|
|
592
|
+
webSearchPricePer1k: 10,
|
|
580
593
|
// Current server-tool type per the API reference (verified 2026-08-28);
|
|
581
594
|
// 'code_execution_20250825' was the BETA HEADER date (code-execution-2025-08-25),
|
|
582
595
|
// not a tool type — sending it as one is a 400. Not currently sent by
|
|
@@ -616,6 +629,7 @@ export const MODELS = [
|
|
|
616
629
|
supportsPromptCaching: true,
|
|
617
630
|
supportsTools: true,
|
|
618
631
|
webSearchToolType: 'web_search_20260209',
|
|
632
|
+
webSearchPricePer1k: 10,
|
|
619
633
|
// Current server-tool type per the API reference (verified 2026-08-28);
|
|
620
634
|
// 'code_execution_20250825' was the BETA HEADER date (code-execution-2025-08-25),
|
|
621
635
|
// not a tool type — sending it as one is a 400. Not currently sent by
|
|
@@ -655,6 +669,7 @@ export const MODELS = [
|
|
|
655
669
|
supportsPromptCaching: true,
|
|
656
670
|
supportsTools: true,
|
|
657
671
|
webSearchToolType: 'web_search_20260209',
|
|
672
|
+
webSearchPricePer1k: 10,
|
|
658
673
|
// Current server-tool type per the API reference (verified 2026-08-28);
|
|
659
674
|
// 'code_execution_20250825' was the BETA HEADER date (code-execution-2025-08-25),
|
|
660
675
|
// not a tool type — sending it as one is a 400. Not currently sent by
|
|
@@ -690,6 +705,7 @@ export const MODELS = [
|
|
|
690
705
|
supportsPromptCaching: true,
|
|
691
706
|
supportsTools: true,
|
|
692
707
|
webSearchToolType: 'web_search_20260209',
|
|
708
|
+
webSearchPricePer1k: 10,
|
|
693
709
|
// Current server-tool type per the API reference (verified 2026-08-28);
|
|
694
710
|
// 'code_execution_20250825' was the BETA HEADER date (code-execution-2025-08-25),
|
|
695
711
|
// not a tool type — sending it as one is a 400. Not currently sent by
|
|
@@ -726,6 +742,7 @@ export const MODELS = [
|
|
|
726
742
|
supportsPromptCaching: true,
|
|
727
743
|
supportsTools: true,
|
|
728
744
|
webSearchToolType: 'web_search_20250305',
|
|
745
|
+
webSearchPricePer1k: 10,
|
|
729
746
|
webFetchToolType: 'web_fetch_20250910',
|
|
730
747
|
inputPricePerMTok: 1,
|
|
731
748
|
outputPricePerMTok: 5,
|
|
@@ -787,8 +804,10 @@ export const MODELS = [
|
|
|
787
804
|
supportsVision: true,
|
|
788
805
|
supportsPromptCaching: true,
|
|
789
806
|
supportsTools: true,
|
|
790
|
-
|
|
791
|
-
//
|
|
807
|
+
webSearchToolType: 'web_search',
|
|
808
|
+
// $10 per 1,000 web_search_call items on reasoning models (the bond counts
|
|
809
|
+
// them); search-result tokens bill as input.
|
|
810
|
+
webSearchPricePer1k: 10,
|
|
792
811
|
codeExecutionToolType: 'code_interpreter',
|
|
793
812
|
// Standard tier; >272K band ($20/$75, cached $2, writes $25) not modeled.
|
|
794
813
|
inputPricePerMTok: 10,
|
|
@@ -817,8 +836,8 @@ export const MODELS = [
|
|
|
817
836
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
818
837
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
819
838
|
toolsRequireReasoningOff: true,
|
|
820
|
-
|
|
821
|
-
|
|
839
|
+
webSearchToolType: 'web_search',
|
|
840
|
+
webSearchPricePer1k: 10,
|
|
822
841
|
codeExecutionToolType: 'code_interpreter',
|
|
823
842
|
// Standard tier. A long-context band above 272K prompt tokens reprices the
|
|
824
843
|
// whole request ($4/$15, cached $0.40, cache writes $5) — not modeled, same
|
|
@@ -848,7 +867,8 @@ export const MODELS = [
|
|
|
848
867
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
849
868
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
850
869
|
toolsRequireReasoningOff: true,
|
|
851
|
-
|
|
870
|
+
webSearchToolType: 'web_search',
|
|
871
|
+
webSearchPricePer1k: 10,
|
|
852
872
|
codeExecutionToolType: 'code_interpreter',
|
|
853
873
|
// Standard tier; >272K band ($0.20/$0.75, cached $0.02, writes $0.25) not
|
|
854
874
|
// modeled.
|
|
@@ -879,8 +899,8 @@ export const MODELS = [
|
|
|
879
899
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
880
900
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
881
901
|
toolsRequireReasoningOff: true,
|
|
882
|
-
|
|
883
|
-
|
|
902
|
+
webSearchToolType: 'web_search',
|
|
903
|
+
webSearchPricePer1k: 10,
|
|
884
904
|
codeExecutionToolType: 'code_interpreter',
|
|
885
905
|
// LIST price. OpenAI ran a >20% PROMO from 2026-08-22 ($4/$20, cache read
|
|
886
906
|
// $0.40, cache write $5) — "GPT-5.6 Sol's promotional pricing is available
|
|
@@ -919,8 +939,8 @@ export const MODELS = [
|
|
|
919
939
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
920
940
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
921
941
|
toolsRequireReasoningOff: true,
|
|
922
|
-
|
|
923
|
-
|
|
942
|
+
webSearchToolType: 'web_search',
|
|
943
|
+
webSearchPricePer1k: 10,
|
|
924
944
|
codeExecutionToolType: 'code_interpreter',
|
|
925
945
|
// Repriced 2026-07-30 (20% cut from $2.50/$15).
|
|
926
946
|
inputPricePerMTok: 2,
|
|
@@ -954,8 +974,8 @@ export const MODELS = [
|
|
|
954
974
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
955
975
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
956
976
|
toolsRequireReasoningOff: true,
|
|
957
|
-
|
|
958
|
-
|
|
977
|
+
webSearchToolType: 'web_search',
|
|
978
|
+
webSearchPricePer1k: 10,
|
|
959
979
|
codeExecutionToolType: 'code_interpreter',
|
|
960
980
|
// Repriced 2026-07-30 (80% cut from $1/$6).
|
|
961
981
|
inputPricePerMTok: 0.2,
|
|
@@ -995,8 +1015,8 @@ export const MODELS = [
|
|
|
995
1015
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
996
1016
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
997
1017
|
toolsRequireReasoningOff: true,
|
|
998
|
-
|
|
999
|
-
|
|
1018
|
+
webSearchToolType: 'web_search',
|
|
1019
|
+
webSearchPricePer1k: 10,
|
|
1000
1020
|
codeExecutionToolType: 'code_interpreter',
|
|
1001
1021
|
inputPricePerMTok: 5,
|
|
1002
1022
|
outputPricePerMTok: 30,
|
|
@@ -1029,8 +1049,8 @@ export const MODELS = [
|
|
|
1029
1049
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
1030
1050
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
1031
1051
|
toolsRequireReasoningOff: true,
|
|
1032
|
-
|
|
1033
|
-
|
|
1052
|
+
webSearchToolType: 'web_search',
|
|
1053
|
+
webSearchPricePer1k: 10,
|
|
1034
1054
|
codeExecutionToolType: 'code_interpreter',
|
|
1035
1055
|
inputPricePerMTok: 2.5,
|
|
1036
1056
|
outputPricePerMTok: 15,
|
|
@@ -1065,8 +1085,8 @@ export const MODELS = [
|
|
|
1065
1085
|
// The bond now calls /v1/responses, where it is not (verified 2026-09-24);
|
|
1066
1086
|
// lifting this pin changes reasoning quality/cost, so it waits for a model eval.
|
|
1067
1087
|
toolsRequireReasoningOff: true,
|
|
1068
|
-
|
|
1069
|
-
|
|
1088
|
+
webSearchToolType: 'web_search',
|
|
1089
|
+
webSearchPricePer1k: 10,
|
|
1070
1090
|
codeExecutionToolType: 'code_interpreter',
|
|
1071
1091
|
inputPricePerMTok: 0.75,
|
|
1072
1092
|
outputPricePerMTok: 4.5,
|
|
@@ -1113,6 +1133,7 @@ export const MODELS = [
|
|
|
1113
1133
|
supportsPromptCaching: true,
|
|
1114
1134
|
supportsTools: true,
|
|
1115
1135
|
webSearchToolType: 'google_search',
|
|
1136
|
+
webSearchPricePer1k: 14,
|
|
1116
1137
|
codeExecutionToolType: 'code_execution',
|
|
1117
1138
|
webFetchToolType: 'url_context',
|
|
1118
1139
|
// "New Stable" 2026-09-02. LIST price $1.50/$7.50 — same card as 3.7- and
|
|
@@ -1149,6 +1170,7 @@ export const MODELS = [
|
|
|
1149
1170
|
supportsPromptCaching: true,
|
|
1150
1171
|
supportsTools: true,
|
|
1151
1172
|
webSearchToolType: 'google_search',
|
|
1173
|
+
webSearchPricePer1k: 14,
|
|
1152
1174
|
codeExecutionToolType: 'code_execution',
|
|
1153
1175
|
webFetchToolType: 'url_context',
|
|
1154
1176
|
// "New Stable" 2026-08-13. LIST price $1.50/$7.50 — same as 3.6-flash.
|
|
@@ -1191,6 +1213,7 @@ export const MODELS = [
|
|
|
1191
1213
|
supportsPromptCaching: true,
|
|
1192
1214
|
supportsTools: true,
|
|
1193
1215
|
webSearchToolType: 'google_search',
|
|
1216
|
+
webSearchPricePer1k: 14,
|
|
1194
1217
|
codeExecutionToolType: 'code_execution',
|
|
1195
1218
|
webFetchToolType: 'url_context',
|
|
1196
1219
|
// GA 2026-07-21 — same input price as 3.5-flash, CHEAPER output ($7.50 vs $9).
|
|
@@ -1235,6 +1258,7 @@ export const MODELS = [
|
|
|
1235
1258
|
supportsPromptCaching: true,
|
|
1236
1259
|
supportsTools: true,
|
|
1237
1260
|
webSearchToolType: 'google_search',
|
|
1261
|
+
webSearchPricePer1k: 14,
|
|
1238
1262
|
codeExecutionToolType: 'code_execution',
|
|
1239
1263
|
webFetchToolType: 'url_context',
|
|
1240
1264
|
inputPricePerMTok: 1.5,
|
|
@@ -1269,6 +1293,7 @@ export const MODELS = [
|
|
|
1269
1293
|
supportsPromptCaching: true,
|
|
1270
1294
|
supportsTools: true,
|
|
1271
1295
|
webSearchToolType: 'google_search',
|
|
1296
|
+
webSearchPricePer1k: 14,
|
|
1272
1297
|
codeExecutionToolType: 'code_execution',
|
|
1273
1298
|
webFetchToolType: 'url_context',
|
|
1274
1299
|
// ≤200K-token prompts; >200K bills $4/$18 (tiering not modeled).
|
|
@@ -2245,7 +2270,9 @@ export const MODELS = [
|
|
|
2245
2270
|
// The chat-completion reference gates web_search per model only in its
|
|
2246
2271
|
// VISION section; for text models the tool is listed unconditionally, as it
|
|
2247
2272
|
// was when glm-5.2 was cataloged.
|
|
2248
|
-
webSearchToolType: 'web_search
|
|
2273
|
+
// NO webSearchToolType: Zhipu's web_search never runs alongside function
|
|
2274
|
+
// tools or on a stream (see @molecule/api-ai-zhipu), so it cannot serve
|
|
2275
|
+
// Synthase — sending it only told the model it had a tool that never ran.
|
|
2249
2276
|
inputPricePerMTok: 1.4,
|
|
2250
2277
|
outputPricePerMTok: 4.4,
|
|
2251
2278
|
// GLM context cache: read ≈0.19× input, no write premium.
|
|
@@ -2287,7 +2314,9 @@ export const MODELS = [
|
|
|
2287
2314
|
supportsVision: true,
|
|
2288
2315
|
supportsPromptCaching: true,
|
|
2289
2316
|
supportsTools: true,
|
|
2290
|
-
webSearchToolType: 'web_search
|
|
2317
|
+
// NO webSearchToolType: Zhipu's web_search never runs alongside function
|
|
2318
|
+
// tools or on a stream (see @molecule/api-ai-zhipu), so it cannot serve
|
|
2319
|
+
// Synthase — sending it only told the model it had a tool that never ran.
|
|
2291
2320
|
// List card, verified 2026-09-23 on the Z.ai pricing page.
|
|
2292
2321
|
inputPricePerMTok: 0.37,
|
|
2293
2322
|
outputPricePerMTok: 1.25,
|
|
@@ -2321,7 +2350,9 @@ export const MODELS = [
|
|
|
2321
2350
|
supportsVision: true,
|
|
2322
2351
|
supportsPromptCaching: true,
|
|
2323
2352
|
supportsTools: true,
|
|
2324
|
-
webSearchToolType: 'web_search
|
|
2353
|
+
// NO webSearchToolType: Zhipu's web_search never runs alongside function
|
|
2354
|
+
// tools or on a stream (see @molecule/api-ai-zhipu), so it cannot serve
|
|
2355
|
+
// Synthase — sending it only told the model it had a tool that never ran.
|
|
2325
2356
|
// List card, re-verified 2026-09-10 on the Z.ai pricing page after the
|
|
2326
2357
|
// 50%-off launch promo ($0.075/$0.25, cached $0.015) ended on schedule
|
|
2327
2358
|
// 2026-09-09 24:00 UTC+8 — this IS what the provider bills now; models.dev
|
|
@@ -2363,7 +2394,9 @@ export const MODELS = [
|
|
|
2363
2394
|
supportsVision: false,
|
|
2364
2395
|
supportsPromptCaching: true,
|
|
2365
2396
|
supportsTools: true,
|
|
2366
|
-
webSearchToolType: 'web_search
|
|
2397
|
+
// NO webSearchToolType: Zhipu's web_search never runs alongside function
|
|
2398
|
+
// tools or on a stream (see @molecule/api-ai-zhipu), so it cannot serve
|
|
2399
|
+
// Synthase — sending it only told the model it had a tool that never ran.
|
|
2367
2400
|
inputPricePerMTok: 1.4,
|
|
2368
2401
|
outputPricePerMTok: 4.4,
|
|
2369
2402
|
// GLM context cache: read ≈0.19× input, no write premium.
|
|
@@ -2403,7 +2436,9 @@ export const MODELS = [
|
|
|
2403
2436
|
supportsVision: false,
|
|
2404
2437
|
supportsPromptCaching: true,
|
|
2405
2438
|
supportsTools: true,
|
|
2406
|
-
webSearchToolType: 'web_search
|
|
2439
|
+
// NO webSearchToolType: Zhipu's web_search never runs alongside function
|
|
2440
|
+
// tools or on a stream (see @molecule/api-ai-zhipu), so it cannot serve
|
|
2441
|
+
// Synthase — sending it only told the model it had a tool that never ran.
|
|
2407
2442
|
// Repriced by Z.ai around the GLM-5.1 launch (was $0.72/$2.30).
|
|
2408
2443
|
inputPricePerMTok: 1,
|
|
2409
2444
|
outputPricePerMTok: 3.2,
|
package/dist/types.d.ts
CHANGED
|
@@ -160,8 +160,21 @@ export interface ModelDefinition {
|
|
|
160
160
|
* Provider-specific server tool type for web search (e.g. `'web_search_20250305'`).
|
|
161
161
|
* When set, the chat handler sends this as a ServerTool alongside custom tools.
|
|
162
162
|
* Omit if the model / provider does not support native web search.
|
|
163
|
+
*
|
|
164
|
+
* Set it only when a search actually runs on a Synthase-shaped request
|
|
165
|
+
* (function tools present, streaming) — some providers accept the tool and
|
|
166
|
+
* silently never search in that shape. Requires {@link webSearchPricePer1k}.
|
|
163
167
|
*/
|
|
164
168
|
webSearchToolType?: string;
|
|
169
|
+
/**
|
|
170
|
+
* USD per 1,000 web searches the provider bills on top of tokens, applied to
|
|
171
|
+
* `TokenUsage.webSearchRequests`. Required whenever `webSearchToolType` is
|
|
172
|
+
* set (enforced by the catalog tests) — a search tool with no price is
|
|
173
|
+
* unmetered spend. Search-result tokens are billed as ordinary input tokens
|
|
174
|
+
* and need nothing here. Free monthly allowances are account-wide, not
|
|
175
|
+
* per-user, so they are not modeled: every search is metered at list price.
|
|
176
|
+
*/
|
|
177
|
+
webSearchPricePer1k?: number;
|
|
165
178
|
/**
|
|
166
179
|
* Provider-specific server tool type for code execution (e.g. `'code_execution_20250825'`).
|
|
167
180
|
* Omit if the model / provider does not support native code execution.
|
package/dist/types.d.ts.map
CHANGED
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