Files
Saurav Panda 64981e41b8 Add opt-in flash mode variant that reasons in structured output
Small local models handle reasoning better as a bounded JSON field than as
native reasoning tokens. This adds that as an opt-in flash mode variant and
wires it into the eval harness so it can be measured rather than assumed.

type_with_custom_actions_flash_mode gains include_thinking and include_memory.
Properties are rebuilt rather than deleted piecemeal because schema field order
is emission order, and reasoning is only useful before the action it justifies.
FLASH_THINKING_DESCRIPTION caps the field at 120 words; uncapped, a chatty
model spends its latency budget on prose.

thinking was never persisted into message history, so reasoning was write-only
and could not inform later steps. HistoryItem now carries it, rendered ahead of
the fields it explains. Persistence is gated on include_thinking_in_history:
outside flash mode thinking is unbounded and would balloon every prompt.

system_prompt_flash_thinking.md describes the matching contract. The four
existing flash prompts are untouched, and plain flash mode keeps its exact
schema, prompt and history behaviour - covered by explicit regression tests.

beta mirrors the new constructor params, which tests/ci/test_beta_agent.py
requires to match the main agent's signature and order.

The eval harness gains a matching profile. It also drops the wait action via
the existing exclude_actions hook: wait defaults to 3s and sleeps seconds-1,
so every call the model makes costs ~2s of wall clock for nothing. Fixes
max_history_items in the fastest profiles, which was set below the
message manager's assert of > 5 and would have failed every task.
2026-08-22 11:41:51 -07:00
..