strix/tests/llm
octo-patch da472ca0d5 fix: apply assistant-prefill guard to Anthropic models in interactive mode (fixes #416)
When interactive mode is enabled (TUI), the guard that prevents sending a
trailing assistant message to the Anthropic API was incorrectly skipped. The
Anthropic API rejects such requests with
"This model does not support assistant message prefill." regardless of
whether the caller is in interactive or non-interactive mode.

Updated the condition to also apply the guard when `_is_anthropic()` is
true, so Anthropic models are always protected while non-Anthropic models
that may support assistant prefill continue to be unaffected in interactive
mode.

Added three unit tests covering all three branches of the new condition.

Co-Authored-By: Octopus <liyuan851277048@icloud.com>
2026-04-28 12:34:24 +08:00
..
__init__.py refactor(tests): reorganize unit tests module structure 2025-12-04 00:02:14 +04:00
test_llm_otel.py chore: update default model to gpt-5.4 and remove Strix Router from docs 2026-03-22 22:08:20 -07:00
test_prepare_messages.py fix: apply assistant-prefill guard to Anthropic models in interactive mode (fixes #416) 2026-04-28 12:34:24 +08:00
test_source_aware_whitebox.py feat: Better source-aware testing (#391) 2026-03-31 11:53:49 -07:00