Repository navigation
v0.19.4
- Keep the default WebGPU bridge assets at
v0.1.83(unchanged from 0.19.3). - Add tool calling to LiteRT-LM Web through
LlamaBackend.withTextHistory()on@litert-lm/core@0.19.0:createreturns the model's tool calls and takes tool results in the next request, andsupportsToolCallingreports whether the loaded runtime reads tool declarations;ToolChoice.requiredandparallelToolCallsstill throwLlamaUnsupportedException. Replies cut off atmaxTokensor the context size now end with finish reasonlength, and automatic tool loops (sendWithTools,completeWithTools) run when a load probe finds that the runtime reports per-turn token counts; a reply that ends exactly atmaxTokensalso reportslength(#1790, #919). - Document that LiteRT-LM Web
generate()wraps the prompt in one user turn of the bundle's chat template, because@litert-lm/core@0.19.0has no raw streaming route (#1863). - Make native LiteRT-LM errors more specific: a failed chat send on the C API 1.0 runtime names the unadaptable bundle template or
ModelParams.chatTemplate, as the legacy runtime does; an argument error from the worker isolate keepsLlamaArgumentException.name; and the raw-prompt refusal says whether the prompt is empty or holds only the model's start token (#1868, #1861). - When the prompt opened no thought, take a thought only at the start of the reply, as llama.cpp does: any other thinking tag, such as a
</think>before any<think>, a later<think>or a second</think>, is now content in generic, Llama 3, GLM 4.5, Kimi K2, LFM2, Laguna, Granite, MiniCPM5, Mistral Nemo, Apertus, Hunyuan V3 and DeepSeek R1, V3.2 and V4 replies, and after the start of a Hermes or Qwen3-Coder XML reply. The stream used to depend on how the reply was chunked and could repeat text as both content and reasoning. MiniMax M3 does the same: a<mm:think>after leading whitespace or later in the reply, and a</mm:think>after text, stay content (#1865, #1887). - Parse Qwen3-Coder XML replies (Qwen3-Coder, Qwen3.5, StepFun3.5-Flash) as llama.cpp does: text from the first
<tool_call>on that is not a valid call, such as an invalid call or text after the calls, is dropped instead of kept as content; only the first call counts withoutparallelToolCalls; Qwen3-Coder replies have no reasoning; and StepFun3.5-Flash with thinking off ends its thought at</think>or<tool_call>. WithToolChoice.required, these replies may think and write text before their calls instead of having to start with<tool_call>, so one that spendsmaxTokensfirst ends withlengthand no call, and a Qwen3-Coder call that leaves out the first<tool_call>is now a tool call (#1531). - Start Seed-OSS tool calls only at a
<seed:tool_call>followed by a line break, as llama.cpp does, in both the parser and the tool-call grammar: a scope such as<seed:tool_call><function=is now content, and a call after it is still found. An unknown tool or a missing required argument still parses as a call; Seed-OSS requests refuseToolDefinition.fromJsonSchematools, so validate the tool name and arguments before running a call (#1542).
Runtime baseline: native llama.cpp v0.9.0 and Web use upstream v0.9.0@cd959bae99ff4bed22bef2604f45241c09bbb8c8; native LiteRT-LM uses v0.19.1-2 and stable-diffusion uses v0.3.0-3. Web LiteRT-LM uses @litert-lm/core@0.19.0. Manifest SHA-256: ae6f488408672f9ba28d8f9e664a2b85f4e12048f290e259e18dd0b750c038e5.