diff options
| author | Adam Malczewski <[email protected]> | 2026-05-30 23:54:41 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-05-30 23:54:41 +0900 |
| commit | 83832e201b71b35beada967d5872c532364949c4 (patch) | |
| tree | 14af5017e13e795d653bbfedac891bf56eb6be92 /docker | |
| parent | 667abdd14f9e387a94d232276843525ae72d3d9d (diff) | |
| download | dispatch-83832e201b71b35beada967d5872c532364949c4.tar.gz dispatch-83832e201b71b35beada967d5872c532364949c4.zip | |
fix(agent): stream thinking for all adaptive Claude models, not just Opus 4.7
Extended thinking was gated on a hardcoded `model === "claude-opus-4-7"` check,
so newer/other adaptive models (Opus 4.8, Opus/Sonnet 4.6) fell into the classic
`thinking: { type: "enabled" }` branch. Adaptive models default thinking display
to "omitted", so no thinking was streamed — the UI showed nothing for Claude while
DeepSeek (a separate openai-compatible path) worked.
Replace the string check with a pure helper `anthropicThinkingProviderOptions`
that mirrors opencode's transform.ts detection:
- adaptive (`type: "adaptive"`) for Opus 4.7+ (version-parsed) and Opus/Sonnet
4.6 (id substring; handles dash and dot forms);
- `display: "summarized"` ONLY for Opus 4.7+ (they default to omitted and must
be forced); Opus/Sonnet 4.6 stream thinking without it;
- all other Claude models keep classic `enabled` + budgetTokens.
Pure function (no provider/streamText/network), unit-tested directly: Opus 4.8
(the reported bug), Opus 4.7, Sonnet/Opus 4.6, Opus 4.5 + dated Sonnet (enabled),
a future Opus 4.9 (proves version-parse), and effort->budget mapping.
Diffstat (limited to 'docker')
0 files changed, 0 insertions, 0 deletions
