Files
leleka/docs/experiments/2026-10-04-required-tools.md
T
Pavlo Ratushnyi 4013e0c9bd
Desktop foundation / core (ubuntu-latest) (push) Failing after 28s
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
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
Import tracked Strata Next source snapshot
2026-10-05 18:15:08 +02:00

3.2 KiB

Required and forced function choice — STRA-32

Date: 2026-10-04. The native Responses candidate adds tool_choice: "required" and the documented top-level function selector {"type":"function","name":"lookup"}. Required permits one or more calls; combined with parallel_tool_calls: false, it permits exactly one. Forced function choice permits exactly one call to the selected function.

The model receives prompt guidance. The runtime validates generated calls before publishing callable items and checks the minimum at successful completion. There is no constrained sampling or automatic retry. Token-limit incomplete responses may contain zero complete calls. Wrong names and excessive counts are still rejected. Ordinary SSE can publish valid text or a first valid call before a later failure; those events cannot be retracted.

The selector must contain only type/name and identify a declared top-level function. Invalid selectors or a required choice with no callable tools fail before generation. Custom/namespaced forced selectors and allowed-tools remain unsupported. Original request metadata, tool arguments and historical replay are retained. See the API contract and official tool-choice semantics.

Verification

  • Rust 1.99.0: 141 library tests passed, including prompt guidance, required missing-call rejection, forced wrong-call rejection and incomplete exemption. Clippy all-targets with warnings denied, fmt and diff checks passed.
  • The extended scripts/smoke-tool-policy.py passed on macOS debug and Linux x86_64 musl release, with 84 HTTP generations on each: auto/default, none, required and forced choices; zero/one/mixed/duplicate calls; parallel false; token-limit incomplete; JSON/SSE crossed with reasoning none/low. Eight malformed request configurations fail with 400 before generation; two unsupported choice kinds fail with 501. Generation metrics confirm no additional worker requests for rejected configurations.
  • Accepted Unicode custom input, function arguments and metadata match the synthetic baseline exactly (zero tolerance). Invalid output returns JSON 502 or terminal SSE response.failed; sequence numbers are contiguous. Forbidden call/input events are never published. Completed versus incomplete status is preserved.
  • Linux CI invokes the expanded matrix. Hosted GitHub Actions has not run.

This is a CPU-verified development candidate awaiting independent QA and real model qualification. No speedup, model policy-following quality or sustained stability is claimed. The qualified GPU user trial and tunnel remain unchanged; readiness does not prove the trial has no active requests.

Private artifact

~/.local/share/strata-next/bin/strata-next-linux-x86_64-musl-required-tools-preview, 17,440,536 bytes, SHA-256 1c2fdcf7ef92286b518fd67ba66c893f1fcff947f483849bdb041c77e126f732. The adjacent private JSON records source revision and checks. This is the Rust supervisor candidate; its external worker and tokenizer remain deployment inputs. No active profile or service was upgraded. Owned CPU fixture files and release intermediates were removed after verification.