@@ -31,23 +31,10 @@ const allowedAnthropicBetas = new Set([
3131 ADVANCED_TOOL_USE_BETA ,
3232] )
3333
34- const TOOL_SEARCH_SUPPORTED_MODELS = [
35- "claude-sonnet-4.5" ,
36- "claude-sonnet-4.6" ,
37- "claude-opus-4.5" ,
38- "claude-opus-4.6" ,
39- ] as const
40-
41- const modelSupportsToolSearch = ( modelId : string ) : boolean => {
42- return TOOL_SEARCH_SUPPORTED_MODELS . some ( ( prefix ) =>
43- modelId . toLowerCase ( ) . startsWith ( prefix ) ,
44- )
45- }
46-
4734const buildAnthropicBetaHeader = (
4835 anthropicBetaHeader : string | undefined ,
4936 thinking : AnthropicMessagesPayload [ "thinking" ] ,
50- model : string ,
37+ _model : string ,
5138) : string | undefined => {
5239 const isAdaptiveThinking = thinking ?. type === "adaptive"
5340
@@ -60,13 +47,7 @@ const buildAnthropicBetaHeader = (
6047
6148 // in vscode copilot extension, advanced-tool-use is enabled by default
6249 // align header with vscode copilot extension
63-
64- // will remove append ADVANCED_TOOL_USE_BETA in next github copilot extension version (>0.44.2)
65- const copilotHeaderSet =
66- modelSupportsToolSearch ( model ) ? [ ADVANCED_TOOL_USE_BETA ] : [ ]
67- const headerSet = new Set ( [ ...copilotHeaderSet , ...filteredBeta ] )
68- const uniqueFilteredBetas = [ ...headerSet ]
69-
50+ const uniqueFilteredBetas = [ ...filteredBeta ]
7051 if ( uniqueFilteredBetas . length > 0 ) {
7152 return uniqueFilteredBetas . join ( "," )
7253 }
0 commit comments