File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/platform/endpoint/node Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,17 @@ export class ChatEndpoint implements IChatEndpoint {
168168 }
169169
170170 public getExtraHeaders ( ) : Record < string , string > {
171+ const isAnthropicModel = this . family . startsWith ( 'claude' ) || this . family . startsWith ( 'Anthropic' ) ;
172+ const usesChatCompletionsEndpoint = ! this . useMessagesApi && ! this . useResponsesApi ;
173+ if ( isAnthropicModel && usesChatCompletionsEndpoint ) {
174+ const thinkingBudget = this . _configurationService . getExperimentBasedConfig ( ConfigKey . AnthropicThinkingBudget , this . _expService ) ;
175+ if ( thinkingBudget ) {
176+ return {
177+ ...( this . modelMetadata . requestHeaders ?? { } ) ,
178+ 'thinking_budget' : String ( thinkingBudget ) ,
179+ } ;
180+ }
181+ }
171182 return this . modelMetadata . requestHeaders ?? { } ;
172183 }
173184
You can’t perform that action at this time.
0 commit comments