mohdel 0.119.0 → 0.121.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 +5 -0
- package/config/curated.schema.json +429 -58
- package/js/core/envelope.js +8 -0
- package/js/core/model-id.js +47 -13
- package/js/factory/bridge.js +1 -0
- package/js/session/adapters/_cancelled.js +1 -2
- package/js/session/adapters/_catalog.js +16 -0
- package/js/session/adapters/_chat_completions.js +1 -1
- package/js/session/adapters/_errors.js +24 -1
- package/js/session/adapters/_pricing.js +7 -4
- package/js/session/adapters/_speed.js +87 -0
- package/js/session/adapters/anthropic.js +1 -1
- package/js/session/adapters/gemini.js +1 -1
- package/js/session/adapters/openai.js +70 -1
- package/js/session/run.js +117 -38
- package/package.json +5 -5
- package/src/cli/ask.js +6 -0
- package/src/cli/check.js +19 -0
- package/src/lib/index.js +55 -3
- package/src/lib/schema.js +21 -0
package/README.md
CHANGED
|
@@ -101,6 +101,9 @@ mo ask anthropic/claude-sonnet-4-6 --stream "write a haiku about recursion"
|
|
|
101
101
|
# With thinking effort
|
|
102
102
|
mo ask anthropic/claude-opus-4-6 --effort high "prove P != NP"
|
|
103
103
|
|
|
104
|
+
# On a faster service lane, when the model sells one
|
|
105
|
+
mo ask openai/gpt-5.6-luna@fast "triage this alert"
|
|
106
|
+
|
|
104
107
|
# Speech → text from an audio file
|
|
105
108
|
mo transcribe groq/whisper-large-v3-turbo meeting.mp3
|
|
106
109
|
mo transcribe mistral/voxtral-mini-transcribe interview.wav --language fr
|
|
@@ -315,6 +318,8 @@ What each provider supports through mohdel's unified interface:
|
|
|
315
318
|
|
|
316
319
|
Adapter capability ≠ model capability — whether a given model accepts images, tools, or thinking effort depends on the model spec in `curated.json`. The adapter passes through what the envelope supplies; the provider rejects unsupported combos.
|
|
317
320
|
|
|
321
|
+
**Service speeds** are the exception to that pass-through rule. Where a provider sells the same weights at several speeds (OpenAI's `service_tier`, and equivalents elsewhere), the lanes a model sells are declared in its `curated.json` entry under `speeds`, with their own prices and rate limits. Select one with `speed` or the `@lane` id suffix. There is no default lane and no fallback: an undeclared lane fails the call before it is sent, because a model that silently ignores an unsupported lane would otherwise be billed at the lane's rates for standard service. See [docs/CATALOG.md](docs/CATALOG.md#service-speeds).
|
|
322
|
+
|
|
318
323
|
## Local Development
|
|
319
324
|
|
|
320
325
|
```bash
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://github.com/clbrge/mohdel/blob/main/config/curated.schema.json",
|
|
4
4
|
"title": "Mohdel curated.json",
|
|
5
|
-
"description": "Schema for ~/.config/mohdel/curated.json
|
|
5
|
+
"description": "Schema for ~/.config/mohdel/curated.json \u2014 see docs/CATALOG.md for the full reference.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"propertyNames": {
|
|
8
8
|
"pattern": "^([a-z0-9_-]+/.+|_[a-zA-Z0-9_-]+)$",
|
|
@@ -10,16 +10,25 @@
|
|
|
10
10
|
},
|
|
11
11
|
"additionalProperties": {
|
|
12
12
|
"oneOf": [
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
{
|
|
14
|
+
"$ref": "#/$defs/deprecatedStub"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"$ref": "#/$defs/modelEntry"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Inline comment value for underscore-prefixed keys."
|
|
22
|
+
}
|
|
16
23
|
]
|
|
17
24
|
},
|
|
18
25
|
"$defs": {
|
|
19
26
|
"deprecatedStub": {
|
|
20
27
|
"type": "object",
|
|
21
28
|
"description": "Redirect from a retired model id to its replacement.",
|
|
22
|
-
"required": [
|
|
29
|
+
"required": [
|
|
30
|
+
"deprecated"
|
|
31
|
+
],
|
|
23
32
|
"additionalProperties": true,
|
|
24
33
|
"properties": {
|
|
25
34
|
"deprecated": {
|
|
@@ -31,7 +40,11 @@
|
|
|
31
40
|
"modelEntry": {
|
|
32
41
|
"type": "object",
|
|
33
42
|
"description": "A real model entry. 'model', 'creator', and 'inputFormat' are required.",
|
|
34
|
-
"required": [
|
|
43
|
+
"required": [
|
|
44
|
+
"model",
|
|
45
|
+
"creator",
|
|
46
|
+
"inputFormat"
|
|
47
|
+
],
|
|
35
48
|
"additionalProperties": true,
|
|
36
49
|
"properties": {
|
|
37
50
|
"model": {
|
|
@@ -45,7 +58,15 @@
|
|
|
45
58
|
"inputFormat": {
|
|
46
59
|
"type": "array",
|
|
47
60
|
"description": "Accepted input modalities. Defaults to ['text'].",
|
|
48
|
-
"items": {
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"enum": [
|
|
64
|
+
"text",
|
|
65
|
+
"image",
|
|
66
|
+
"video",
|
|
67
|
+
"audio"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
49
70
|
"minItems": 1,
|
|
50
71
|
"uniqueItems": true
|
|
51
72
|
},
|
|
@@ -53,104 +74,454 @@
|
|
|
53
74
|
"type": "string",
|
|
54
75
|
"description": "Routing provider. Defaults to the provider segment of the catalog key."
|
|
55
76
|
},
|
|
56
|
-
"sdk": {
|
|
77
|
+
"sdk": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "SDK adapter to use (some providers require this)."
|
|
80
|
+
},
|
|
57
81
|
"type": {
|
|
58
82
|
"type": "string",
|
|
59
|
-
"enum": [
|
|
83
|
+
"enum": [
|
|
84
|
+
"model",
|
|
85
|
+
"image",
|
|
86
|
+
"transcription"
|
|
87
|
+
],
|
|
60
88
|
"default": "model",
|
|
61
89
|
"description": "'model' for chat/completion, 'image' for image generation, 'transcription' for speech-to-text."
|
|
62
90
|
},
|
|
63
|
-
"label": {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
91
|
+
"label": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "Human-readable name shown in UIs."
|
|
94
|
+
},
|
|
95
|
+
"description": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
"version": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
},
|
|
101
|
+
"createdAt": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"format": "date-time"
|
|
104
|
+
},
|
|
105
|
+
"created": {
|
|
106
|
+
"type": "number",
|
|
107
|
+
"description": "Unix timestamp (seconds)."
|
|
108
|
+
},
|
|
69
109
|
"inputPrice": {
|
|
70
110
|
"oneOf": [
|
|
71
|
-
{
|
|
72
|
-
|
|
111
|
+
{
|
|
112
|
+
"type": "number",
|
|
113
|
+
"minimum": 0
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": [
|
|
118
|
+
"default"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": {
|
|
121
|
+
"type": "number"
|
|
122
|
+
},
|
|
123
|
+
"properties": {
|
|
124
|
+
"default": {
|
|
125
|
+
"type": "number"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
73
129
|
],
|
|
74
|
-
"description": "USD per 1M input tokens. Object form is for tiered pricing
|
|
130
|
+
"description": "USD per 1M input tokens. Object form is for tiered pricing \u2014 must include a 'default' key."
|
|
75
131
|
},
|
|
76
132
|
"outputPrice": {
|
|
77
133
|
"oneOf": [
|
|
78
|
-
{
|
|
79
|
-
|
|
134
|
+
{
|
|
135
|
+
"type": "number",
|
|
136
|
+
"minimum": 0
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "object",
|
|
140
|
+
"required": [
|
|
141
|
+
"default"
|
|
142
|
+
],
|
|
143
|
+
"additionalProperties": {
|
|
144
|
+
"type": "number"
|
|
145
|
+
},
|
|
146
|
+
"properties": {
|
|
147
|
+
"default": {
|
|
148
|
+
"type": "number"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
80
152
|
],
|
|
81
153
|
"description": "USD per 1M output tokens."
|
|
82
154
|
},
|
|
83
155
|
"thinkingPrice": {
|
|
84
156
|
"oneOf": [
|
|
85
|
-
{
|
|
86
|
-
|
|
157
|
+
{
|
|
158
|
+
"type": "number",
|
|
159
|
+
"minimum": 0
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "object",
|
|
163
|
+
"required": [
|
|
164
|
+
"default"
|
|
165
|
+
],
|
|
166
|
+
"additionalProperties": {
|
|
167
|
+
"type": "number"
|
|
168
|
+
},
|
|
169
|
+
"properties": {
|
|
170
|
+
"default": {
|
|
171
|
+
"type": "number"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
87
175
|
],
|
|
88
176
|
"description": "USD per 1M thinking/reasoning tokens (when the provider bills these separately)."
|
|
89
177
|
},
|
|
90
|
-
"cacheWritePrice": {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
178
|
+
"cacheWritePrice": {
|
|
179
|
+
"oneOf": [
|
|
180
|
+
{
|
|
181
|
+
"type": "number",
|
|
182
|
+
"minimum": 0
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "object",
|
|
186
|
+
"required": [
|
|
187
|
+
"default"
|
|
188
|
+
],
|
|
189
|
+
"additionalProperties": {
|
|
190
|
+
"type": "number"
|
|
191
|
+
},
|
|
192
|
+
"properties": {
|
|
193
|
+
"default": {
|
|
194
|
+
"type": "number"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"description": "USD per 1M tokens written to provider-side prompt cache. Object form is tiered on input tokens."
|
|
200
|
+
},
|
|
201
|
+
"cacheWrite1hPrice": {
|
|
202
|
+
"oneOf": [
|
|
203
|
+
{
|
|
204
|
+
"type": "number",
|
|
205
|
+
"minimum": 0
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"type": "object",
|
|
209
|
+
"required": [
|
|
210
|
+
"default"
|
|
211
|
+
],
|
|
212
|
+
"additionalProperties": {
|
|
213
|
+
"type": "number"
|
|
214
|
+
},
|
|
215
|
+
"properties": {
|
|
216
|
+
"default": {
|
|
217
|
+
"type": "number"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"description": "USD per 1M tokens written with a 1h TTL, when the provider prices that above the default write rate. Falls back to cacheWritePrice."
|
|
223
|
+
},
|
|
224
|
+
"cacheReadPrice": {
|
|
225
|
+
"oneOf": [
|
|
226
|
+
{
|
|
227
|
+
"type": "number",
|
|
228
|
+
"minimum": 0
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "object",
|
|
232
|
+
"required": [
|
|
233
|
+
"default"
|
|
234
|
+
],
|
|
235
|
+
"additionalProperties": {
|
|
236
|
+
"type": "number"
|
|
237
|
+
},
|
|
238
|
+
"properties": {
|
|
239
|
+
"default": {
|
|
240
|
+
"type": "number"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"description": "USD per 1M tokens served from provider-side prompt cache. Object form is tiered on input tokens."
|
|
246
|
+
},
|
|
247
|
+
"contextTokenLimit": {
|
|
248
|
+
"type": "integer",
|
|
249
|
+
"minimum": 1,
|
|
250
|
+
"description": "Maximum total tokens (input + output)."
|
|
251
|
+
},
|
|
252
|
+
"outputTokenLimit": {
|
|
253
|
+
"type": "integer",
|
|
254
|
+
"minimum": 1,
|
|
255
|
+
"description": "Maximum output tokens per call."
|
|
256
|
+
},
|
|
257
|
+
"thinkingTokenLimit": {
|
|
258
|
+
"type": "integer",
|
|
259
|
+
"minimum": 1,
|
|
260
|
+
"description": "Maximum thinking tokens per call (when separate from output)."
|
|
261
|
+
},
|
|
262
|
+
"tokenizerHeadroom": {
|
|
263
|
+
"type": "number",
|
|
264
|
+
"exclusiveMinimum": 0,
|
|
265
|
+
"description": "Multiplier applied to local token estimates to account for tokenizer drift."
|
|
266
|
+
},
|
|
98
267
|
"thinkingEffortLevels": {
|
|
99
268
|
"oneOf": [
|
|
100
|
-
{
|
|
269
|
+
{
|
|
270
|
+
"type": "null"
|
|
271
|
+
},
|
|
101
272
|
{
|
|
102
273
|
"type": "object",
|
|
103
|
-
"description": "Map effort name
|
|
104
|
-
"additionalProperties": {
|
|
274
|
+
"description": "Map effort name \u2192 provider-native budget. Standard names: low/medium/high/xhigh/max/none.",
|
|
275
|
+
"additionalProperties": {
|
|
276
|
+
"type": "number",
|
|
277
|
+
"minimum": 0
|
|
278
|
+
}
|
|
105
279
|
}
|
|
106
280
|
]
|
|
107
281
|
},
|
|
108
|
-
"defaultThinkingEffort": {
|
|
109
|
-
|
|
282
|
+
"defaultThinkingEffort": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"description": "Effort level used when the envelope omits 'outputEffort'."
|
|
285
|
+
},
|
|
286
|
+
"speeds": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"description": "Service speed lanes this model sells, keyed by lane name. A lane is a provider request parameter buying a different speed/price point for the same weights. There is no default lane: omitting 'speed' on the envelope sends no parameter. Only lanes declared here may be requested, and only names the provider's adapter accepts.",
|
|
289
|
+
"additionalProperties": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"additionalProperties": false,
|
|
292
|
+
"description": "Lane overlay: the price and rate-limit fields that differ from the base entry. Unnamed fields fall through. Lane names come from the provider's own vocabulary (OpenAI: fast, priority, flex, scale) \u2014 the adapter decides how a name reaches the wire.",
|
|
293
|
+
"properties": {
|
|
294
|
+
"inputPrice": {
|
|
295
|
+
"oneOf": [
|
|
296
|
+
{
|
|
297
|
+
"type": "number",
|
|
298
|
+
"minimum": 0
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"type": "object",
|
|
302
|
+
"required": [
|
|
303
|
+
"default"
|
|
304
|
+
],
|
|
305
|
+
"additionalProperties": {
|
|
306
|
+
"type": "number"
|
|
307
|
+
},
|
|
308
|
+
"properties": {
|
|
309
|
+
"default": {
|
|
310
|
+
"type": "number"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"outputPrice": {
|
|
317
|
+
"oneOf": [
|
|
318
|
+
{
|
|
319
|
+
"type": "number",
|
|
320
|
+
"minimum": 0
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"type": "object",
|
|
324
|
+
"required": [
|
|
325
|
+
"default"
|
|
326
|
+
],
|
|
327
|
+
"additionalProperties": {
|
|
328
|
+
"type": "number"
|
|
329
|
+
},
|
|
330
|
+
"properties": {
|
|
331
|
+
"default": {
|
|
332
|
+
"type": "number"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
"thinkingPrice": {
|
|
339
|
+
"oneOf": [
|
|
340
|
+
{
|
|
341
|
+
"type": "number",
|
|
342
|
+
"minimum": 0
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"type": "object",
|
|
346
|
+
"required": [
|
|
347
|
+
"default"
|
|
348
|
+
],
|
|
349
|
+
"additionalProperties": {
|
|
350
|
+
"type": "number"
|
|
351
|
+
},
|
|
352
|
+
"properties": {
|
|
353
|
+
"default": {
|
|
354
|
+
"type": "number"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
"cacheWritePrice": {
|
|
361
|
+
"oneOf": [
|
|
362
|
+
{
|
|
363
|
+
"type": "number",
|
|
364
|
+
"minimum": 0
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"type": "object",
|
|
368
|
+
"required": [
|
|
369
|
+
"default"
|
|
370
|
+
],
|
|
371
|
+
"additionalProperties": {
|
|
372
|
+
"type": "number"
|
|
373
|
+
},
|
|
374
|
+
"properties": {
|
|
375
|
+
"default": {
|
|
376
|
+
"type": "number"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"cacheWrite1hPrice": {
|
|
383
|
+
"oneOf": [
|
|
384
|
+
{
|
|
385
|
+
"type": "number",
|
|
386
|
+
"minimum": 0
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"type": "object",
|
|
390
|
+
"required": [
|
|
391
|
+
"default"
|
|
392
|
+
],
|
|
393
|
+
"additionalProperties": {
|
|
394
|
+
"type": "number"
|
|
395
|
+
},
|
|
396
|
+
"properties": {
|
|
397
|
+
"default": {
|
|
398
|
+
"type": "number"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
"cacheReadPrice": {
|
|
405
|
+
"oneOf": [
|
|
406
|
+
{
|
|
407
|
+
"type": "number",
|
|
408
|
+
"minimum": 0
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"type": "object",
|
|
412
|
+
"required": [
|
|
413
|
+
"default"
|
|
414
|
+
],
|
|
415
|
+
"additionalProperties": {
|
|
416
|
+
"type": "number"
|
|
417
|
+
},
|
|
418
|
+
"properties": {
|
|
419
|
+
"default": {
|
|
420
|
+
"type": "number"
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"rpmLimit": {
|
|
427
|
+
"type": "integer",
|
|
428
|
+
"minimum": 1
|
|
429
|
+
},
|
|
430
|
+
"tpmLimit": {
|
|
431
|
+
"type": "integer",
|
|
432
|
+
"minimum": 1
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
110
437
|
"tags": {
|
|
111
438
|
"type": "array",
|
|
112
|
-
"items": {
|
|
439
|
+
"items": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9._-]{0,31}$"
|
|
442
|
+
},
|
|
113
443
|
"uniqueItems": true,
|
|
114
444
|
"description": "Free-form classification tags (used by 'mo bench --tag', 'mo rank', and caller-side selection)."
|
|
115
445
|
},
|
|
116
446
|
"aliases": {
|
|
117
447
|
"type": "array",
|
|
118
|
-
"items": {
|
|
448
|
+
"items": {
|
|
449
|
+
"type": "string"
|
|
450
|
+
},
|
|
119
451
|
"description": "Alternative ids that should resolve to this entry."
|
|
120
452
|
},
|
|
121
453
|
"replaces": {
|
|
122
454
|
"type": "array",
|
|
123
|
-
"items": {
|
|
455
|
+
"items": {
|
|
456
|
+
"type": "string"
|
|
457
|
+
},
|
|
124
458
|
"description": "Older model ids this one supersedes."
|
|
125
459
|
},
|
|
126
460
|
"leaderboard": {
|
|
127
461
|
"type": "array",
|
|
128
|
-
"items": {
|
|
462
|
+
"items": {
|
|
463
|
+
"type": "number"
|
|
464
|
+
},
|
|
129
465
|
"minItems": 3,
|
|
130
466
|
"maxItems": 3,
|
|
131
|
-
"description": "[intelligence, speed, latency] triple
|
|
132
|
-
},
|
|
133
|
-
"leaderboardNote": {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
467
|
+
"description": "[intelligence, speed, latency] triple \u2014 drives 'mo rank'."
|
|
468
|
+
},
|
|
469
|
+
"leaderboardNote": {
|
|
470
|
+
"type": "string"
|
|
471
|
+
},
|
|
472
|
+
"supportsTools": {
|
|
473
|
+
"type": "boolean",
|
|
474
|
+
"description": "Set false to mark a model as tool-less."
|
|
475
|
+
},
|
|
476
|
+
"imagePrice": {
|
|
477
|
+
"type": "number",
|
|
478
|
+
"minimum": 0,
|
|
479
|
+
"description": "USD per generated image (image-type entries)."
|
|
480
|
+
},
|
|
481
|
+
"imageEndpoint": {
|
|
482
|
+
"type": "string",
|
|
483
|
+
"description": "Provider-side image endpoint name."
|
|
484
|
+
},
|
|
485
|
+
"imageDefaultSize": {
|
|
486
|
+
"type": "string",
|
|
487
|
+
"description": "Default size when envelope omits one (e.g. '1024x1024')."
|
|
488
|
+
},
|
|
489
|
+
"transcriptionPrice": {
|
|
490
|
+
"type": "number",
|
|
491
|
+
"minimum": 0,
|
|
492
|
+
"description": "USD per audio minute (transcription-type entries). Token-billed transcription models (OpenAI gpt-4o-*-transcribe) use inputPrice/outputPrice instead."
|
|
493
|
+
},
|
|
494
|
+
"rpmLimit": {
|
|
495
|
+
"type": "integer",
|
|
496
|
+
"minimum": 1,
|
|
497
|
+
"description": "Requests per minute. Overrides provider default."
|
|
498
|
+
},
|
|
499
|
+
"tpmLimit": {
|
|
500
|
+
"type": "integer",
|
|
501
|
+
"minimum": 1,
|
|
502
|
+
"description": "Tokens per minute. Overrides provider default."
|
|
503
|
+
},
|
|
144
504
|
"rateLimitScope": {
|
|
145
505
|
"type": "string",
|
|
146
|
-
"enum": [
|
|
506
|
+
"enum": [
|
|
507
|
+
"model",
|
|
508
|
+
"provider"
|
|
509
|
+
],
|
|
147
510
|
"description": "'model' = private budget. 'provider' = shared with provider-level pool."
|
|
148
511
|
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
512
|
+
"deprecated": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"description": "If present, this entry is treated as a stub (use 'deprecatedStub' shape)."
|
|
515
|
+
},
|
|
516
|
+
"suspended": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"description": "Reason this model is temporarily disabled."
|
|
519
|
+
},
|
|
520
|
+
"displayName": {
|
|
521
|
+
"type": "string",
|
|
522
|
+
"deprecated": true,
|
|
523
|
+
"description": "Deprecated \u2014 use 'label'."
|
|
524
|
+
}
|
|
154
525
|
}
|
|
155
526
|
}
|
|
156
527
|
}
|
package/js/core/envelope.js
CHANGED
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
* Thinking effort level. Valid keys are per-model — validated at
|
|
44
44
|
* runtime against the curated entry's `thinkingEffortLevels`.
|
|
45
45
|
* Default is the model's `defaultThinkingEffort`.
|
|
46
|
+
* @property {string} [speed]
|
|
47
|
+
* Service speed lane. Valid keys are per-model — validated at
|
|
48
|
+
* runtime against the curated entry's `speeds`. There is no
|
|
49
|
+
* default and no fallback: omitting the field sends no speed
|
|
50
|
+
* parameter, while naming a lane the entry does not declare
|
|
51
|
+
* (`SESSION_INVALID_SPEED`) or the provider's adapter cannot emit
|
|
52
|
+
* (`SESSION_SPEED_NOT_IMPLEMENTED`) fails the call before dispatch.
|
|
46
53
|
*
|
|
47
54
|
* @property {MediaRef[]} [images]
|
|
48
55
|
* @property {MediaRef[]} [videos]
|
|
@@ -146,6 +153,7 @@ export const ENVELOPE_FIELDS = Object.freeze([
|
|
|
146
153
|
'outputType',
|
|
147
154
|
'outputStyle',
|
|
148
155
|
'outputEffort',
|
|
156
|
+
'speed',
|
|
149
157
|
'images',
|
|
150
158
|
'videos',
|
|
151
159
|
'cache',
|