Skip to content

v0.6.6

@Hosuke Hosuke tagged this 16 Apr 17:07
A) /api/ask now honors a `model` field in the request body and threads
it through kb_ask Operation → query()/query_with_search() → chat() so
callers can switch model per-call without mutating env or reinitialising
the client. Empty/whitespace is treated as "use default", non-string and
>200-char inputs are 400. The promote judge intentionally still uses
the default model.

C) Lone UTF-16 surrogates (U+D800–U+DFFF) crash the OpenAI client's
strict UTF-8 serialiser. They sneak in via half-decoded HTML/PDF ingest
and sit in concept files until a deep query stitches them into a prompt.
New `tools.llm.strip_surrogates()` is applied at chat_with_context()
(query path) and at ingest_url/ingest_file write sites (prevents new bad
data). Existing concepts with surrogates are now read-safe; deep RAG no
longer crashes on them.

Both changes are backwards-compatible: omitting `model` keeps the old
behavior, and surrogate-free text round-trips unchanged through
strip_surrogates.

Note: pre-commit Codex review is temporarily unavailable; this commit
ships without it and will be reviewed post-hoc when Codex is restored.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assets 2
Loading