NEXO 7.9.31 — stop_sequences default fix
Published 2026-04-26. Patch release over v7.9.30.
Detected during real wire smoke and surfaced by an external auditor. call_model_raw was sending stop_sequences=["\n", ".", " "] by default. The current Anthropic Messages API rejects every one of those entries with HTTP 400 each stop sequence must contain non-whitespace — "\n" and " " are pure whitespace, so the whole call fails before any token is generated.
The practical impact: every enforcer_classifier request running on the default was failing in production. The classifier’s conservative fallback was kicking in silently on every call. Visible only in detailed logs.
What changed
The default is now None — no stop_sequences field is sent on the wire. max_tokens=3 already serves as the hard cap for yes/no classification, so a stop sequence is unnecessary by default. Callers that want a deterministic stop sequence can pass e.g. ["."]; whitespace-only or non-string entries are rejected locally with ClassifierUnavailableError so the configuration error surfaces where the caller is, not as a remote 400.
Why the unit tests had not caught it
The previous unit-test suite replaced the entire anthropic module with a fake class via sys.modules, so the fake never validated the request body the way the real API does. The fix lands together with two new end-to-end wire tests in tests/test_call_model_raw_overrides_e2e.py that drive the real Anthropic SDK against a local http.server capture: one asserts the default invocation does NOT carry a stop_sequences field on the wire, the other confirms a non-whitespace caller value is forwarded. Three new unit tests pin the local guard against six common whitespace-only inputs.
Other changes
This release also removes an internal design document from the open-source distribution. No code change there, no behaviour change.
Verification
55 / 55 green in the call_model_raw + override + e2e + agent_runner suites. Wider regression sweep stays green at 207 / 207.