@mlx-node/server 0.0.0 → 0.0.8
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/dist/chat-session-warm-reuse.d.ts +51 -0
- package/dist/chat-session-warm-reuse.d.ts.map +1 -0
- package/dist/chat-session-warm-reuse.js +68 -0
- package/dist/endpoints/messages-count-tokens.d.ts +8 -0
- package/dist/endpoints/messages-count-tokens.d.ts.map +1 -0
- package/dist/endpoints/messages-count-tokens.js +121 -0
- package/dist/endpoints/messages.d.ts +57 -5
- package/dist/endpoints/messages.d.ts.map +1 -1
- package/dist/endpoints/messages.js +1043 -147
- package/dist/endpoints/models.d.ts +2 -1
- package/dist/endpoints/models.d.ts.map +1 -1
- package/dist/endpoints/models.js +2 -2
- package/dist/endpoints/responses.d.ts +20 -7
- package/dist/endpoints/responses.d.ts.map +1 -1
- package/dist/endpoints/responses.js +572 -82
- package/dist/errors.d.ts +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +3 -0
- package/dist/handler.d.ts +42 -0
- package/dist/handler.d.ts.map +1 -1
- package/dist/handler.js +6 -1
- package/dist/idle-sweeper.d.ts +245 -0
- package/dist/idle-sweeper.d.ts.map +1 -0
- package/dist/idle-sweeper.js +408 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/mappers/anthropic-request.d.ts +24 -2
- package/dist/mappers/anthropic-request.d.ts.map +1 -1
- package/dist/mappers/anthropic-request.js +222 -24
- package/dist/mappers/anthropic-response.d.ts +29 -4
- package/dist/mappers/anthropic-response.d.ts.map +1 -1
- package/dist/mappers/anthropic-response.js +143 -21
- package/dist/mappers/request.d.ts +48 -0
- package/dist/mappers/request.d.ts.map +1 -1
- package/dist/mappers/request.js +211 -35
- package/dist/mappers/response.d.ts.map +1 -1
- package/dist/mappers/response.js +13 -1
- package/dist/model-work-coordinator.d.ts +70 -0
- package/dist/model-work-coordinator.d.ts.map +1 -0
- package/dist/model-work-coordinator.js +120 -0
- package/dist/pending-writes.d.ts.map +1 -1
- package/dist/presets.d.ts +82 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.js +98 -0
- package/dist/registry.d.ts +31 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +33 -5
- package/dist/router.d.ts +4 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +34 -4
- package/dist/server.d.ts +76 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +48 -1
- package/dist/session-registry.d.ts +272 -18
- package/dist/session-registry.d.ts.map +1 -1
- package/dist/session-registry.js +509 -37
- package/dist/stop-sequence-buffer.d.ts +58 -0
- package/dist/stop-sequence-buffer.d.ts.map +1 -0
- package/dist/stop-sequence-buffer.js +148 -0
- package/dist/text-recovery.d.ts +35 -0
- package/dist/text-recovery.d.ts.map +1 -0
- package/dist/text-recovery.js +41 -0
- package/dist/timing.d.ts +80 -0
- package/dist/timing.d.ts.map +1 -0
- package/dist/timing.js +121 -0
- package/dist/tool-call-buffer.d.ts +5 -5
- package/dist/tool-call-buffer.d.ts.map +1 -1
- package/dist/tool-call-buffer.js +28 -8
- package/dist/types-anthropic.d.ts +161 -1
- package/dist/types-anthropic.d.ts.map +1 -1
- package/dist/types.d.ts +172 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -37,7 +37,7 @@ export interface SystemBlock {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export interface AnthropicMessage {
|
|
40
|
-
role: 'user' | 'assistant';
|
|
40
|
+
role: 'user' | 'assistant' | 'system';
|
|
41
41
|
content: string | AnthropicContentBlock[];
|
|
42
42
|
}
|
|
43
43
|
export interface AnthropicToolDefinition {
|
|
@@ -65,6 +65,40 @@ export interface AnthropicMessagesRequest {
|
|
|
65
65
|
metadata?: {
|
|
66
66
|
user_id?: string;
|
|
67
67
|
};
|
|
68
|
+
output_config?: {
|
|
69
|
+
format?: {
|
|
70
|
+
type?: string;
|
|
71
|
+
schema?: unknown;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* MLX-Node extension carrier for non-Anthropic fields, namespaced
|
|
76
|
+
* under `extra_body` to mirror the OpenAI-side `/v1/responses`
|
|
77
|
+
* surface. Unknown keys are ignored (additive, forward-compat).
|
|
78
|
+
*
|
|
79
|
+
* Currently exposes:
|
|
80
|
+
* * `generation_mode`: `"mtp"` forces W6 speculative-decode (sets
|
|
81
|
+
* `enableMtp = true`), `"ar"` forces plain autoregressive
|
|
82
|
+
* (`enableMtp = false`). Absent / null / unrecognized leaves
|
|
83
|
+
* `enableMtp` untouched so the downstream `ChatSession` auto-
|
|
84
|
+
* default (true when the model ships an MTP head) applies.
|
|
85
|
+
* * `mtp_depth`: positive integer override for the per-call draft
|
|
86
|
+
* depth. The server forwards any positive integer ≤ 64 (a sanity
|
|
87
|
+
* ceiling that only blocks garbage) and the native per-family
|
|
88
|
+
* `resolve_params` owns the real clamps: qwen3.5 native MTP
|
|
89
|
+
* [1, 5], gemma4 DSpark capped at the draft block size, gemma4
|
|
90
|
+
* assistant drafts [1, 8].
|
|
91
|
+
*/
|
|
92
|
+
extra_body?: {
|
|
93
|
+
generation_mode?: string | null;
|
|
94
|
+
mtp_depth?: number | null;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export type AnthropicCountTokensRequest = Omit<AnthropicMessagesRequest, 'max_tokens'> & {
|
|
98
|
+
max_tokens?: number;
|
|
99
|
+
};
|
|
100
|
+
export interface AnthropicCountTokensResponse {
|
|
101
|
+
input_tokens: number;
|
|
68
102
|
}
|
|
69
103
|
export interface AnthropicResponseTextBlock {
|
|
70
104
|
type: 'text';
|
|
@@ -81,9 +115,85 @@ export interface AnthropicResponseToolUseBlock {
|
|
|
81
115
|
input: Record<string, unknown>;
|
|
82
116
|
}
|
|
83
117
|
export type AnthropicResponseContent = AnthropicResponseTextBlock | AnthropicResponseThinkingBlock | AnthropicResponseToolUseBlock;
|
|
118
|
+
/**
|
|
119
|
+
* Anthropic Messages API `usage` block.
|
|
120
|
+
*
|
|
121
|
+
* Per the Anthropic spec the cache accounting fields are OPTIONAL and
|
|
122
|
+
* carry distinct semantics that drive client-side cost / billing
|
|
123
|
+
* displays (Claude Code reads `cache_read_input_tokens` directly):
|
|
124
|
+
*
|
|
125
|
+
* * `input_tokens` — prompt tokens that were processed at full cost
|
|
126
|
+
* this turn. When a cached prefix is reused, this MUST be reduced
|
|
127
|
+
* to the unsuffixed remainder (`promptTokens - cachedTokens`) so
|
|
128
|
+
* the client doesn't double-count the cached prefix.
|
|
129
|
+
* * `cache_read_input_tokens` — prompt tokens served from a cached
|
|
130
|
+
* prefix on this turn. Emitted only when reuse genuinely happened
|
|
131
|
+
* (`cachedTokens > 0`); omitted on a cold turn so the wire matches
|
|
132
|
+
* other Anthropic-compatible servers that elide the field on cache
|
|
133
|
+
* misses.
|
|
134
|
+
* * `cache_creation_input_tokens` — prompt tokens written to a NEW
|
|
135
|
+
* cache entry. Currently always omitted: this server's KV reuse
|
|
136
|
+
* is implicit and has no `cache_control` breakpoints, so a client
|
|
137
|
+
* that did not request explicit caching should never see a
|
|
138
|
+
* non-zero creation count.
|
|
139
|
+
*
|
|
140
|
+
* The timing fields below are NON-Anthropic extension fields surfaced
|
|
141
|
+
* for the launcher's verbose log (`requests.ndjson`) so per-turn
|
|
142
|
+
* decode-rate / TTFT / prefill-rate telemetry rides the same response
|
|
143
|
+
* envelope. They describe native/server inference timing, not the
|
|
144
|
+
* HTTP logger's outer `elapsedMs` envelope. They are emitted only when
|
|
145
|
+
* the underlying native dispatch produced a finite, positive value —
|
|
146
|
+
* missing or non-finite metrics are elided rather than surfaced as
|
|
147
|
+
* zero / null. Anthropic-compatible clients (Claude Code, official
|
|
148
|
+
* Anthropic SDKs) ignore unknown fields, so the extension is wire-safe
|
|
149
|
+
* — it parallels how `cache_read_input_tokens` is treated above.
|
|
150
|
+
*
|
|
151
|
+
* `prefill_input_tokens` and `cached_prefix_tokens` provide the
|
|
152
|
+
* denominator/context for `prefill_tokens_per_second`: on cached-prefix
|
|
153
|
+
* turns the prefill rate is for the uncached suffix, not the full
|
|
154
|
+
* logical prompt.
|
|
155
|
+
*/
|
|
84
156
|
export interface AnthropicUsage {
|
|
85
157
|
input_tokens: number;
|
|
86
158
|
output_tokens: number;
|
|
159
|
+
cache_read_input_tokens?: number;
|
|
160
|
+
cache_creation_input_tokens?: number;
|
|
161
|
+
/** Server-extension: time-to-first-token in milliseconds. */
|
|
162
|
+
time_to_first_token_ms?: number;
|
|
163
|
+
/** Server-extension: prompt-token throughput during prefill. */
|
|
164
|
+
prefill_tokens_per_second?: number;
|
|
165
|
+
/** Server-extension: generated-token throughput during decode. */
|
|
166
|
+
decode_tokens_per_second?: number;
|
|
167
|
+
/** Server-extension: native/server inference elapsed, excluding HTTP transport and logging overhead. */
|
|
168
|
+
server_inference_elapsed_ms?: number;
|
|
169
|
+
/** Server-extension alias for disambiguating native TTFT from request/HTTP elapsed time. */
|
|
170
|
+
server_time_to_first_token_ms?: number;
|
|
171
|
+
/** Server-extension: handler-start to first native token, including model resolve/load and queue wait. */
|
|
172
|
+
server_total_time_to_first_token_ms?: number;
|
|
173
|
+
/** Server-extension alias for native prefill throughput. */
|
|
174
|
+
server_prefill_tokens_per_second?: number;
|
|
175
|
+
/** Server-extension alias for native decode throughput. */
|
|
176
|
+
server_decode_tokens_per_second?: number;
|
|
177
|
+
/** Server-extension: prompt tokens actually prefetched this turn after cached-prefix reuse. */
|
|
178
|
+
prefill_input_tokens?: number;
|
|
179
|
+
/** Server-extension: prompt tokens skipped because a cached prefix was reused. */
|
|
180
|
+
cached_prefix_tokens?: number;
|
|
181
|
+
/** Server-extension: time spent resolving/loading/aliasing the requested model before registry lookup. */
|
|
182
|
+
server_model_resolve_ms?: number;
|
|
183
|
+
/** Server-extension: wall-clock time blocked on the process-wide model-load writer lock. */
|
|
184
|
+
server_load_wait_ms?: number;
|
|
185
|
+
/** Server-extension: true when this request acquired the model-load lock without contention. */
|
|
186
|
+
server_load_owner?: boolean;
|
|
187
|
+
/** Server-extension: time spent waiting behind the per-model execution mutex. */
|
|
188
|
+
server_queue_ms?: number;
|
|
189
|
+
/** Server-extension: handler time before native inference begins, including resolve and queue wait. */
|
|
190
|
+
server_pre_inference_ms?: number;
|
|
191
|
+
/** Server-extension: effective process-level paged-prefill chunk size. */
|
|
192
|
+
server_paged_prefill_chunk_size?: number;
|
|
193
|
+
/** Server-extension: effective process-level paged-prefill eval/clear cadence. */
|
|
194
|
+
server_paged_prefill_eval_interval?: number;
|
|
195
|
+
/** Server-extension: effective process-level paged-decode cache-clear cadence. */
|
|
196
|
+
server_paged_decode_cache_clear_interval?: number;
|
|
87
197
|
}
|
|
88
198
|
export interface AnthropicMessagesResponse {
|
|
89
199
|
id: string;
|
|
@@ -132,9 +242,59 @@ export interface AnthropicMessageDeltaEvent {
|
|
|
132
242
|
stop_reason: string | null;
|
|
133
243
|
stop_sequence: string | null;
|
|
134
244
|
};
|
|
245
|
+
/**
|
|
246
|
+
* Streaming `message_delta` carries the SAME cache-accounting
|
|
247
|
+
* semantics as the non-streaming response `usage` block (see
|
|
248
|
+
* `AnthropicUsage` above) — `input_tokens` MUST be net of any reused
|
|
249
|
+
* prefix, and `cache_read_input_tokens` is emitted only on a true
|
|
250
|
+
* reuse turn.
|
|
251
|
+
*
|
|
252
|
+
* Timing/accounting fields are server extensions (not in
|
|
253
|
+
* Anthropic's spec) surfaced for the launcher's verbose log; see
|
|
254
|
+
* the docstring on `AnthropicUsage`. Clients that do not recognize
|
|
255
|
+
* them ignore them.
|
|
256
|
+
*/
|
|
135
257
|
usage: {
|
|
136
258
|
input_tokens?: number;
|
|
137
259
|
output_tokens: number;
|
|
260
|
+
cache_read_input_tokens?: number;
|
|
261
|
+
cache_creation_input_tokens?: number;
|
|
262
|
+
/** Server-extension: time-to-first-token in milliseconds. */
|
|
263
|
+
time_to_first_token_ms?: number;
|
|
264
|
+
/** Server-extension: prompt-token throughput during prefill. */
|
|
265
|
+
prefill_tokens_per_second?: number;
|
|
266
|
+
/** Server-extension: generated-token throughput during decode. */
|
|
267
|
+
decode_tokens_per_second?: number;
|
|
268
|
+
/** Server-extension: native/server inference elapsed, excluding HTTP transport and logging overhead. */
|
|
269
|
+
server_inference_elapsed_ms?: number;
|
|
270
|
+
/** Server-extension alias for disambiguating native TTFT from request/HTTP elapsed time. */
|
|
271
|
+
server_time_to_first_token_ms?: number;
|
|
272
|
+
/** Server-extension: handler-start to first native token, including model resolve/load and queue wait. */
|
|
273
|
+
server_total_time_to_first_token_ms?: number;
|
|
274
|
+
/** Server-extension alias for native prefill throughput. */
|
|
275
|
+
server_prefill_tokens_per_second?: number;
|
|
276
|
+
/** Server-extension alias for native decode throughput. */
|
|
277
|
+
server_decode_tokens_per_second?: number;
|
|
278
|
+
/** Server-extension: prompt tokens actually prefetched this turn after cached-prefix reuse. */
|
|
279
|
+
prefill_input_tokens?: number;
|
|
280
|
+
/** Server-extension: prompt tokens skipped because a cached prefix was reused. */
|
|
281
|
+
cached_prefix_tokens?: number;
|
|
282
|
+
/** Server-extension: time spent resolving/loading/aliasing the requested model before registry lookup. */
|
|
283
|
+
server_model_resolve_ms?: number;
|
|
284
|
+
/** Server-extension: wall-clock time blocked on the process-wide model-load writer lock. */
|
|
285
|
+
server_load_wait_ms?: number;
|
|
286
|
+
/** Server-extension: true when this request acquired the model-load lock without contention. */
|
|
287
|
+
server_load_owner?: boolean;
|
|
288
|
+
/** Server-extension: time spent waiting behind the per-model execution mutex. */
|
|
289
|
+
server_queue_ms?: number;
|
|
290
|
+
/** Server-extension: handler time before native inference begins, including resolve and queue wait. */
|
|
291
|
+
server_pre_inference_ms?: number;
|
|
292
|
+
/** Server-extension: effective process-level paged-prefill chunk size. */
|
|
293
|
+
server_paged_prefill_chunk_size?: number;
|
|
294
|
+
/** Server-extension: effective process-level paged-prefill eval/clear cadence. */
|
|
295
|
+
server_paged_prefill_eval_interval?: number;
|
|
296
|
+
/** Server-extension: effective process-level paged-decode cache-clear cadence. */
|
|
297
|
+
server_paged_decode_cache_clear_interval?: number;
|
|
138
298
|
};
|
|
139
299
|
}
|
|
140
300
|
export interface AnthropicMessageStopEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-anthropic.d.ts","sourceRoot":"","sources":["../src/types-anthropic.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAE5G,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,yJAAyJ;IACzJ,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,yBAAyB,GAAG,0BAA0B,CAAC,EAAE,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,qBAAqB,GAC7B,yBAAyB,GACzB,0BAA0B,GAC1B,+BAA+B,GAC/B,4BAA4B,GAC5B,6BAA6B,CAAC;AAMlC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,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,CAAC;QAC7C,4DAA4D;QAC5D,gCAAgC,CAAC,EAAE,MAAM,CAAC;QAC1C,2DAA2D;QAC3D,+BAA+B,CAAC,EAAE,MAAM,CAAC;QACzC,+FAA+F;QAC/F,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,kFAAkF;QAClF,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,0GAA0G;QAC1G,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,4FAA4F;QAC5F,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,gGAAgG;QAChG,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,iFAAiF;QACjF,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,uGAAuG;QACvG,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,0EAA0E;QAC1E,+BAA+B,CAAC,EAAE,MAAM,CAAC;QACzC,kFAAkF;QAClF,kCAAkC,CAAC,EAAE,MAAM,CAAC;QAC5C,kFAAkF;QAClF,wCAAwC,CAAC,EAAE,MAAM,CAAC;KACnD,CAAC;CACH;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAC5B,0BAA0B,GAC1B,+BAA+B,GAC/B,+BAA+B,GAC/B,8BAA8B,GAC9B,0BAA0B,GAC1B,yBAAyB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,41 @@ export interface InputTextPart {
|
|
|
3
3
|
type: 'input_text';
|
|
4
4
|
text: string;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* An image attached to a user message. `image_url` may be an `http(s)://` URL
|
|
8
|
+
* (not fetched by the mapper) or a `data:<mime>;base64,<payload>` URL
|
|
9
|
+
* (decoded and forwarded to the model as raw bytes).
|
|
10
|
+
*/
|
|
11
|
+
export interface InputImagePart {
|
|
12
|
+
type: 'input_image';
|
|
13
|
+
image_url?: string;
|
|
14
|
+
file_id?: string;
|
|
15
|
+
detail?: 'auto' | 'low' | 'high';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Echoed back by clients (Codex, pi-ai, etc.) when they replay prior
|
|
19
|
+
* assistant turns in `input[]` instead of using `previous_response_id`.
|
|
20
|
+
* Equivalent to `InputTextPart` for mapping purposes — we only need the text.
|
|
21
|
+
*/
|
|
22
|
+
export interface InputAssistantTextPart {
|
|
23
|
+
type: 'output_text';
|
|
24
|
+
text: string;
|
|
25
|
+
annotations?: never[];
|
|
26
|
+
}
|
|
27
|
+
/** Echoed back by clients when replaying a refusal block from a prior turn. */
|
|
28
|
+
export interface InputRefusalPart {
|
|
29
|
+
type: 'refusal';
|
|
30
|
+
refusal: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Some clients inline a reasoning summary as a content part on an assistant
|
|
34
|
+
* message instead of as a top-level `reasoning` input item.
|
|
35
|
+
*/
|
|
36
|
+
export interface InputSummaryTextPart {
|
|
37
|
+
type: 'summary_text';
|
|
38
|
+
text: string;
|
|
39
|
+
}
|
|
40
|
+
export type ContentPart = InputTextPart | InputImagePart | InputAssistantTextPart | InputRefusalPart | InputSummaryTextPart;
|
|
7
41
|
export interface InputMessage {
|
|
8
42
|
type?: 'message';
|
|
9
43
|
role: 'user' | 'assistant' | 'system' | 'developer';
|
|
@@ -21,7 +55,21 @@ export interface InputFunctionCallOutput {
|
|
|
21
55
|
call_id: string;
|
|
22
56
|
output: string;
|
|
23
57
|
}
|
|
24
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Top-level reasoning item replayed by clients that echo prior assistant
|
|
60
|
+
* reasoning summaries instead of using `previous_response_id`. The summary
|
|
61
|
+
* is coalesced onto the next assistant `ChatMessage` as `reasoningContent`.
|
|
62
|
+
*/
|
|
63
|
+
export interface InputReasoningItem {
|
|
64
|
+
type: 'reasoning';
|
|
65
|
+
id?: string;
|
|
66
|
+
summary?: {
|
|
67
|
+
type?: 'summary_text';
|
|
68
|
+
text: string;
|
|
69
|
+
}[];
|
|
70
|
+
encrypted_content?: string;
|
|
71
|
+
}
|
|
72
|
+
export type InputItem = InputMessage | InputFunctionCall | InputFunctionCallOutput | InputReasoningItem;
|
|
25
73
|
export interface ResponsesToolDefinition {
|
|
26
74
|
type: 'function';
|
|
27
75
|
name: string;
|
|
@@ -48,6 +96,58 @@ export interface ResponsesAPIRequest {
|
|
|
48
96
|
};
|
|
49
97
|
previous_response_id?: string;
|
|
50
98
|
store?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Stable caller-supplied key identifying the logical conversation for
|
|
101
|
+
* warm-session reuse across stateless turns. Stateless agent clients
|
|
102
|
+
* (pi-mono, Aider, Codex CLI, etc.) own the conversation history
|
|
103
|
+
* client-side and resend the full transcript on every turn — they do
|
|
104
|
+
* NOT use `previous_response_id` — so the server-side
|
|
105
|
+
* `SessionRegistry` can only reuse a warm `ChatSession` across those
|
|
106
|
+
* turns if the client threads a stable key through every request.
|
|
107
|
+
*
|
|
108
|
+
* When present (and `previous_response_id` is absent), the registry's
|
|
109
|
+
* tier-2 lookup scans for a still-live entry whose `promptCacheKey`
|
|
110
|
+
* matches and whose `instructions` are byte-equal to this request's
|
|
111
|
+
* — on a match it leases the warm session out, so the native prefix-
|
|
112
|
+
* cache verifier (`verify_cache_prefix_direct`) can skip the re-
|
|
113
|
+
* prefill of the conversation history and only prefill the newly
|
|
114
|
+
* appended user turn. When absent, each stateless turn cold-starts.
|
|
115
|
+
*
|
|
116
|
+
* `previous_response_id` unconditionally wins when both are set —
|
|
117
|
+
* the two keys may identify different conversation branches, so
|
|
118
|
+
* picking the prompt_cache_key branch on a prev-id miss would risk
|
|
119
|
+
* routing the request through the wrong warm state. Fall through to
|
|
120
|
+
* fresh on prev-id miss instead.
|
|
121
|
+
*
|
|
122
|
+
* **Enabled by default.** Opt out with
|
|
123
|
+
* `MLX_DISABLE_PROMPT_CACHE_KEY=1` in multi-tenant deployments,
|
|
124
|
+
* where the tier-2 lookup becomes unsafe — the key is caller-
|
|
125
|
+
* controlled, so two clients picking the same raw key would lease
|
|
126
|
+
* each other's warm sessions. HMAC-scoping with a boot-time nonce
|
|
127
|
+
* hides the raw value from memory dumps but does not protect
|
|
128
|
+
* against that shared-key hijack. Operators who need multi-tenant
|
|
129
|
+
* isolation should either disable the feature or front the server
|
|
130
|
+
* with an auth proxy that rewrites `prompt_cache_key` per tenant.
|
|
131
|
+
*
|
|
132
|
+
* **Prerequisites (ALL must hold, else the field is a silent no-op):**
|
|
133
|
+
*
|
|
134
|
+
* 1. `MLX_DISABLE_PROMPT_CACHE_KEY` must NOT be set to `"1"` in the
|
|
135
|
+
* server environment (default behavior is enabled).
|
|
136
|
+
* 2. The key must be at least 8 characters. Shorter values
|
|
137
|
+
* (including the empty string) are silently treated as if no
|
|
138
|
+
* key were supplied — trivial guessing collisions on short
|
|
139
|
+
* keys would be a real risk even in single-tenant use.
|
|
140
|
+
* 3. `previous_response_id` must NOT be set on the same request.
|
|
141
|
+
* Prev-id takes precedence; tier-2 never runs when both are
|
|
142
|
+
* present.
|
|
143
|
+
*
|
|
144
|
+
* When any prerequisite fails the server FALLS BACK silently to a
|
|
145
|
+
* cold-start for this turn — no error, no 4xx. Integrators who
|
|
146
|
+
* depend on warm reuse should verify via the `X-Session-Cache`
|
|
147
|
+
* response header: `prefix_hit` means tier-2 engaged AND the
|
|
148
|
+
* native prefix verifier reused tokens; `fresh` means no reuse.
|
|
149
|
+
*/
|
|
150
|
+
prompt_cache_key?: string;
|
|
51
151
|
/**
|
|
52
152
|
* OpenAI-reserved `metadata` slot, repurposed here to carry MLX-Node
|
|
53
153
|
* extensions. Today this only exposes `retention_seconds` as a
|
|
@@ -63,6 +163,28 @@ export interface ResponsesAPIRequest {
|
|
|
63
163
|
*/
|
|
64
164
|
retention_seconds?: number;
|
|
65
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* MLX-Node extension carrier for non-OpenAI fields, namespaced under
|
|
168
|
+
* `extra_body` to mirror the OpenAI SDK convention for vendor
|
|
169
|
+
* passthrough. Unknown keys are ignored (additive, forward-compat).
|
|
170
|
+
*
|
|
171
|
+
* Currently exposes:
|
|
172
|
+
* * `generation_mode`: `"mtp"` forces W6 speculative-decode (sets
|
|
173
|
+
* `enableMtp = true`), `"ar"` forces plain autoregressive
|
|
174
|
+
* (`enableMtp = false`). Absent / null / unrecognized leaves
|
|
175
|
+
* `enableMtp` untouched so the downstream `ChatSession` auto-
|
|
176
|
+
* default (true when the model ships an MTP head) applies.
|
|
177
|
+
* * `mtp_depth`: positive integer override for the per-call draft
|
|
178
|
+
* depth. The server forwards any positive integer ≤ 64 (a sanity
|
|
179
|
+
* ceiling that only blocks garbage) and the native per-family
|
|
180
|
+
* `resolve_params` owns the real clamps: qwen3.5 native MTP
|
|
181
|
+
* [1, 5], gemma4 DSpark capped at the draft block size, gemma4
|
|
182
|
+
* assistant drafts [1, 8].
|
|
183
|
+
*/
|
|
184
|
+
extra_body?: {
|
|
185
|
+
generation_mode?: string | null;
|
|
186
|
+
mtp_depth?: number | null;
|
|
187
|
+
};
|
|
66
188
|
}
|
|
67
189
|
export interface OutputTextPart {
|
|
68
190
|
type: 'output_text';
|
|
@@ -101,6 +223,54 @@ export interface ResponseUsage {
|
|
|
101
223
|
reasoning_tokens: number;
|
|
102
224
|
};
|
|
103
225
|
total_tokens: number;
|
|
226
|
+
/**
|
|
227
|
+
* Mirrors the upstream OpenAI Responses API `usage.input_tokens_details`
|
|
228
|
+
* object. Populated only when the native dispatch reports
|
|
229
|
+
* `cachedTokens > 0` — a non-zero value means that many prompt tokens
|
|
230
|
+
* were served from the reused KV-cache prefix on this turn. The
|
|
231
|
+
* `X-Cached-Tokens` response header carries the same number on
|
|
232
|
+
* non-streaming responses, but SSE flushes its headers before the
|
|
233
|
+
* native prefix verifier runs, so streaming clients have to read the
|
|
234
|
+
* value out of the terminal `response.completed` event's
|
|
235
|
+
* `usage.input_tokens_details.cached_tokens` field to verify
|
|
236
|
+
* cache-reuse (see Round 5 Fix #3: streaming `X-Session-Cache` is
|
|
237
|
+
* documented as non-authoritative on the streaming path — this
|
|
238
|
+
* in-band number is the authoritative signal).
|
|
239
|
+
*/
|
|
240
|
+
input_tokens_details?: {
|
|
241
|
+
cached_tokens: number;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Server-extension timing fields surfaced for verbose logs. These
|
|
245
|
+
* are native/server inference measurements, distinct from the HTTP
|
|
246
|
+
* logger's outer `elapsedMs` envelope. Unknown fields are ignored by
|
|
247
|
+
* OpenAI-compatible clients.
|
|
248
|
+
*/
|
|
249
|
+
time_to_first_token_ms?: number;
|
|
250
|
+
prefill_tokens_per_second?: number;
|
|
251
|
+
decode_tokens_per_second?: number;
|
|
252
|
+
server_inference_elapsed_ms?: number;
|
|
253
|
+
server_time_to_first_token_ms?: number;
|
|
254
|
+
server_total_time_to_first_token_ms?: number;
|
|
255
|
+
server_prefill_tokens_per_second?: number;
|
|
256
|
+
server_decode_tokens_per_second?: number;
|
|
257
|
+
server_model_resolve_ms?: number;
|
|
258
|
+
server_load_wait_ms?: number;
|
|
259
|
+
server_load_owner?: boolean;
|
|
260
|
+
server_queue_ms?: number;
|
|
261
|
+
server_pre_inference_ms?: number;
|
|
262
|
+
server_paged_prefill_chunk_size?: number;
|
|
263
|
+
server_paged_prefill_eval_interval?: number;
|
|
264
|
+
server_paged_decode_cache_clear_interval?: number;
|
|
265
|
+
/**
|
|
266
|
+
* Server-extension cache context for `prefill_tokens_per_second`.
|
|
267
|
+
* On cached-prefix turns, `prefill_input_tokens` is the uncached
|
|
268
|
+
* suffix that was actually prefetched and `cached_prefix_tokens`
|
|
269
|
+
* is the skipped prefix, so verbose logs do not mistake suffix-only
|
|
270
|
+
* prefill throughput for full-prompt throughput.
|
|
271
|
+
*/
|
|
272
|
+
prefill_input_tokens?: number;
|
|
273
|
+
cached_prefix_tokens?: number;
|
|
104
274
|
}
|
|
105
275
|
export interface ResponseError {
|
|
106
276
|
type: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAE3G,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAE3G,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC;CACvB;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,WAAW,GACnB,aAAa,GACb,cAAc,GACd,sBAAsB,GACtB,gBAAgB,GAChB,oBAAoB,CAAC;AAMzB,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACpD,OAAO,EAAE,MAAM,G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CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,uCAAuC,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,sCAAsC,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,uCAAuC,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GACnB,oBAAoB,GACpB,uBAAuB,GACvB,sBAAsB,GACtB,mBAAmB,GACnB,oBAAoB,GACpB,mBAAmB,GACnB,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,GACnB,8BAA8B,GAC9B,6BAA6B,GAC7B,+BAA+B,GAC/B,8BAA8B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlx-node/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"homepage": "https://github.com/mlx-node/mlx-node",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/mlx-node/mlx-node/issues"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"build": "tsc -b"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@mlx-node/core": "
|
|
31
|
-
"@mlx-node/lm": "
|
|
30
|
+
"@mlx-node/core": "0.0.8",
|
|
31
|
+
"@mlx-node/lm": "0.0.8"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/node": "
|
|
34
|
+
"@types/node": "@types/node@24.12.2"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}
|