haiku.rag/tests/capabilities
Yiorgis Gozadinos eb9934a6e5
Notice the endings a structured answer arrives in
An output tool call is a `ToolCallPart` like any other, and treating every tool call as
intermediate meant a model could search, skip citing, emit its structured answer and
finish with neither a redirect nor a record. A response ends the question when it
carries no tool calls, or when one of its calls names an output tool.

Some endings are not visible from a single response — a host running
`end_strategy="early"` can finish on text beside a function call — so `after_run` is
the backstop: it cannot ask the model for anything by then, but it records a question
that reached the end of its run undeclared. That also covers a question that was asked
once, ignored, and finished anyway, which previously returned early on the redirect
marker and went unrecorded.

The capability documentation and the changelog said a question that gathered no
evidence is left alone. That describes neither the code nor the intent: enforcement
applies wherever there is something to declare, which includes a follow-up that reuses
evidence cited earlier without searching again.
2026-08-13 13:39:43 +03:00
..
conftest.py replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
test_capabilities.py Let a model declare that nothing grounds its answer 2026-08-13 13:39:42 +03:00
test_citation_policy.py Notice the endings a structured answer arrives in 2026-08-13 13:39:43 +03:00
test_evidence_capsule.py Require an answer to declare what grounds it, once per question 2026-08-13 13:39:42 +03:00
test_evidence_ledger.py Enforce a declaration wherever there is something to declare 2026-08-13 13:39:42 +03:00
test_evidence_wire.py Give the capsule to one return, and the run its own copy of state 2026-08-13 13:00:02 +03:00