@mlx-node/lm 0.0.8 → 0.0.9

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
@@ -18,15 +18,15 @@ npm install @mlx-node/lm
18
18
  Multi-turn chat runs through `ChatSession`, which owns the server-side KV cache and hides the session bookkeeping behind `send()` / `sendStream()`. The `loadSession()` convenience wrapper loads the model and constructs the session in one step:
19
19
 
20
20
  ```typescript
21
- import { loadSession } from '@mlx-node/lm';
21
+ import { loadSession } from "@mlx-node/lm";
22
22
 
23
- const session = await loadSession('./models/Qwen3-0.6B');
23
+ const session = await loadSession("./models/Qwen3-0.6B");
24
24
 
25
- const result = await session.send('What is the capital of France?');
25
+ const result = await session.send("What is the capital of France?");
26
26
  console.log(result.text);
27
27
 
28
- // Follow-ups reuse the live KV cache no prompt replay.
29
- const followUp = await session.send('And its population?');
28
+ // Follow-ups reuse KV when the template-rendered transcript is an exact prefix extension.
29
+ const followUp = await session.send("And its population?");
30
30
  console.log(followUp.text);
31
31
  ```
32
32
 
@@ -35,11 +35,13 @@ console.log(followUp.text);
35
35
  Every generative model wrapper supports token-by-token streaming via `session.sendStream()`, which yields an `AsyncGenerator<ChatStreamEvent>`:
36
36
 
37
37
  ```typescript
38
- import { loadSession } from '@mlx-node/lm';
38
+ import { loadSession } from "@mlx-node/lm";
39
39
 
40
- const session = await loadSession('./models/Qwen3.5-0.8B');
40
+ const session = await loadSession("./models/Qwen3.5-0.8B");
41
41
 
42
- for await (const event of session.sendStream('Write a haiku about TypeScript.')) {
42
+ for await (const event of session.sendStream(
43
+ "Write a haiku about TypeScript.",
44
+ )) {
43
45
  if (!event.done) {
44
46
  process.stdout.write(event.text);
45
47
  } else {
@@ -52,25 +54,27 @@ Breaking out of the loop automatically cancels generation. The session tracks it
52
54
 
53
55
  ## Tool Calling
54
56
 
55
- OpenAI-compatible function calling with `createToolDefinition`. Tool-result turns feed back through the same session via `sendToolResult()`, which dispatches a native `chatSessionContinueTool` against the live KV cache:
57
+ OpenAI-compatible function calling with `createToolDefinition`. Tool-result turns feed back through the same session via `sendToolResult()`. The complete structured transcript is rendered by the checkpoint-provided template, while native code reuses KV only on an exact token-prefix match:
56
58
 
57
59
  ```typescript
58
- import { loadSession, createToolDefinition } from '@mlx-node/lm';
60
+ import { loadSession, createToolDefinition } from "@mlx-node/lm";
59
61
 
60
- const session = await loadSession('./models/Qwen3-0.6B');
62
+ const session = await loadSession("./models/Qwen3-0.6B");
61
63
 
62
64
  const tools = [
63
65
  createToolDefinition(
64
- 'get_weather',
65
- 'Get weather for a city',
66
+ "get_weather",
67
+ "Get weather for a city",
66
68
  {
67
- city: { type: 'string', description: 'City name' },
69
+ city: { type: "string", description: "City name" },
68
70
  },
69
- ['city'],
71
+ ["city"],
70
72
  ),
71
73
  ];
72
74
 
73
- const result = await session.send('What is the weather in Tokyo?', { config: { tools } });
75
+ const result = await session.send("What is the weather in Tokyo?", {
76
+ config: { tools },
77
+ });
74
78
 
75
79
  // The chat-session API only supports exactly one tool call per assistant turn:
76
80
  // each `sendToolResult` dispatch immediately re-opens the assistant turn, so
@@ -79,7 +83,7 @@ const result = await session.send('What is the weather in Tokyo?', { config: { t
79
83
  // subsequent `sendToolResult*` after a multi-call turn throws with a clear
80
84
  // error — and the caller must refuse multi-call turns up front. Tighten the
81
85
  // prompt or tool spec so the model emits at most one call per turn.
82
- const okCalls = result.toolCalls?.filter((tc) => tc.status === 'ok') ?? [];
86
+ const okCalls = result.toolCalls?.filter((tc) => tc.status === "ok") ?? [];
83
87
  if (okCalls.length > 1) {
84
88
  throw new Error(
85
89
  `ChatSession only supports one tool call per assistant turn; ` +
@@ -89,7 +93,9 @@ if (okCalls.length > 1) {
89
93
  const call = okCalls[0];
90
94
  if (call) {
91
95
  const toolOutput = JSON.stringify(await executeMyTool(call));
92
- const followUp = await session.sendToolResult(call.id, toolOutput, { config: { tools } });
96
+ const followUp = await session.sendToolResult(call.id, toolOutput, {
97
+ config: { tools },
98
+ });
93
99
  console.log(followUp.text);
94
100
  }
95
101
  ```
@@ -99,15 +105,22 @@ if (call) {
99
105
  `loadModel()` auto-detects the model architecture from `config.json`. Use `loadSession()` when you want an ergonomic `ChatSession` handle in one step, or load a concrete model class and construct `new ChatSession(model)` when you need a reference to both the model and the session (e.g. for `generate()` calls, training, or model metadata):
100
106
 
101
107
  ```typescript
102
- import { loadSession, ChatSession, Qwen35Model, Qwen35MoeModel } from '@mlx-node/lm';
108
+ import {
109
+ loadSession,
110
+ ChatSession,
111
+ Qwen35Model,
112
+ Qwen35MoeModel,
113
+ } from "@mlx-node/lm";
103
114
 
104
115
  // Convenience: auto-detect architecture and wrap in a ChatSession.
105
- const session = await loadSession('./models/Qwen3-0.6B', { system: 'Be concise.' });
116
+ const session = await loadSession("./models/Qwen3-0.6B", {
117
+ system: "Be concise.",
118
+ });
106
119
 
107
120
  // Or load a specific architecture directly — every generative model wrapper
108
121
  // structurally satisfies ChatSession's SessionCapableModel bound.
109
- const dense = await Qwen35Model.load('./models/Qwen3.5-0.8B');
110
- const moe = await Qwen35MoeModel.load('./models/Qwen3.5-35B-A3B');
122
+ const dense = await Qwen35Model.load("./models/Qwen3.5-0.8B");
123
+ const moe = await Qwen35MoeModel.load("./models/Qwen3.5-35B-A3B");
111
124
  const denseSession = new ChatSession(dense);
112
125
  const moeSession = new ChatSession(moe);
113
126
  ```
@@ -119,13 +132,18 @@ const moeSession = new ChatSession(moe);
119
132
  ### Pre-defined Configs
120
133
 
121
134
  ```typescript
122
- import { QWEN3_CONFIGS, QWEN35_CONFIGS, getQwen3Config, getQwen35Config } from '@mlx-node/lm';
135
+ import {
136
+ QWEN3_CONFIGS,
137
+ QWEN35_CONFIGS,
138
+ getQwen3Config,
139
+ getQwen35Config,
140
+ } from "@mlx-node/lm";
123
141
 
124
142
  // Available Qwen3 configs: 'qwen3-0.6b', 'qwen3-1.7b', 'qwen3-7b'
125
- const config = getQwen3Config('qwen3-0.6b');
143
+ const config = getQwen3Config("qwen3-0.6b");
126
144
 
127
145
  // Available Qwen3.5 configs: 'qwen3.5-0.6b'
128
- const config35 = getQwen35Config('qwen3.5-0.6b');
146
+ const config35 = getQwen35Config("qwen3.5-0.6b");
129
147
  ```
130
148
 
131
149
  ## Profiling
@@ -133,7 +151,7 @@ const config35 = getQwen35Config('qwen3.5-0.6b');
133
151
  Track per-generation timing, memory usage, and TTFT:
134
152
 
135
153
  ```typescript
136
- import { enableProfiling, disableProfiling } from '@mlx-node/lm';
154
+ import { enableProfiling, disableProfiling } from "@mlx-node/lm";
137
155
 
138
156
  enableProfiling();
139
157
 
@@ -187,7 +205,7 @@ type ChatStreamEvent = ChatStreamDelta | ChatStreamFinal;
187
205
 
188
206
  ```typescript
189
207
  interface ToolDefinition {
190
- type: 'function';
208
+ type: "function";
191
209
  function: FunctionDefinition;
192
210
  }
193
211
 
@@ -62,9 +62,21 @@ export interface SessionCapableModel {
62
62
  * known to be available.
63
63
  */
64
64
  supportsImages?(): boolean;
65
+ /**
66
+ * Whether this bundled wrapper can capture full reasoning internally while
67
+ * returning a privacy-safe public result. Third-party implementations omit
68
+ * this capability and keep their original `includeReasoning` config.
69
+ */
70
+ supportsReplayReasoningCapture?(): boolean;
71
+ /**
72
+ * Whether this model's checkpoint template expects historical reasoning
73
+ * embedded in `message.content` instead of the structured
74
+ * `reasoningContent` field.
75
+ */
76
+ replaysAssistantRawText?(): boolean;
65
77
  chatSessionStart(messages: ChatMessage[], config?: ChatConfig | null): Promise<ChatResult>;
66
- chatSessionContinue(userMessage: string, images: Uint8Array[] | null, audio: Uint8Array[] | null, config?: ChatConfig | null): Promise<ChatResult>;
67
- chatSessionContinueTool(toolCallId: string, content: string, config?: ChatConfig | null, isError?: boolean | null): Promise<ChatResult>;
78
+ chatSessionContinue(messages: ChatMessage[], config?: ChatConfig | null): Promise<ChatResult>;
79
+ chatSessionContinueTool(messages: ChatMessage[], config?: ChatConfig | null): Promise<ChatResult>;
68
80
  /**
69
81
  * The optional `signal` parameter on every streaming entry point is
70
82
  * plumbed into the `_runChatStream` fast-abort path in the wrapper
@@ -75,8 +87,8 @@ export interface SessionCapableModel {
75
87
  * callers (the common direct-use path) just omit it.
76
88
  */
77
89
  chatStreamSessionStart(messages: ChatMessage[], config?: ChatConfig | null, signal?: AbortSignal): AsyncGenerator<ChatStreamEvent>;
78
- chatStreamSessionContinue(userMessage: string, images: Uint8Array[] | null, audio: Uint8Array[] | null, config?: ChatConfig | null, signal?: AbortSignal): AsyncGenerator<ChatStreamEvent>;
79
- chatStreamSessionContinueTool(toolCallId: string, content: string, config?: ChatConfig | null, signal?: AbortSignal, isError?: boolean | null): AsyncGenerator<ChatStreamEvent>;
90
+ chatStreamSessionContinue(messages: ChatMessage[], config?: ChatConfig | null, signal?: AbortSignal): AsyncGenerator<ChatStreamEvent>;
91
+ chatStreamSessionContinueTool(messages: ChatMessage[], config?: ChatConfig | null, signal?: AbortSignal): AsyncGenerator<ChatStreamEvent>;
80
92
  resetCaches(): void;
81
93
  /**
82
94
  * Whether the underlying native model has the block-paged KV cache
@@ -274,11 +286,12 @@ export declare class ChatSession<M extends SessionCapableModel = SessionCapableM
274
286
  private readonly model;
275
287
  private readonly system;
276
288
  private readonly defaultConfig;
289
+ /** Tool definitions are conversation state for deterministic template replay. */
290
+ private activeTools;
277
291
  /**
278
292
  * Full conversation history tracked on the TS side. Appended to on
279
- * every successful turn. Only read back when the image-change path
280
- * triggers a restart normal text continues use the server-side
281
- * cache, not this array.
293
+ * every successful turn and sent on every role-aware native turn so
294
+ * the model-provided template remains the sole prompt authority.
282
295
  */
283
296
  private history;
284
297
  /**
@@ -297,7 +310,7 @@ export declare class ChatSession<M extends SessionCapableModel = SessionCapableM
297
310
  private lastAudioKey;
298
311
  private turnCount;
299
312
  private inFlight;
300
- /** A failed/abandoned native delta must be followed by a full replay. */
313
+ /** A failed/abandoned native turn must be followed by a full replay. */
301
314
  private needsFullReplay;
302
315
  /**
303
316
  * Count of `ok` tool calls emitted by the prior assistant turn, or
@@ -375,9 +388,10 @@ export declare class ChatSession<M extends SessionCapableModel = SessionCapableM
375
388
  /**
376
389
  * Send a user message and resolve with the assistant reply.
377
390
  *
378
- * Turn 0 and any turn whose image set has changed dispatch through
379
- * `chatSessionStart` with the full history. All other turns use
380
- * the cheap `chatSessionContinue` delta path.
391
+ * Turn 0 and any turn whose image set changed dispatch through
392
+ * `chatSessionStart`. Later turns pass the same complete structured
393
+ * history through `chatSessionContinue`; native code renders the
394
+ * model template and reuses KV on an exact token-prefix match.
381
395
  */
382
396
  send(userMessage: string, opts?: SendOptions): Promise<ChatResult>;
383
397
  /**
@@ -393,9 +407,9 @@ export declare class ChatSession<M extends SessionCapableModel = SessionCapableM
393
407
  */
394
408
  sendStream(userMessage: string, opts?: SendOptions): AsyncGenerator<ChatStreamEvent>;
395
409
  /**
396
- * Send a tool-result turn. Always dispatches
397
- * `chatSessionContinueTool` tool turns never change image state,
398
- * so there is no restart path here.
410
+ * Send a tool-result turn. The declaring assistant tool call and the
411
+ * pending result are both included in the full history passed to
412
+ * `chatSessionContinueTool`.
399
413
  *
400
414
  * Rejects if the prior assistant turn emitted more than one `ok`
401
415
  * tool call: the chat-session API only supports exactly one tool
@@ -585,12 +599,21 @@ export declare class ChatSession<M extends SessionCapableModel = SessionCapableM
585
599
  * rationale.
586
600
  */
587
601
  private recordToolCallFanout;
602
+ /**
603
+ * Persist the effective tools only when their turn commits successfully.
604
+ * Preflights and failed/abandoned turns intentionally never call this.
605
+ */
606
+ private commitActiveTools;
588
607
  /**
589
608
  * Merge default + per-call config and force `reuseCache: true`.
590
609
  * The session path is a session-reuse operation by construction —
591
610
  * `reuseCache: false` on the continue path would wipe the very
592
611
  * cache the delta depends on.
593
612
  *
613
+ * Tool resolution here is side-effect free because public capacity
614
+ * preflights use this same merge path. Successful turn commit sites call
615
+ * {@link commitActiveTools} after native inference finishes.
616
+ *
594
617
  * MTP auto-default: if neither `defaultConfig` nor `overlay`
595
618
  * sets `enableMtp` AND the underlying model exposes
596
619
  * `hasMtpWeights()` returning `true`, set `enableMtp = true` so the
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session.d.ts","sourceRoot":"","sources":["../src/chat-session.ts"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAA4B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8BnD;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAI3C,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,qBAAqB,EAAE,MAAM;IAJxC,QAAQ,CAAC,IAAI,6BAA6B;IAE1C,YACW,YAAY,EAAE,MAAM,EACpB,qBAAqB,EAAE,MAAM,EAOvC;CACF;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK9D;AAED,8EAA8E;AAC9E,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB;AAiGD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,iBAAiB,CAAC,CAChB,QAAQ,EAAE,WAAW,EAAE,EACvB,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,EACpC,KAAK,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,EAC/B,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,GAC9B,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC;IACtC;;;;;;;OAOG;IACH,wBAAwB,CAAC,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACxG;;;OAGG;IAC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