@@ -57,8 +57,6 @@ import {
5757 interopZodResponseFormat ,
5858 _convertOpenAIResponsesUsageToLangChainUsage ,
5959} from "../utils/output.js" ;
60- import { _convertMessagesToOpenAIParams } from "../utils/message_inputs.js" ;
61- import { _convertToResponsesMessageFromV1 } from "../utils/standard.js" ;
6260import { isReasoningModel , messageToOpenAIRole } from "../utils/misc.js" ;
6361
6462interface OpenAILLMOutput {
@@ -615,7 +613,7 @@ export abstract class BaseChatOpenAI<
615613 : this . _convertChatOpenAIToolToCompletionsTool ( tool , { strict } )
616614 ) ,
617615 ...kwargs ,
618- } ) ;
616+ } as Partial < CallOptions > ) ;
619617 }
620618
621619 override async stream ( input : BaseLanguageModelInput , options ?: CallOptions ) {
@@ -894,7 +892,7 @@ export abstract class BaseChatOpenAI<
894892 kwargs : { method : "json_mode" } ,
895893 schema : { title : name ?? "extract" , ...asJsonSchema } ,
896894 } ,
897- } ) ;
895+ } as Partial < CallOptions > ) ;
898896 } else if ( method === "jsonSchema" ) {
899897 const openaiJsonSchemaParams = {
900898 name : name ?? "extract" ,
@@ -917,7 +915,7 @@ export abstract class BaseChatOpenAI<
917915 ...asJsonSchema ,
918916 } ,
919917 } ,
920- } ) ;
918+ } as Partial < CallOptions > ) ;
921919 if ( isInteropZodSchema ( schema ) ) {
922920 const altParser = StructuredOutputParser . fromZodSchema ( schema ) ;
923921 outputParser = RunnableLambda . from < AIMessageChunk , RunOutput > (
@@ -960,7 +958,7 @@ export abstract class BaseChatOpenAI<
960958 } ,
961959 // Do not pass `strict` argument to OpenAI if `config.strict` is undefined
962960 ...( config ?. strict !== undefined ? { strict : config . strict } : { } ) ,
963- } ) ;
961+ } as Partial < CallOptions > ) ;
964962 outputParser = new JsonOutputKeyToolsParser ( {
965963 returnSingle : true ,
966964 keyName : functionName ,
@@ -1004,7 +1002,7 @@ export abstract class BaseChatOpenAI<
10041002 } ,
10051003 // Do not pass `strict` argument to OpenAI if `config.strict` is undefined
10061004 ...( config ?. strict !== undefined ? { strict : config . strict } : { } ) ,
1007- } ) ;
1005+ } as Partial < CallOptions > ) ;
10081006 outputParser = new JsonOutputKeyToolsParser < RunOutput > ( {
10091007 returnSingle : true ,
10101008 keyName : functionName ,
0 commit comments