File tree Expand file tree Collapse file tree 5 files changed +203
-176
lines changed
Expand file tree Collapse file tree 5 files changed +203
-176
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @browserbasehq/stagehand " : patch
3+ ---
4+
5+ feat: adding gpt 5.1 to stagehand
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ export class AISdkClient extends LLMClient {
127127
128128 let objectResponse : Awaited < ReturnType < typeof generateObject > > ;
129129 const isGPT5 = this . model . modelId . includes ( "gpt-5" ) ;
130+ const isGPT51 = this . model . modelId . includes ( "gpt-5.1" ) ;
130131 if ( options . response_model ) {
131132 try {
132133 objectResponse = await generateObject ( {
@@ -138,7 +139,7 @@ export class AISdkClient extends LLMClient {
138139 ? {
139140 openai : {
140141 textVerbosity : "low" , // Making these the default for gpt-5 for now
141- reasoningEffort : "minimal" ,
142+ reasoningEffort : isGPT51 ? "low" : "minimal" ,
142143 } ,
143144 }
144145 : undefined ,
Original file line number Diff line number Diff line change 7272 "@ai-sdk/togetherai" : " ^1.0.23" ,
7373 "@ai-sdk/xai" : " ^2.0.26" ,
7474 "@langchain/core" : " ^0.3.40" ,
75+ "bufferutil" : " ^4.0.9" ,
7576 "chrome-launcher" : " ^1.2.0" ,
7677 "ollama-ai-provider-v2" : " ^1.5.0" ,
7778 "patchright-core" : " ^1.55.2" ,
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ export class AISdkClientWrapped extends LLMClient {
133133
134134 let objectResponse : Awaited < ReturnType < typeof generateObject > > ;
135135 const isGPT5 = this . model . modelId . includes ( "gpt-5" ) ;
136+ const isGPT51 = this . model . modelId . includes ( "gpt-5.1" ) ;
136137 if ( options . response_model ) {
137138 try {
138139 objectResponse = await generateObject ( {
@@ -144,7 +145,7 @@ export class AISdkClientWrapped extends LLMClient {
144145 ? {
145146 openai : {
146147 textVerbosity : "low" , // Making these the default for gpt-5 for now
147- reasoningEffort : "minimal" ,
148+ reasoningEffort : isGPT51 ? "low" : "minimal" ,
148149 } ,
149150 }
150151 : undefined ,
You can’t perform that action at this time.
0 commit comments