Repository navigation
Commit bb2fedd
Eva
fix(buzz-agent): budget summarizer reasoning separately so it cannot starve the handoff summary
Reasoning models spend output tokens thinking before any visible text,
and that spend counts against the summary call's max_tokens. On
deepseek-v4-flash this starved the handoff summarizer completely: in a
89-task benchmark run, 13 consecutive handoff attempts across 5 trials
length-stopped inside the reasoning channel, returned empty content, and
every one degraded to lossy history truncation (~40 minutes of burned
reasoning) before a stochastically-short reasoning run finally fit.
Give reasoning its own equal-sized budget on top of the text budget
(reasoning.max_tokens) and exclude it from the response
(reasoning.exclude) — summarize() only reads content. max_tokens is
raised to cover both budgets so the text budget the caller asked for is
actually available for text. Non-reasoning endpoints ignore the
reasoning object; deliberately not paired with
provider.require_parameters (see apply_openrouter_mutations).
Verification:
- cargo test -p buzz-agent (422 unit + 110 integration, all pass)
- cargo fmt / clippy clean
Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>1 parent 2b873cf commit bb2fedd
1 file changed
Lines changed: 40 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2249 | 2249 | | |
2250 | 2250 | | |
2251 | 2251 | | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
2252 | 2264 | | |
2253 | 2265 | | |
2254 | 2266 | | |
2255 | | - | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
2256 | 2272 | | |
2257 | 2273 | | |
2258 | 2274 | | |
| |||
6263 | 6279 | | |
6264 | 6280 | | |
6265 | 6281 | | |
| 6282 | + | |
| 6283 | + | |
| 6284 | + | |
| 6285 | + | |
| 6286 | + | |
| 6287 | + | |
6266 | 6288 | | |
6267 | | - | |
| 6289 | + | |
6268 | 6290 | | |
6269 | 6291 | | |
6270 | 6292 | | |
| |||
6274 | 6296 | | |
6275 | 6297 | | |
6276 | 6298 | | |
6277 | | - | |
| 6299 | + | |
| 6300 | + | |
| 6301 | + | |
| 6302 | + | |
| 6303 | + | |
| 6304 | + | |
| 6305 | + | |
| 6306 | + | |
| 6307 | + | |
| 6308 | + | |
| 6309 | + | |
| 6310 | + | |
6278 | 6311 | | |
6279 | | - | |
6280 | | - | |
| 6312 | + | |
| 6313 | + | |
6281 | 6314 | | |
6282 | 6315 | | |
6283 | | - | |
6284 | | - | |
| 6316 | + | |
| 6317 | + | |
6285 | 6318 | | |
6286 | 6319 | | |
6287 | 6320 | | |
| |||
0 commit comments