@molecule/api-resource-ai-models 1.19.0 → 1.19.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 +143 -116
- 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-
|
|
6
|
+
Generated: 2026-11-04T14:19:59.553Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-resource-ai-models
|
|
@@ -88,57 +88,13 @@ interface ModelDefinition {
|
|
|
88
88
|
supportsThinking: boolean
|
|
89
89
|
/** Default thinking budget in tokens (only relevant when `supportsThinking` is true). */
|
|
90
90
|
thinkingBudgetTokens: number
|
|
91
|
-
/**
|
|
92
|
-
* Whether the thinking budget can be controlled via API params.
|
|
93
|
-
* When false, the model always reasons but does not accept a thinking / reasoning_effort param.
|
|
94
|
-
*/
|
|
91
|
+
/** Whether the thinking budget can be controlled via API params. */
|
|
95
92
|
thinkingConfigurable: boolean
|
|
96
|
-
/**
|
|
97
|
-
* The model's OWN reasoning-effort levels, ordered ascending (least → most
|
|
98
|
-
* effort) — the exact values a user picks, that get persisted, and that the
|
|
99
|
-
* `/effort` command offers. There is NO abstract scale: these are the model's
|
|
100
|
-
* real levels.
|
|
101
|
-
*
|
|
102
|
-
* - **Native-effort models** (Anthropic `output_config.effort`, OpenAI
|
|
103
|
-
* `reasoning_effort`, Gemini `thinking_level`, …) list their provider values
|
|
104
|
-
* verbatim, e.g. `['low', 'high', 'xhigh', 'max']` — each value is sent as
|
|
105
|
-
* the provider's effort param as-is.
|
|
106
|
-
* - **Budget-configurable models** (a raw thinking-token budget, no native
|
|
107
|
-
* level names — e.g. Claude Haiku 4.5, Qwen3.7) list scaled-budget LABELS,
|
|
108
|
-
* e.g. `['4K', '8K', '16K', '32K']`, with {@link effortBudgetTokens} mapping
|
|
109
|
-
* each label to the actual token budget sent.
|
|
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.
|
|
119
|
-
*
|
|
120
|
-
* A persisted value outside the active model's set degrades to the nearest one
|
|
121
|
-
* (`model-selection.ts` `resolveEffortForModel`). Absent → no effort choice.
|
|
122
|
-
*/
|
|
93
|
+
/** The model's OWN reasoning-effort levels, ordered ascending (least → most effort) — the exact values a user picks, that get persisted, and that the `/effort` co… */
|
|
123
94
|
supportedEffortLevels?: EffortLevel[]
|
|
124
|
-
/**
|
|
125
|
-
* The model's default effort value — the one used when the user hasn't chosen.
|
|
126
|
-
* MUST be a member of {@link supportedEffortLevels}. Absent only when the model
|
|
127
|
-
* has no effort levels (fixed reasoning).
|
|
128
|
-
*/
|
|
95
|
+
/** The model's default effort value — the one used when the user hasn't chosen. */
|
|
129
96
|
defaultEffortLevel?: EffortLevel
|
|
130
|
-
/**
|
|
131
|
-
* For budget-configurable models ONLY: maps each label in
|
|
132
|
-
* {@link supportedEffortLevels} to the thinking-token budget it sends
|
|
133
|
-
* (e.g. `{ '4K': 4000, '8K': 8000, '16K': 16000, '32K': 32000 }`). Its
|
|
134
|
-
* presence is what marks a model as budget-driven rather than native-effort:
|
|
135
|
-
* a model WITH this map sends `budget_tokens`; a model WITHOUT it sends its
|
|
136
|
-
* chosen level as the provider's native effort param.
|
|
137
|
-
*
|
|
138
|
-
* CRITICAL for Anthropic 4.6+ models (Fable 5, Opus 4.8/4.6, Sonnet 5 / 4.6):
|
|
139
|
-
* these must NOT carry this map — they are native-effort models, and sending
|
|
140
|
-
* `budget_tokens` returns a 400 on Fable 5 / Opus 4.8 / Sonnet 5.
|
|
141
|
-
*/
|
|
97
|
+
/** For budget-configurable models ONLY: maps each label in {@link supportedEffortLevels} to the thinking-token budget it sends (e.g. `{ '4K': 4000, '8K': 8000, '1… */
|
|
142
98
|
effortBudgetTokens?: Record<string, number>
|
|
143
99
|
/** Whether the model supports vision (images, documents, etc.). */
|
|
144
100
|
supportsVision: boolean
|
|
@@ -146,84 +102,116 @@ interface ModelDefinition {
|
|
|
146
102
|
supportsPromptCaching: boolean
|
|
147
103
|
/** Whether the model supports tool use / function calling. */
|
|
148
104
|
supportsTools: boolean
|
|
149
|
-
/**
|
|
150
|
-
* Tool-less utility calls (commit messages) run this model with reasoning
|
|
151
|
-
* explicitly off (`effort: 'none'`); tool-carrying turns use the turn's
|
|
152
|
-
* reasoning effort like any other model. Set for the OpenAI gpt-5.4+ entries
|
|
153
|
-
* that accept `'none'`. (A temperature on those that reject one is handled
|
|
154
|
-
* by `rejectsTemperature`, not by this.)
|
|
155
|
-
*
|
|
156
|
-
* The name is historical: on /v1/chat/completions these models also rejected
|
|
157
|
-
* function tools combined with reasoning, so tool-carrying calls were pinned
|
|
158
|
-
* off too. The OpenAI bond calls /v1/responses, where tools and reasoning
|
|
159
|
-
* combine, and that pin was lifted — reasoning off with web search made the
|
|
160
|
-
* model search again and repeat its tool call on every turn. Kept under this
|
|
161
|
-
* name because renaming a published field breaks consumers.
|
|
162
|
-
*/
|
|
105
|
+
/** Tool-less utility calls (commit messages) run this model with reasoning explicitly off (`effort: 'none'`); tool-carrying turns use the turn's reasoning effort… */
|
|
163
106
|
toolsRequireReasoningOff?: boolean
|
|
164
|
-
/**
|
|
165
|
-
* The provider rejects a FORCED tool choice for this model — Anthropic
|
|
166
|
-
* `tool_choice` `any` / `tool` answer 400 on claude-fable-5-1 and
|
|
167
|
-
* claude-opus-5-5, and Moonshot rejects `required` while thinking is on,
|
|
168
|
-
* which it always is on kimi-k2.7-code (all probed live 2026-09-23). `auto`
|
|
169
|
-
* works and the model still calls the tool. Callers that would force a tool call (Synthase
|
|
170
|
-
* discovery, starting-point selection) must send `auto` for these models;
|
|
171
|
-
* molecule-dev resolves that in one place (`toolChoiceParam` in
|
|
172
|
-
* request-shape.ts) and its live dispatch check probes the forced shape for
|
|
173
|
-
* every model, so a new model with this restriction fails the check instead
|
|
174
|
-
* of every discovery turn.
|
|
175
|
-
*/
|
|
107
|
+
/** The provider rejects a FORCED tool choice for this model — Anthropic `tool_choice` `any` / `tool` answer 400 on claude-fable-5-1 and claude-opus-5-5, and Moons… */
|
|
176
108
|
rejectsForcedToolChoice?: boolean
|
|
177
|
-
/**
|
|
178
|
-
* The provider rejects a caller-chosen `temperature` for this model —
|
|
179
|
-
* Anthropic answers 400 "`temperature` is deprecated for this model" on the
|
|
180
|
-
* Claude 5 family and Opus 4.7/4.8 (Opus 4.6, Sonnet 4.6 and Haiku 4.5 still
|
|
181
|
-
* accept it), and Moonshot's native host allows only 1 on kimi-k3 and
|
|
182
|
-
* kimi-k2.7-code (all probed live 2026-09-23). Omitting it is always safe. Callers that set a temperature (commit
|
|
183
|
-
* messages, starting-point selection) must omit it for these models;
|
|
184
|
-
* molecule-dev resolves that in one place (`temperatureParam` in
|
|
185
|
-
* request-shape.ts), and its live dispatch check sends the tool-less,
|
|
186
|
-
* temperature-0 shape to every model.
|
|
187
|
-
*/
|
|
109
|
+
/** The provider rejects a caller-chosen `temperature` for this model — Anthropic answers 400 "`temperature` is deprecated for this model" on the Claude 5 family a… */
|
|
188
110
|
rejectsTemperature?: boolean
|
|
189
|
-
/**
|
|
190
|
-
* Provider-specific server tool type for web search (e.g. `'web_search_20250305'`).
|
|
191
|
-
* When set, the chat handler sends this as a ServerTool alongside custom tools.
|
|
192
|
-
* Omit if the model / provider does not support native web search.
|
|
193
|
-
*
|
|
194
|
-
* Set it only when a search actually runs on a Synthase-shaped request
|
|
195
|
-
* (function tools present, streaming) — some providers accept the tool and
|
|
196
|
-
* silently never search in that shape. Requires {@link webSearchPricePer1k}.
|
|
197
|
-
*/
|
|
111
|
+
/** Provider-specific server tool type for web search (e.g. `'web_search_20250305'`). */
|
|
198
112
|
webSearchToolType?: string
|
|
199
|
-
/**
|
|
200
|
-
* USD per 1,000 web searches the provider bills on top of tokens, applied to
|
|
201
|
-
* `TokenUsage.webSearchRequests`. Required whenever `webSearchToolType` is
|
|
202
|
-
* set (enforced by the catalog tests) — a search tool with no price is
|
|
203
|
-
* unmetered spend. Search-result tokens are billed as ordinary input tokens
|
|
204
|
-
* and need nothing here. Free monthly allowances are account-wide, not
|
|
205
|
-
* per-user, so they are not modeled: every search is metered at list price.
|
|
206
|
-
*/
|
|
113
|
+
/** USD per 1,000 web searches the provider bills on top of tokens, applied to `TokenUsage.webSearchRequests`. */
|
|
207
114
|
webSearchPricePer1k?: number
|
|
208
|
-
/**
|
|
209
|
-
* Provider-specific server tool type for code execution (e.g. `'code_execution_20250825'`).
|
|
210
|
-
* Omit if the model / provider does not support native code execution.
|
|
211
|
-
*/
|
|
115
|
+
/** Provider-specific server tool type for code execution (e.g. `'code_execution_20250825'`). */
|
|
212
116
|
codeExecutionToolType?: string
|
|
213
|
-
/**
|
|
214
|
-
* Provider-specific server tool type for web fetch / URL context (e.g. `'web_fetch_20260209'`).
|
|
215
|
-
* Omit if the model / provider does not support native web fetch.
|
|
216
|
-
*/
|
|
117
|
+
/** Provider-specific server tool type for web fetch / URL context (e.g. `'web_fetch_20260209'`). */
|
|
217
118
|
webFetchToolType?: string
|
|
218
119
|
/** Whether this model is available on the free tier (only one model should be true). */
|
|
219
120
|
freeTier?: boolean
|
|
220
|
-
/**
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
121
|
+
/** Regions in which this model is free-tier selectable even though the model as a whole is not `freeTier` — for models whose regional hosts price very differently… */
|
|
122
|
+
freeTierRegions?: string[]
|
|
123
|
+
/** Processing regions this model can run in, as arbitrary region codes; the FIRST entry is the model's default region. */
|
|
124
|
+
regions?: string[]
|
|
125
|
+
/** Per-region price overrides in USD per MTok, keyed by region code, for regions whose host bills differently from the base rates (e.g. a US re-host of a Chinese-… */
|
|
126
|
+
regionPricing?: Record<
|
|
127
|
+
string,
|
|
128
|
+
{
|
|
129
|
+
/** Region input price per million uncached tokens in USD. */
|
|
130
|
+
inputPricePerMTok: number
|
|
131
|
+
/** Region output price per million tokens in USD. */
|
|
132
|
+
outputPricePerMTok: number
|
|
133
|
+
/** Region prompt-cache read price per million tokens in USD. */
|
|
134
|
+
cacheReadPricePerMTok?: number
|
|
135
|
+
/** Region prompt-cache write price per million tokens in USD. */
|
|
136
|
+
cacheWritePricePerMTok?: number
|
|
137
|
+
}
|
|
138
|
+
>
|
|
139
|
+
/** Input price per million *uncached* (fresh) input tokens in USD. */
|
|
140
|
+
inputPricePerMTok: number
|
|
141
|
+
/** Output price per million tokens in USD. */
|
|
142
|
+
outputPricePerMTok: number
|
|
143
|
+
/** Price per million prompt-cache *read* (cache-hit) input tokens in USD. */
|
|
144
|
+
cacheReadPricePerMTok: number
|
|
145
|
+
/** Price per million prompt-cache *write* (cache-creation) input tokens in USD. */
|
|
146
|
+
cacheWritePricePerMTok: number
|
|
147
|
+
/** Optional provider peak-hour pricing: during the listed UTC windows, ALL of this model's token prices (input, output, cache read/write) bill at `multiplier × `… */
|
|
148
|
+
peakPricing?: {
|
|
149
|
+
windows: { startMinuteUtc: number; endMinuteUtc: number; daysOfWeekUtc?: number[] }[]
|
|
150
|
+
multiplier: number
|
|
151
|
+
excludedDatesUtc?: string[]
|
|
152
|
+
rule?: { url: string; text: string }
|
|
153
|
+
}
|
|
154
|
+
/** A price change the provider has ANNOUNCED with a dated effective instant, staged ahead of time. */
|
|
155
|
+
scheduledPricing?: {
|
|
156
|
+
/** ISO-8601 UTC instant the new rates take effect. */
|
|
157
|
+
effectiveFrom: string
|
|
158
|
+
/** Input price per million *uncached* tokens in USD, from `effectiveFrom`. */
|
|
159
|
+
inputPricePerMTok: number
|
|
160
|
+
/** Output price per million tokens in USD, from `effectiveFrom`. */
|
|
161
|
+
outputPricePerMTok: number
|
|
162
|
+
/** Prompt-cache *read* price per million tokens in USD, from `effectiveFrom`. */
|
|
163
|
+
cacheReadPricePerMTok: number
|
|
164
|
+
/** Prompt-cache *write* price per million tokens in USD, from `effectiveFrom`. */
|
|
165
|
+
cacheWritePricePerMTok: number
|
|
166
|
+
/** Peak-hour pricing from `effectiveFrom` (omitted → existing windows carry through). */
|
|
167
|
+
peakPricing?: {
|
|
168
|
+
windows: { startMinuteUtc: number; endMinuteUtc: number; daysOfWeekUtc?: number[] }[]
|
|
169
|
+
multiplier: number
|
|
170
|
+
excludedDatesUtc?: string[]
|
|
171
|
+
rule?: { url: string; text: string }
|
|
172
|
+
}
|
|
173
|
+
/** Long-context band from `effectiveFrom` (omitted → the model's existing band carries through unchanged). */
|
|
174
|
+
longContextPricing?: ModelDefinition['longContextPricing']
|
|
175
|
+
/** Where the change was announced, for the re-verify pass after it lands. */
|
|
176
|
+
source?: string
|
|
177
|
+
}
|
|
178
|
+
/** Fast-mode ("priority speed") pricing — the per-MTok rates billed when a request runs with the provider's fast/priority tier (e.g. Anthropic's `speed: "fast"` r… */
|
|
179
|
+
fastPricing?: {
|
|
180
|
+
/** Fast-mode input price per million uncached tokens in USD. */
|
|
181
|
+
inputPricePerMTok: number
|
|
182
|
+
/** Fast-mode output price per million tokens in USD. */
|
|
183
|
+
outputPricePerMTok: number
|
|
184
|
+
/** Fast-mode prompt-cache read price per million tokens in USD. */
|
|
185
|
+
cacheReadPricePerMTok: number
|
|
186
|
+
/** Fast-mode prompt-cache write price per million tokens in USD. */
|
|
187
|
+
cacheWritePricePerMTok: number
|
|
188
|
+
}
|
|
189
|
+
/** Long-context pricing — models priced BY PROMPT LENGTH (Claude Haiku 5.5: 5× above 100K prompt tokens). */
|
|
190
|
+
longContextPricing?: {
|
|
191
|
+
/** A prompt larger than this many tokens bills at the long-context rates. */
|
|
192
|
+
aboveInputTokens: number
|
|
193
|
+
/** Long-context input price per million uncached tokens in USD. */
|
|
194
|
+
inputPricePerMTok: number
|
|
195
|
+
/** Long-context output price per million tokens in USD. */
|
|
196
|
+
outputPricePerMTok: number
|
|
197
|
+
/** Long-context prompt-cache read price per million tokens in USD. */
|
|
198
|
+
cacheReadPricePerMTok: number
|
|
199
|
+
/** Long-context prompt-cache write price per million tokens in USD. */
|
|
200
|
+
cacheWritePricePerMTok: number
|
|
201
|
+
}
|
|
202
|
+
/** Reliable knowledge cutoff date (YYYY-MM-DD). */
|
|
203
|
+
knowledgeCutoff: string
|
|
204
|
+
/** When the model was (or will be) deprecated (YYYY-MM-DD). */
|
|
205
|
+
deprecatedAt?: string
|
|
206
|
+
/** Whether this model is fully disabled — removed from selection and the public listing while remaining priceable for historical usage. */
|
|
207
|
+
disabled?: boolean
|
|
208
|
+
/** The id of the NEWER-generation model that replaces this one, set on the OLDER entry and naming its successor (e.g. `qwen3.7-max` carries `supersededBy: 'qwen3.… */
|
|
209
|
+
supersededBy?: string
|
|
210
|
+
}
|
|
225
211
|
```
|
|
226
212
|
|
|
213
|
+
_(Member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/api-resource-ai-models/dist/types.d.ts`.)_
|
|
214
|
+
|
|
227
215
|
#### `ModeModelDefaults`
|
|
228
216
|
|
|
229
217
|
The model ids the SERVER falls back to per mode/job when the user hasn't
|
|
@@ -617,6 +605,45 @@ Effort is each model's OWN native value — there is no abstract scale (see
|
|
|
617
605
|
- A model with a controllable token budget but no native level names (e.g.
|
|
618
606
|
Claude Haiku 4.5's `budget_tokens`, Qwen's `thinking_budget`) lists
|
|
619
607
|
scaled-budget labels (`['4K', '8K', '16K', '32K']`) with `effortBudgetTokens`
|
|
608
|
+
mapping each label to the token budget it sends.
|
|
609
|
+
- A model whose reasoning is fixed (always-on or on/off only, no depth
|
|
610
|
+
control) carries `thinkingConfigurable: false` and OMITS both fields —
|
|
611
|
+
there is nothing to tune.
|
|
612
|
+
|
|
613
|
+
ONE GENERATION PER FAMILY. When a provider ships a newer generation of a
|
|
614
|
+
model line, the older entry gets `supersededBy: '<newer id>'` and stops being
|
|
615
|
+
offered — the picker never shows both `qwen3.7-max` and `qwen3.8-max`. The
|
|
616
|
+
entry is NEVER deleted: `getModel()` still resolves it so saved selections and
|
|
617
|
+
historical usage stay priceable, and a persisted id resolves forward to the
|
|
618
|
+
successor. Supersede only within the same TIER: a cheaper or specialist model
|
|
619
|
+
with no newer equivalent (`gemini-3.1-pro-preview`, `qwen3-coder-plus`,
|
|
620
|
+
`kimi-k2.7-code`, `grok-build-0.1`) keeps at most `deprecatedAt`, so every
|
|
621
|
+
provider keeps a real choice. `__tests__/lookup.test.ts` fails on any two
|
|
622
|
+
selectable models of one family at different versions that aren't a
|
|
623
|
+
documented exception.
|
|
624
|
+
|
|
625
|
+
Sources (verified 2026-07-28; OpenAI re-verified 2026-07-31 after the
|
|
626
|
+
2026-07-30 GPT-5.6 repricing — cross-check prices against models.dev with
|
|
627
|
+
`npm run check:model-freshness` from the workspace root):
|
|
628
|
+
|
|
629
|
+
- Web search (`webSearchPricePer1k`, billed per search on top of tokens;
|
|
630
|
+
verified 2026-09-25 on each provider's pricing page): Anthropic $10 per
|
|
631
|
+
1,000 searches (failed searches are not billed); OpenAI $10 per 1,000
|
|
632
|
+
web_search_call items on reasoning models; Google $14 per 1,000 search
|
|
633
|
+
queries after 5,000/month free, shared across the account, so not
|
|
634
|
+
modeled; Z.ai $0.01 per use, but its search never runs on a Synthase-shaped
|
|
635
|
+
request, so GLM entries carry no webSearchToolType.
|
|
636
|
+
- Anthropic: https://platform.claude.com/docs/en/about-claude/models/overview
|
|
637
|
+
- /docs/en/build-with-claude/effort (fable-5-1 / opus-5-5 / sonnet-5-5
|
|
638
|
+
current as of 2026-09-29 — see the dated notes below; historically fable-5 / opus-5 / sonnet-5 current;
|
|
639
|
+
opus-4-8 superseded by opus-5 at identical pricing but still served — it is
|
|
640
|
+
the recommended refusal-fallback model; effort ladder on all three current
|
|
641
|
+
models is low|medium|high|xhigh|max; budget_tokens 400s on 4.7+)
|
|
642
|
+
(re-verified 2026-08-06: added opus-4-7 — legacy but Active, $5/$25,
|
|
643
|
+
cache $0.50/$6.25, 1M ctx / 128K out per the overview + pricing pages;
|
|
644
|
+
models.dev first listed it 2026-08-06)
|
|
645
|
+
(re-verified 2026-09-01 on /docs/en/about-claude/pricing: sonnet-5's
|
|
646
|
+
$2/$10 launch pricing is now the STANDARD price — that page's own note
|
|
620
647
|
|
|
621
648
|
_(description truncated — read the full text in `node_modules/@molecule/api-resource-ai-models/dist/models.d.ts`.)_
|
|
622
649
|
|
package/package.json
CHANGED