@molecule/api-resource-ai-models 1.17.2 → 1.17.4
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 -12
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +28 -10
- package/dist/types.d.ts +12 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
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-22T22:44:54.731Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-resource-ai-models
|
|
@@ -107,8 +107,15 @@ interface ModelDefinition {
|
|
|
107
107
|
* level names — e.g. Claude Haiku 4.5, Qwen3.7) list scaled-budget LABELS,
|
|
108
108
|
* e.g. `['4K', '8K', '16K', '32K']`, with {@link effortBudgetTokens} mapping
|
|
109
109
|
* each label to the actual token budget sent.
|
|
110
|
-
* - **
|
|
111
|
-
*
|
|
110
|
+
* - **Optional reasoning models** put the LOCAL `'off'` toggle first, e.g.
|
|
111
|
+
* `['off', 'low', 'high', 'max']` on DeepSeek V4.1 Flash. Their declared
|
|
112
|
+
* default may select reasoning. `'off'` is never sent to the provider: the
|
|
113
|
+
* resolved level produces no thinking block, which turns the vendor's
|
|
114
|
+
* reasoning off. A persisted value the model does not offer resolves to
|
|
115
|
+
* its declared default rather than escalating through a cross-model rank.
|
|
116
|
+
* - **Fixed-reasoning models** (DeepSeek V4 Pro / V4 Flash, Kimi, …) omit this
|
|
117
|
+
* field entirely — reasoning depth can't be tuned, so there is nothing to
|
|
118
|
+
* pick.
|
|
112
119
|
*
|
|
113
120
|
* A persisted value outside the active model's set degrades to the nearest one
|
|
114
121
|
* (`model-selection.ts` `resolveEffortForModel`). Absent → no effort choice.
|
|
@@ -214,14 +221,6 @@ interface ModelDefinition {
|
|
|
214
221
|
* Regions in which this model is free-tier selectable even though the model
|
|
215
222
|
* as a whole is not `freeTier` — for models whose regional hosts price very
|
|
216
223
|
* differently (e.g. a cheap native host powering the free planner while its
|
|
217
|
-
* ~3× re-host stays paid-only). Ignored when `freeTier` is true (all regions
|
|
218
|
-
* free); omitted → no free-tier access outside `freeTier`.
|
|
219
|
-
*/
|
|
220
|
-
freeTierRegions?: string[]
|
|
221
|
-
/**
|
|
222
|
-
* Processing regions this model can run in, as arbitrary region codes; the
|
|
223
|
-
* FIRST entry is the model's default region. Omit for `['us']` (the platform
|
|
224
|
-
* default — a single-region US model). A single-entry list pins the model to
|
|
225
224
|
// … truncated — the full declaration is in node_modules/@molecule/api-resource-ai-models/dist/types.d.ts
|
|
226
225
|
```
|
|
227
226
|
|
|
@@ -302,7 +301,9 @@ sent to the provider IS the model's real level (e.g. `'high'` / `'xhigh'` /
|
|
|
302
301
|
thinking-budget label like `'16K'` on budget-configurable models). Each model
|
|
303
302
|
declares its own ordered {@link ModelDefinition.supportedEffortLevels}; a
|
|
304
303
|
value that isn't in the active model's set degrades to the nearest one (see
|
|
305
|
-
`model-selection.ts`).
|
|
304
|
+
`model-selection.ts`). `'off'` is the one exception: it is a LOCAL toggle
|
|
305
|
+
(send no thinking block) that is never sent to a provider as an effort value.
|
|
306
|
+
Mirrored by the client-side `EffortLevel` in
|
|
306
307
|
`@molecule/app-ai-models`; keep the two in sync. Re-declared (rather than
|
|
307
308
|
imported) by the ide-react and molecule-dev consumers per the cross-stack
|
|
308
309
|
rule, but this catalog is the canonical home.
|
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;AAE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,EAm9EnC,CAAA"}
|
package/dist/models.js
CHANGED
|
@@ -2120,20 +2120,38 @@ export const MODELS = [
|
|
|
2120
2120
|
description: 'Newest ultra-cheap & fast flash — vision-capable agentic coding',
|
|
2121
2121
|
contextWindow: 1_000_000,
|
|
2122
2122
|
maxOutputTokens: 384_000,
|
|
2123
|
-
//
|
|
2124
|
-
//
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2123
|
+
// Low is the default configurable effort. The explicit `off` selection is
|
|
2124
|
+
// a LOCAL toggle, never sent to the vendor as a reasoning_effort value. A
|
|
2125
|
+
// project using `low`/`high`/`max` sends that native effort and the
|
|
2126
|
+
// bond replays every retained assistant reasoning_content through the tool
|
|
2127
|
+
// loop (DeepSeek 400s a thinking-mode request with tools that omits one),
|
|
2128
|
+
// which is what makes thinking mode usable on this surface at all.
|
|
2129
|
+
//
|
|
2130
|
+
// Verified against DeepSeek's own pages (2026-10-22):
|
|
2131
|
+
// https://api-docs.deepseek.com/guides/thinking_mode/ (replay obligation)
|
|
2132
|
+
// and https://api-docs.deepseek.com/api/create-chat-completion/
|
|
2133
|
+
// (thinking.type, reasoning_effort low|high|max; forced tool_choice is
|
|
2134
|
+
// rejected in thinking mode — the bond relaxes it). Both serving hosts also
|
|
2135
|
+
// ENFORCE the local-toggle split live: a dispatch probe that sent the level
|
|
2136
|
+
// verbatim rejected `off` on the native CN endpoint AND on the DeepInfra
|
|
2137
|
+
// re-host, listing low/high/max among their accepted variants. The US
|
|
2138
|
+
// re-host rides the SAME bond (molecule-dev/api/src/bonds/ai-deepseek.ts),
|
|
2139
|
+
// so both regions get this shape unchanged.
|
|
2140
|
+
supportsThinking: true,
|
|
2141
|
+
thinkingBudgetTokens: 8_000,
|
|
2142
|
+
thinkingConfigurable: true,
|
|
2143
|
+
supportedEffortLevels: ['off', 'low', 'high', 'max'],
|
|
2144
|
+
defaultEffortLevel: 'low',
|
|
2128
2145
|
supportsVision: true,
|
|
2129
2146
|
supportsPromptCaching: true,
|
|
2130
2147
|
supportsTools: true,
|
|
2131
2148
|
// Free-tier default (moved from deepseek-v4-flash 2026-09-10): the
|
|
2132
|
-
// cheapest capable executor on the go-forward id — fast,
|
|
2133
|
-
//
|
|
2134
|
-
// US leg on output-heavy turns (CN 0.6/1.2 output vs
|
|
2135
|
-
// 0.18) — tiers.ts's free-turn budget math derives from
|
|
2136
|
-
// Exactly one model in this catalog may carry freeTier
|
|
2149
|
+
// cheapest capable executor on the go-forward id — fast, tool-calling,
|
|
2150
|
+
// vision-capable, with low default effort for configurable chat. Serving cost
|
|
2151
|
+
// is ~2× the retired US leg on output-heavy turns (CN 0.6/1.2 output vs
|
|
2152
|
+
// DeepInfra's flat 0.18) — tiers.ts's free-turn budget math derives from
|
|
2153
|
+
// this entry. Exactly one model in this catalog may carry freeTier
|
|
2154
|
+
// (lookup.test.ts).
|
|
2137
2155
|
freeTier: true,
|
|
2138
2156
|
// Off-peak V4.1 Flash card; peak is `peakPricing.multiplier` × these.
|
|
2139
2157
|
inputPricePerMTok: 0.15,
|
package/dist/types.d.ts
CHANGED
|
@@ -32,7 +32,9 @@ export type AIProviderID = 'anthropic' | 'openai' | 'google' | 'xai' | 'deepseek
|
|
|
32
32
|
* thinking-budget label like `'16K'` on budget-configurable models). Each model
|
|
33
33
|
* declares its own ordered {@link ModelDefinition.supportedEffortLevels}; a
|
|
34
34
|
* value that isn't in the active model's set degrades to the nearest one (see
|
|
35
|
-
* `model-selection.ts`).
|
|
35
|
+
* `model-selection.ts`). `'off'` is the one exception: it is a LOCAL toggle
|
|
36
|
+
* (send no thinking block) that is never sent to a provider as an effort value.
|
|
37
|
+
* Mirrored by the client-side `EffortLevel` in
|
|
36
38
|
* `@molecule/app-ai-models`; keep the two in sync. Re-declared (rather than
|
|
37
39
|
* imported) by the ide-react and molecule-dev consumers per the cross-stack
|
|
38
40
|
* rule, but this catalog is the canonical home.
|
|
@@ -78,8 +80,15 @@ export interface ModelDefinition {
|
|
|
78
80
|
* level names — e.g. Claude Haiku 4.5, Qwen3.7) list scaled-budget LABELS,
|
|
79
81
|
* e.g. `['4K', '8K', '16K', '32K']`, with {@link effortBudgetTokens} mapping
|
|
80
82
|
* each label to the actual token budget sent.
|
|
81
|
-
* - **
|
|
82
|
-
*
|
|
83
|
+
* - **Optional reasoning models** put the LOCAL `'off'` toggle first, e.g.
|
|
84
|
+
* `['off', 'low', 'high', 'max']` on DeepSeek V4.1 Flash. Their declared
|
|
85
|
+
* default may select reasoning. `'off'` is never sent to the provider: the
|
|
86
|
+
* resolved level produces no thinking block, which turns the vendor's
|
|
87
|
+
* reasoning off. A persisted value the model does not offer resolves to
|
|
88
|
+
* its declared default rather than escalating through a cross-model rank.
|
|
89
|
+
* - **Fixed-reasoning models** (DeepSeek V4 Pro / V4 Flash, Kimi, …) omit this
|
|
90
|
+
* field entirely — reasoning depth can't be tuned, so there is nothing to
|
|
91
|
+
* pick.
|
|
83
92
|
*
|
|
84
93
|
* A persisted value outside the active model's set degrades to the nearest one
|
|
85
94
|
* (`model-selection.ts` `resolveEffortForModel`). Absent → no effort choice.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,UAAU,GACV,MAAM,GACN,UAAU,GACV,SAAS,GACT,SAAS,GACT,OAAO;AACT;;;;;GAKG;GACD,QAAQ,CAAA;AAEZ
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,UAAU,GACV,MAAM,GACN,UAAU,GACV,SAAS,GACT,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,qBAAqB,EAAE,MAAM,CAAA;QAC7B,uEAAuE;QACvE,sBAAsB,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,mDAAmD;IACnD,eAAe,EAAE,MAAM,CAAA;IACvB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAA;IACZ,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAA;IACf,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/api-resource-ai-models",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.4",
|
|
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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@molecule/api-resource": "1.0.5",
|
|
33
33
|
"@types/node": "26.1.2",
|
|
34
34
|
"typescript": "6.0.3",
|
|
35
|
-
"vitest": "4.1.
|
|
35
|
+
"vitest": "4.1.12"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@molecule/api-bond": "^1.0.1",
|