This repository was archived by the owner on Mar 7, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
packages/bytebot-agent/src/google Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 77 MessageContentBlock ,
88 MessageContentType ,
99 TextContentBlock ,
10+ ThinkingContentBlock ,
1011 ToolUseContentBlock ,
1112} from '@bytebot/shared' ;
1213import {
@@ -62,6 +63,9 @@ export class GoogleService implements BytebotAgentService {
6263 model,
6364 contents : googleMessages ,
6465 config : {
66+ thinkingConfig : {
67+ thinkingBudget : 24576 ,
68+ } ,
6569 maxOutputTokens : maxTokens ,
6670 systemInstruction : systemPrompt ,
6771 tools : useTools
@@ -204,6 +208,13 @@ export class GoogleService implements BytebotAgentService {
204208 } ) ;
205209 break ;
206210 }
211+ case MessageContentType . Thinking :
212+ parts . push ( {
213+ text : block . thinking ,
214+ thoughtSignature : block . signature ,
215+ thought : true ,
216+ } ) ;
217+ break ;
207218 default :
208219 parts . push ( {
209220 text : JSON . stringify ( block ) ,
@@ -259,6 +270,14 @@ export class GoogleService implements BytebotAgentService {
259270 } as TextContentBlock ;
260271 }
261272
273+ if ( part . thought ) {
274+ return {
275+ type : MessageContentType . Thinking ,
276+ signature : part . thoughtSignature ,
277+ thinking : part . text ,
278+ } as ThinkingContentBlock ;
279+ }
280+
262281 if ( part . functionCall ) {
263282 return {
264283 type : MessageContentType . ToolUse ,
You can’t perform that action at this time.
0 commit comments