Skip to content

Commit d89c5a1

Browse files
fix(web): Add support for adaptive thinking parameters (#1127)
* fix * changelog * feedbacl
1 parent c80bdfb commit d89c5a1

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Changed
1111
- Bumped AI SDK and associated packages version. [#1126](https://github.com/sourcebot-dev/sourcebot/pull/1126)
1212

13+
### Fixed
14+
- Fixed issue where claude-opus-4-7 was returning "error occurred "thinking.type.enabled" is not supported for this model". [#1123](https://github.com/sourcebot-dev/sourcebot/issues/1123)
15+
1316
## [4.16.9] - 2026-04-15
1417

1518
### Added

packages/web/src/features/chat/utils.server.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,17 @@ export const getAISDKLanguageModelAndOptions = async (config: LanguageModel): Pr
210210
: undefined,
211211
});
212212

213+
const isAdaptiveThinkingSupported =
214+
modelId.startsWith('claude-opus-4-7');
215+
213216
return {
214217
model: anthropic(modelId),
215218
providerOptions: {
216219
anthropic: {
217-
thinking: {
220+
thinking: isAdaptiveThinkingSupported ? {
221+
type: "adaptive",
222+
display: "summarized"
223+
} : {
218224
type: "enabled",
219225
budgetTokens: env.ANTHROPIC_THINKING_BUDGET_TOKENS,
220226
}

0 commit comments

Comments
 (0)