Setting engine.gptoss_gguf (or STRATA_GPTOSS_GGUF) selects the gpt-oss family and takes the tokenizer from
that GGUF. Prompts: a Responses request (instructions, input items with reasoning, function calls and
outputs, tools, tool_choice, parallel_tool_calls, text.format, reasoning effort) is rendered as the Harmony
conversation by leleka-harmony; the same replay validation as the Qwen path, one call per assistant message
with its output, no custom tools. Output: a stateful HarmonyDecoder turns the generated tokens into the
reasoning / answer / <tool_call> markup that the existing code parses, so tool-name and argument
validation, history and the streaming events are reused; gpt-oss always reasons, the end-of-generation
markers <|return|> and <|call|> are the terminal tokens, and an open tool call is closed when the
generation ends.
Safety: the renderer can write its special markers as private-use sentinel characters (and replaces those
characters in caller text); the codec turns exactly those into special tokens. Marker-looking text from a
client, in messages, tool descriptions or tool output, stays ordinary text.
Side effect, deliberate: serde_json preserve_order is now on workspace-wide (the renderer needs the client's
property order), so tool-call argument objects keep the model's key order instead of alphabetical; one test
expectation changed accordingly. 52 responses tests and the new family tests pass; the 13 other
control-plane test failures on Windows predate this change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Responses code used the Qwen tokenizer directly. A TextCodec trait now carries what differs between
model families: encode, a stateful per-generation TokenDecoder, the terminal token ids and the family.
QwenCodec wraps the existing tokenizer with identical behaviour; the buffered and streaming paths decode
through a decoder created per generation, and reasoning_enabled takes the family so a family that always
reasons can say so. All 46 responses tests pass unchanged apart from the test helper.
Also fixes the Windows (MSVC) link of the control plane's test binary: ggml-quants.c references four
helpers from ggml.c that are not vendored; GNU linkers drop the unused code, MSVC does not. Abort-on-use
stubs are compiled for MSVC targets only. 13 other control-plane unit tests fail on Windows for
Linux-path reasons (absolute paths such as /private/api.key, disk-space and service-unit assumptions) and
are unrelated to this change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>