@@ -1043,10 +1043,11 @@ describe("format translation", () => {
10431043 "claude-sonnet-5" ,
10441044 false
10451045 ) ;
1046+ assert . deepEqual ( claudeBody . thinking , { type : "adaptive" } ) ;
10461047 assert . deepEqual ( claudeBody . output_config , { effort : "auto" } ) ;
10471048 } ) ;
10481049
1049- it ( "Claude adaptive models receive output_config.effort" , ( ) => {
1050+ it ( "Claude adaptive models receive explicit thinking with output_config.effort" , ( ) => {
10501051 const body = claude . toAnthropicBody (
10511052 {
10521053 messages : [ { role : "user" , content : "hi" } ] ,
@@ -1055,8 +1056,27 @@ describe("format translation", () => {
10551056 "claude-sonnet-5" ,
10561057 false
10571058 ) ;
1059+ assert . deepEqual ( body . thinking , { type : "adaptive" } ) ;
10581060 assert . deepEqual ( body . output_config , { effort : "high" } ) ;
1059- assert . equal ( body . thinking , undefined ) ;
1061+ } ) ;
1062+
1063+ it ( "Claude context-management clear thinking receives adaptive thinking" , ( ) => {
1064+ const body = claude . toAnthropicBody (
1065+ {
1066+ messages : [ { role : "user" , content : "hi" } ] ,
1067+ output_config : { effort : "high" } ,
1068+ context_management : {
1069+ edits : [ { type : "clear_thinking_20251015" , keep : "all" } ] ,
1070+ } ,
1071+ } ,
1072+ "claude-opus-4-8" ,
1073+ false
1074+ ) ;
1075+ assert . deepEqual ( body . thinking , { type : "adaptive" } ) ;
1076+ assert . deepEqual ( body . output_config , { effort : "high" } ) ;
1077+ assert . deepEqual ( body . context_management , {
1078+ edits : [ { type : "clear_thinking_20251015" , keep : "all" } ] ,
1079+ } ) ;
10601080 } ) ;
10611081
10621082 it ( "Claude Haiku falls back to token-budget thinking" , ( ) => {
0 commit comments