depth flag now drives constraint defaults #33
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/depth-presets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes Issue #30
Problem
depth(shallow/balanced/deep) was passed only as a text hint inside the agent's user message — no mechanical effect on iterations, token budget, or source count. Effectively cosmetic.Change
New
DEPTH_PRESETStable andconstraints_for_depth()helper inresearchers.web.models:Wired through the stack:
constraints is None, builds from the depth presetresearchtool:max_iterations/token_budgetnow default toNone; constraints built viaconstraints_for_depthwith explicit values overriding the presetask:--max-iterations/--budgetdefault toNoneand are only forwarded when set, so unset flags fall through to the depth presetbalancedmatches the historical defaults exactly, so existing callers see zero behavior change. Explicit flags always win.Tests
6 new tests in
test_models.py: each preset's values,balancedbackward-compat, unknown-depth fallback, full override, partial override. 116/116 passing.Live verified
--depth shallowon a simple question now caps at 2 iterations and stays under cap, exactly as the preset says.Out of scope
Tuning the actual numbers based on stress test data — that's Phase 3 calibration territory. This PR is about wiring depth → defaults, not picking the perfect numbers.