@@ -219,6 +219,9 @@ export const GoogleChatCompleteConfig: ProviderConfig = {
219219 functionCall : {
220220 name : tool_call . function . name ,
221221 args : JSON . parse ( tool_call . function . arguments ) ,
222+ ...( tool_call . function . thought_signature && {
223+ thought_signature : tool_call . function . thought_signature ,
224+ } ) ,
222225 } ,
223226 } ) ;
224227 } ) ;
@@ -472,6 +475,7 @@ export interface GoogleResponseCandidate {
472475 mimeType : string ;
473476 data : string ;
474477 } ;
478+ thoughtSignature ?: string ;
475479 } [ ] ;
476480 } ;
477481 logprobsResult ?: {
@@ -603,6 +607,10 @@ export const GoogleChatCompleteResponseTransform: (
603607 function : {
604608 name : part . functionCall . name ,
605609 arguments : JSON . stringify ( part . functionCall . args ) ,
610+ ...( ! strictOpenAiCompliance &&
611+ part . thoughtSignature && {
612+ thought_signature : part . thoughtSignature ,
613+ } ) ,
606614 } ,
607615 } ) ;
608616 } else if ( part . text ) {
@@ -785,6 +793,10 @@ export const GoogleChatCompleteStreamChunkTransform: (
785793 function : {
786794 name : part . functionCall . name ,
787795 arguments : JSON . stringify ( part . functionCall . args ) ,
796+ ...( ! strictOpenAiCompliance &&
797+ part . thoughtSignature && {
798+ thought_signature : part . thoughtSignature ,
799+ } ) ,
788800 } ,
789801 } ;
790802 }
0 commit comments