feat(providers): Add Anthropic extended thinking and adapt providers to new streaming/file APIs; bump dependencies and update docs, tests and configuration
This commit is contained in:
@@ -317,7 +317,11 @@ export class AnthropicProvider extends MultiModalModel {
|
||||
const maxTokens = optionsArg.searchDepth === 'deep' ? 20000 :
|
||||
optionsArg.searchDepth === 'advanced' ? 20000 : 20000;
|
||||
|
||||
// Add thinking configuration if enabled
|
||||
const thinkingConfig = this.getThinkingConfig();
|
||||
|
||||
// Create the research request
|
||||
// Note: When thinking is enabled, temperature must be 1 (or omitted)
|
||||
const requestParams: any = {
|
||||
model: 'claude-sonnet-4-5-20250929',
|
||||
system: systemMessage,
|
||||
@@ -328,7 +332,8 @@ export class AnthropicProvider extends MultiModalModel {
|
||||
}
|
||||
],
|
||||
max_tokens: maxTokens,
|
||||
temperature: 0.7
|
||||
// Only set temperature when thinking is NOT enabled
|
||||
...(thinkingConfig ? {} : { temperature: 0.7 })
|
||||
};
|
||||
|
||||
// Add tools if web search is enabled
|
||||
@@ -337,7 +342,6 @@ export class AnthropicProvider extends MultiModalModel {
|
||||
}
|
||||
|
||||
// Add thinking configuration if enabled
|
||||
const thinkingConfig = this.getThinkingConfig();
|
||||
if (thinkingConfig) {
|
||||
requestParams.thinking = thinkingConfig;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user