@@ -251,7 +251,7 @@ function buildClaudeTextStreamEvents(
251251 events . push ( {
252252 type : "content_block_start" ,
253253 index : blockIndex ,
254- content_block : { type : "thinking" , thinking : "" } ,
254+ content_block : { type : "thinking" , thinking : "" , signature : "" } ,
255255 } ) ;
256256
257257 for ( let i = 0 ; i < reasoning . length ; i += chunkSize ) {
@@ -263,6 +263,12 @@ function buildClaudeTextStreamEvents(
263263 } ) ;
264264 }
265265
266+ events . push ( {
267+ type : "content_block_delta" ,
268+ index : blockIndex ,
269+ delta : { type : "signature_delta" , signature : "" } ,
270+ } ) ;
271+
266272 events . push ( {
267273 type : "content_block_stop" ,
268274 index : blockIndex ,
@@ -408,7 +414,7 @@ function buildClaudeTextResponse(
408414 const contentBlocks : object [ ] = [ ] ;
409415
410416 if ( reasoning ) {
411- contentBlocks . push ( { type : "thinking" , thinking : reasoning } ) ;
417+ contentBlocks . push ( { type : "thinking" , thinking : reasoning , signature : "" } ) ;
412418 }
413419
414420 contentBlocks . push ( { type : "text" , text : content } ) ;
@@ -494,7 +500,7 @@ function buildClaudeContentWithToolCallsStreamEvents(
494500 events . push ( {
495501 type : "content_block_start" ,
496502 index : blockIndex ,
497- content_block : { type : "thinking" , thinking : "" } ,
503+ content_block : { type : "thinking" , thinking : "" , signature : "" } ,
498504 } ) ;
499505
500506 for ( let i = 0 ; i < reasoning . length ; i += chunkSize ) {
@@ -506,6 +512,12 @@ function buildClaudeContentWithToolCallsStreamEvents(
506512 } ) ;
507513 }
508514
515+ events . push ( {
516+ type : "content_block_delta" ,
517+ index : blockIndex ,
518+ delta : { type : "signature_delta" , signature : "" } ,
519+ } ) ;
520+
509521 events . push ( {
510522 type : "content_block_stop" ,
511523 index : blockIndex ,
@@ -607,7 +619,7 @@ function buildClaudeContentWithToolCallsResponse(
607619 const contentBlocks : object [ ] = [ ] ;
608620
609621 if ( reasoning ) {
610- contentBlocks . push ( { type : "thinking" , thinking : reasoning } ) ;
622+ contentBlocks . push ( { type : "thinking" , thinking : reasoning , signature : "" } ) ;
611623 }
612624
613625 contentBlocks . push ( { type : "text" , text : content } ) ;
0 commit comments