@molecule/api-resource-ai-models 1.15.0 → 1.15.2
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 +13 -1
- package/dist/lookup.d.ts.map +1 -1
- package/dist/lookup.js +7 -1
- package/dist/models.d.ts +12 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +37 -13
- 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-10-
|
|
6
|
+
Generated: 2026-10-11T20:07:44.827Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-resource-ai-models
|
|
@@ -1123,6 +1123,12 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
|
|
|
1123
1123
|
(re-verified 2026-09-10 on platform.kimi.ai/docs/models: kimi-k2.5 was
|
|
1124
1124
|
officially discontinued 2026-08-31 — calls 404 — so its entry is now
|
|
1125
1125
|
`disabled: true`. kimi-k3 / kimi-k2.6 / kimi-k2.7-code all still Active.)
|
|
1126
|
+
(re-verified 2026-10-11 on api.deepinfra.com/models/: the US re-host
|
|
1127
|
+
DEPRECATED moonshotai/Kimi-K2.7-Code on 2026-09-29 with replaced_by
|
|
1128
|
+
Kimi-K3 — a live probe sat 221 s with no content, then streamed chunks
|
|
1129
|
+
labeled Kimi-K3 — so kimi-k2.7-code is native-only (regions ['cn']) and
|
|
1130
|
+
its US modelMap entry is gone. kimi-k3's US re-host is healthy, rates
|
|
1131
|
+
unchanged.)
|
|
1126
1132
|
- MiniMax: https://platform.minimax.io/docs/guides/pricing-paygo (unchanged;
|
|
1127
1133
|
minimax-m3 $0.30/$1.20 is a "permanent 50% off" list rate)
|
|
1128
1134
|
- Alibaba: https://www.alibabacloud.com/help/en/model-studio/deep-thinking
|
|
@@ -1158,6 +1164,12 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
|
|
|
1158
1164
|
/ 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
|
|
1159
1165
|
with thinking_budget. It is cn-region-only — api.deepinfra.com has no
|
|
1160
1166
|
Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
|
|
1167
|
+
(re-verified 2026-10-10: DashScope RETIRED qwen3-coder-plus — the native
|
|
1168
|
+
compatible-mode endpoint 404s "Model not exist." on every request shape
|
|
1169
|
+
and the id is gone from its own /v1/models list, while the help-center
|
|
1170
|
+
model page still describes it (docs lag the endpoint). The catalog entry
|
|
1171
|
+
dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
|
|
1172
|
+
unchanged the same day: $0.30/$1, cache read 0.3333× input.)
|
|
1161
1173
|
- Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
|
|
1162
1174
|
glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
|
|
1163
1175
|
catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
|
package/dist/lookup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../src/lookup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE/D;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,cAAc,CAAC,GACxD,OAAO,CAET;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG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,EAAE,eAAe,EACzB,EAAE,GAAE,IAAiB,GACpB,eAAe,CAWjB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,GAAG,SAAS,EACrC,EAAE,EAAE,IAAI,EACR,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CA2BR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,GAAG,SAAS,EACrC,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CASR;AAED,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAA;IACzB,8CAA8C;IAC9C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,yDAAyD;IACzD,qBAAqB,EAAE,MAAM,CAAA;IAC7B,0DAA0D;IAC1D,sBAAsB,EAAE,MAAM,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,EACzB,SAAS,CAAC,EAAE,MAAM,EAClB,EAAE,GAAE,IAAiB,EACrB,YAAY,CAAC,EAAE,MAAM,GACpB,eAAe,CAqBjB"}
|
package/dist/lookup.js
CHANGED
|
@@ -273,7 +273,13 @@ export function priceMultiplierAt(modelDef, at, region) {
|
|
|
273
273
|
*/
|
|
274
274
|
export function effectiveModelRegion(modelDef, requested) {
|
|
275
275
|
const regions = modelDef?.regions ?? ['us'];
|
|
276
|
-
return
|
|
276
|
+
// `regions[0] ?? 'us'`: the return type is `string`, and an EMPTY list (a
|
|
277
|
+
// typo'd catalog entry, a caller-built definition) has no first entry — a
|
|
278
|
+
// bare `regions[0]` answered `undefined`, so dispatch looked up the named
|
|
279
|
+
// bond `<provider>-undefined` and the catalog served a region-less model.
|
|
280
|
+
// An empty list means the same thing an omitted one does (the platform
|
|
281
|
+
// default), which is what the `?? ['us']` above already says.
|
|
282
|
+
return requested && regions.includes(requested) ? requested : (regions[0] ?? 'us');
|
|
277
283
|
}
|
|
278
284
|
/**
|
|
279
285
|
* The token rates for a model in a given processing region: the model's
|
package/dist/models.d.ts
CHANGED
|
@@ -256,6 +256,12 @@ import type { ModelDefinition } from './types.js';
|
|
|
256
256
|
* (re-verified 2026-09-10 on platform.kimi.ai/docs/models: kimi-k2.5 was
|
|
257
257
|
* officially discontinued 2026-08-31 — calls 404 — so its entry is now
|
|
258
258
|
* `disabled: true`. kimi-k3 / kimi-k2.6 / kimi-k2.7-code all still Active.)
|
|
259
|
+
* (re-verified 2026-10-11 on api.deepinfra.com/models/: the US re-host
|
|
260
|
+
* DEPRECATED moonshotai/Kimi-K2.7-Code on 2026-09-29 with replaced_by
|
|
261
|
+
* Kimi-K3 — a live probe sat 221 s with no content, then streamed chunks
|
|
262
|
+
* labeled Kimi-K3 — so kimi-k2.7-code is native-only (regions ['cn']) and
|
|
263
|
+
* its US modelMap entry is gone. kimi-k3's US re-host is healthy, rates
|
|
264
|
+
* unchanged.)
|
|
259
265
|
* - MiniMax: https://platform.minimax.io/docs/guides/pricing-paygo (unchanged;
|
|
260
266
|
* minimax-m3 $0.30/$1.20 is a "permanent 50% off" list rate)
|
|
261
267
|
* - Alibaba: https://www.alibabacloud.com/help/en/model-studio/deep-thinking
|
|
@@ -291,6 +297,12 @@ import type { ModelDefinition } from './types.js';
|
|
|
291
297
|
* / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
|
|
292
298
|
* with thinking_budget. It is cn-region-only — api.deepinfra.com has no
|
|
293
299
|
* Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
|
|
300
|
+
* (re-verified 2026-10-10: DashScope RETIRED qwen3-coder-plus — the native
|
|
301
|
+
* compatible-mode endpoint 404s "Model not exist." on every request shape
|
|
302
|
+
* and the id is gone from its own /v1/models list, while the help-center
|
|
303
|
+
* model page still describes it (docs lag the endpoint). The catalog entry
|
|
304
|
+
* dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
|
|
305
|
+
* unchanged the same day: $0.30/$1, cache read 0.3333× input.)
|
|
294
306
|
* - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
|
|
295
307
|
* glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
|
|
296
308
|
* catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwUG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EA01EnC,CAAA"}
|
package/dist/models.js
CHANGED
|
@@ -305,6 +305,12 @@ const CHINA_PUBLIC_HOLIDAYS = [
|
|
|
305
305
|
* (re-verified 2026-09-10 on platform.kimi.ai/docs/models: kimi-k2.5 was
|
|
306
306
|
* officially discontinued 2026-08-31 — calls 404 — so its entry is now
|
|
307
307
|
* `disabled: true`. kimi-k3 / kimi-k2.6 / kimi-k2.7-code all still Active.)
|
|
308
|
+
* (re-verified 2026-10-11 on api.deepinfra.com/models/: the US re-host
|
|
309
|
+
* DEPRECATED moonshotai/Kimi-K2.7-Code on 2026-09-29 with replaced_by
|
|
310
|
+
* Kimi-K3 — a live probe sat 221 s with no content, then streamed chunks
|
|
311
|
+
* labeled Kimi-K3 — so kimi-k2.7-code is native-only (regions ['cn']) and
|
|
312
|
+
* its US modelMap entry is gone. kimi-k3's US re-host is healthy, rates
|
|
313
|
+
* unchanged.)
|
|
308
314
|
* - MiniMax: https://platform.minimax.io/docs/guides/pricing-paygo (unchanged;
|
|
309
315
|
* minimax-m3 $0.30/$1.20 is a "permanent 50% off" list rate)
|
|
310
316
|
* - Alibaba: https://www.alibabacloud.com/help/en/model-studio/deep-thinking
|
|
@@ -340,6 +346,12 @@ const CHINA_PUBLIC_HOLIDAYS = [
|
|
|
340
346
|
* / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
|
|
341
347
|
* with thinking_budget. It is cn-region-only — api.deepinfra.com has no
|
|
342
348
|
* Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
|
|
349
|
+
* (re-verified 2026-10-10: DashScope RETIRED qwen3-coder-plus — the native
|
|
350
|
+
* compatible-mode endpoint 404s "Model not exist." on every request shape
|
|
351
|
+
* and the id is gone from its own /v1/models list, while the help-center
|
|
352
|
+
* model page still describes it (docs lag the endpoint). The catalog entry
|
|
353
|
+
* dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
|
|
354
|
+
* unchanged the same day: $0.30/$1, cache read 0.3333× input.)
|
|
343
355
|
* - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
|
|
344
356
|
* glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
|
|
345
357
|
* catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
|
|
@@ -2106,7 +2118,9 @@ export const MODELS = [
|
|
|
2106
2118
|
// 0.000285 → $2.85/MTok, cents_per_output_token 0.001425 → $14.25/MTok,
|
|
2107
2119
|
// rate_per_input_token_cached 0.1 → cache read $0.285/MTok, and
|
|
2108
2120
|
// rate_per_input_token_cache_write null → no write premium (the omitted
|
|
2109
|
-
// cache-write field falls back to the region's input rate).
|
|
2121
|
+
// cache-write field falls back to the region's input rate).
|
|
2122
|
+
// Re-verified 2026-10-11 on the same page: rates unchanged, deployment
|
|
2123
|
+
// NOT deprecated (unlike Kimi-K2.7-Code — see that entry). Cheaper than
|
|
2110
2124
|
// Moonshot native on every axis, which is why US leads (see the
|
|
2111
2125
|
// cheapest-default-region invariant in __tests__/lookup.test.ts).
|
|
2112
2126
|
// The host serves the full 1M context, unquantized, and returns
|
|
@@ -2146,15 +2160,16 @@ export const MODELS = [
|
|
|
2146
2160
|
// Automatic context cache: absolute cache-hit price ($0.19/M = 0.2× input).
|
|
2147
2161
|
cacheReadPricePerMTok: 0.19,
|
|
2148
2162
|
cacheWritePricePerMTok: 0.95,
|
|
2149
|
-
//
|
|
2150
|
-
//
|
|
2151
|
-
//
|
|
2152
|
-
//
|
|
2153
|
-
//
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2163
|
+
// Native-only since 2026-10-11. DeepInfra DEPRECATED the K2.7-Code
|
|
2164
|
+
// deployment on 2026-09-29 (its own model page: replaced_by
|
|
2165
|
+
// moonshotai/Kimi-K3) and it rotted exactly the way re-host ids do: a live
|
|
2166
|
+
// 2026-10-11 probe got HTTP 200 in under a second, then NO content for
|
|
2167
|
+
// 221 s, and the chunks came back labeled model "moonshotai/Kimi-K3" —
|
|
2168
|
+
// the replacement served under the deprecated id. Dropped, not remapped:
|
|
2169
|
+
// silently serving the 4× -pricier flagship under the coding model's name
|
|
2170
|
+
// and rate card is worse than not offering US. Native (cn) verified live
|
|
2171
|
+
// the same day — all three Synthase request shapes OK.
|
|
2172
|
+
regions: ['cn'],
|
|
2158
2173
|
// Not published — best-effort estimate.
|
|
2159
2174
|
knowledgeCutoff: '2025-10-01',
|
|
2160
2175
|
// kimi-k3 is the Moonshot pick, but this is NOT superseded: the coding
|
|
@@ -2505,14 +2520,23 @@ export const MODELS = [
|
|
|
2505
2520
|
supportsPromptCaching: true,
|
|
2506
2521
|
supportsTools: true,
|
|
2507
2522
|
// DashScope international list rate, flat across input tiers (the old
|
|
2508
|
-
// $0.65/$3.25 was OpenRouter's promo rate).
|
|
2523
|
+
// $0.65/$3.25 was OpenRouter's promo rate). Unreachable for dispatch since
|
|
2524
|
+
// the native retirement below — kept as the native reference the re-host
|
|
2525
|
+
// rates in regionPricing are read against.
|
|
2509
2526
|
inputPricePerMTok: 1,
|
|
2510
2527
|
outputPricePerMTok: 5,
|
|
2511
2528
|
// Implicit context cache: read 0.2× input, no write premium.
|
|
2512
2529
|
cacheReadPricePerMTok: 0.2,
|
|
2513
2530
|
cacheWritePricePerMTok: 1,
|
|
2514
|
-
// US
|
|
2515
|
-
|
|
2531
|
+
// US re-host ONLY since 2026-10-10: DashScope RETIRED the id — the native
|
|
2532
|
+
// compatible-mode endpoint 404s "Model not exist." on every request shape
|
|
2533
|
+
// and the id is absent from the endpoint's own /v1/models list (only
|
|
2534
|
+
// qwen3-coder-flash remains of the coder family; the help-center model page
|
|
2535
|
+
// still describes the id — docs lag the endpoint). A saved cn region
|
|
2536
|
+
// choice now falls back to us (effectiveModelRegion). DeepInfra rates
|
|
2537
|
+
// re-verified 2026-10-10 against api.deepinfra.com/models: in $0.30,
|
|
2538
|
+
// out $1, cache read 0.3333× input = $0.10.
|
|
2539
|
+
regions: ['us'],
|
|
2516
2540
|
regionPricing: {
|
|
2517
2541
|
us: { inputPricePerMTok: 0.3, outputPricePerMTok: 1, cacheReadPricePerMTok: 0.1 },
|
|
2518
2542
|
},
|
package/package.json
CHANGED