Commit Graph
4 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 c2290e1145 feat: serve gpt-oss through the control plane's Responses API (family adapter) (STRA-218)
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>
2026-10-14 22:15:52 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 a83913f69e refactor: put the tokenizer and generation decoding behind a model-family codec (STRA-218)
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>
2026-10-14 22:07:09 +02:00
Pavlo Ratushnyi fef5fca6fd refactor: extract Qwen tokenizer into Leleka crate
Linux / verify (push) Canceled after 0s
Linux / keyless-cuda (push) Canceled after 0s
Linux / static-cuda-package (push) Canceled after 0s
Linux / hosted-cuda-package (push) Canceled after 0s
Linux / linux-static-cli (push) Canceled after 0s
Linux / linux-cli-container (push) Canceled after 0s
Linux / release-cli (push) Canceled after 0s
2026-10-05 18:24:43 +02:00
Pavlo Ratushnyi 4013e0c9bd Import tracked Strata Next source snapshot
Desktop foundation / core (macos-latest) (push) Canceled after 0s
Desktop foundation / core (windows-latest) (push) Canceled after 0s
Linux / verify (push) Canceled after 0s
Linux / keyless-cuda (push) Canceled after 0s
Desktop foundation / core (ubuntu-latest) (push) Failing after 28s
Linux / static-cuda-package (push) Canceled after 0s
Linux / hosted-cuda-package (push) Canceled after 0s
Linux / linux-static-cli (push) Canceled after 0s
Linux / linux-cli-container (push) Canceled after 0s
Linux / release-cli (push) Canceled after 0s
2026-10-05 18:15:08 +02:00