@molecule/api-resource-ai-models 1.15.0 → 1.15.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/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-08T16:53:19.950Z
6
+ Generated: 2026-10-10T13:18:18.465Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-resource-ai-models
@@ -1158,6 +1158,12 @@ Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
1158
1158
  / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
1159
1159
  with thinking_budget. It is cn-region-only — api.deepinfra.com has no
1160
1160
  Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
1161
+ (re-verified 2026-10-10: DashScope RETIRED qwen3-coder-plus — the native
1162
+ compatible-mode endpoint 404s "Model not exist." on every request shape
1163
+ and the id is gone from its own /v1/models list, while the help-center
1164
+ model page still describes it (docs lag the endpoint). The catalog entry
1165
+ dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
1166
+ unchanged the same day: $0.30/$1, cache read 0.3333× input.)
1161
1167
  - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
1162
1168
  glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
1163
1169
  catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
@@ -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;;;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/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 requested && regions.includes(requested) ? requested : regions[0];
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
@@ -291,6 +291,12 @@ import type { ModelDefinition } from './types.js';
291
291
  * / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
292
292
  * with thinking_budget. It is cn-region-only — api.deepinfra.com has no
293
293
  * Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
294
+ * (re-verified 2026-10-10: DashScope RETIRED qwen3-coder-plus — the native
295
+ * compatible-mode endpoint 404s "Model not exist." on every request shape
296
+ * and the id is gone from its own /v1/models list, while the help-center
297
+ * model page still describes it (docs lag the endpoint). The catalog entry
298
+ * dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
299
+ * unchanged the same day: $0.30/$1, cache read 0.3333× input.)
294
300
  * - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
295
301
  * glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
296
302
  * catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4TG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EA80EnC,CAAA"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkUG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAu1EnC,CAAA"}
package/dist/models.js CHANGED
@@ -340,6 +340,12 @@ const CHINA_PUBLIC_HOLIDAYS = [
340
340
  * / 131,072 out, Image+Text+Video input, tools, hybrid thinking ON by default
341
341
  * with thinking_budget. It is cn-region-only — api.deepinfra.com has no
342
342
  * Qwen/Qwen3.8-Flash — so ALIBABA_US_MODEL_MAP needs no entry.)
343
+ * (re-verified 2026-10-10: DashScope RETIRED qwen3-coder-plus — the native
344
+ * compatible-mode endpoint 404s "Model not exist." on every request shape
345
+ * and the id is gone from its own /v1/models list, while the help-center
346
+ * model page still describes it (docs lag the endpoint). The catalog entry
347
+ * dropped its cn region and is now US/DeepInfra-only, whose rates re-verified
348
+ * unchanged the same day: $0.30/$1, cache read 0.3333× input.)
343
349
  * - Zhipu: https://docs.z.ai/guides/overview/pricing + docs.z.ai/guides/llm/
344
350
  * glm-5.3 (verified 2026-08-26: glm-5.3 shipped 2026-08-14 and IS in the
345
351
  * catalog — $1.40/$4.40, cached $0.26, i.e. glm-5.2's card unchanged, 1M ctx,
@@ -2505,14 +2511,23 @@ export const MODELS = [
2505
2511
  supportsPromptCaching: true,
2506
2512
  supportsTools: true,
2507
2513
  // DashScope international list rate, flat across input tiers (the old
2508
- // $0.65/$3.25 was OpenRouter's promo rate).
2514
+ // $0.65/$3.25 was OpenRouter's promo rate). Unreachable for dispatch since
2515
+ // the native retirement below — kept as the native reference the re-host
2516
+ // rates in regionPricing are read against.
2509
2517
  inputPricePerMTok: 1,
2510
2518
  outputPricePerMTok: 5,
2511
2519
  // Implicit context cache: read 0.2× input, no write premium.
2512
2520
  cacheReadPricePerMTok: 0.2,
2513
2521
  cacheWritePricePerMTok: 1,
2514
- // US default (DeepInfra bills well below native). Verified 2026-08-01.
2515
- regions: ['us', 'cn'],
2522
+ // US re-host ONLY since 2026-10-10: DashScope RETIRED the id — the native
2523
+ // compatible-mode endpoint 404s "Model not exist." on every request shape
2524
+ // and the id is absent from the endpoint's own /v1/models list (only
2525
+ // qwen3-coder-flash remains of the coder family; the help-center model page
2526
+ // still describes the id — docs lag the endpoint). A saved cn region
2527
+ // choice now falls back to us (effectiveModelRegion). DeepInfra rates
2528
+ // re-verified 2026-10-10 against api.deepinfra.com/models: in $0.30,
2529
+ // out $1, cache read 0.3333× input = $0.10.
2530
+ regions: ['us'],
2516
2531
  regionPricing: {
2517
2532
  us: { inputPricePerMTok: 0.3, outputPricePerMTok: 1, cacheReadPricePerMTok: 0.1 },
2518
2533
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-resource-ai-models",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "AI model catalog — server-side source of truth plus an authentication-gated discovery endpoint",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",