mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
The `/tree` "Summarize" option ignored the session's thinking level. `AgentSession` already passes `thinkingLevel` into the `generateBranchSummary` options, but `generateBranchSummary` never read it, so the request was built without `reasoning`. For reasoning models on OpenAI Responses and Azure Responses, a missing `reasoning` becomes `effort: thinkingLevelMap.off ?? "none"`. Models that don't accept `"none"` then reject the branch summary with a 400 error: ``` Unsupported value: 'none' is not supported with the 'gpt-6-astra-…' model. ``` This change adds `thinkingLevel` to `GenerateBranchSummaryOptions`. It sets `reasoning` on the request when the model supports reasoning and the level is not `off`, the same rule compaction uses in `createSummarizationOptions`. **Testing** - Added a test to `packages/coding-agent/test/branch-summarization.test.ts` that records the stream options for three cases: a reasoning model at `xhigh`, a reasoning model at `off`, and a non-reasoning model. The expected `reasoning` values are `["xhigh", undefined, undefined]`. Without the fix, the test fails and every case gets `undefined`. With the fix, it passes. - Ran `branch-summarization`, `agent-session-branching`, `branch-summary-extensions` and `compaction-summary-reasoning`: all pass. - `npm run check` passes. - Not tested against a real provider endpoint. Fixes #11444 Requested by @davidbrai Co-authored-by: triagent <triagent@localhost> |
||
|---|---|---|
| .. | ||
| bun | ||
| cli | ||
| core | ||
| experimental | ||
| extensions | ||
| modes | ||
| utils | ||
| cli.ts | ||
| config.ts | ||
| index.ts | ||
| main.ts | ||
| migrations.ts | ||
| package-manager-cli.ts | ||
| rpc-entry.ts | ||