@@ -1315,33 +1315,33 @@ export async function startQaMockOpenAiServer(params?: {
13151315 const inflightRequests = new Map < number , { prompt : string ; allInputText : string } > ( ) ;
13161316 let nextInflightRequestId = 1 ;
13171317 const imageGenerationRequests : Array < Record < string , unknown > > = [ ] ;
1318- const dispatchResponses = async ( params : {
1318+ const dispatchResponses = async ( request : {
13191319 body : Record < string , unknown > ;
13201320 raw : string ;
13211321 } ) : Promise < QaMockResponsesDispatchResult > => {
1322- const input = Array . isArray ( params . body . input )
1323- ? ( params . body . input as ResponsesInputItem [ ] )
1322+ const input = Array . isArray ( request . body . input )
1323+ ? ( request . body . input as ResponsesInputItem [ ] )
13241324 : [ ] ;
13251325 if ( isRemoteCompactionV2Request ( input ) ) {
13261326 return { events : buildRemoteCompactionV2Events ( ) } ;
13271327 }
13281328 const prompt = extractLastUserText ( input ) ;
1329- const allInputText = extractAllRequestTexts ( input , params . body ) ;
1329+ const allInputText = extractAllRequestTexts ( input , request . body ) ;
13301330 const inflightRequestId = nextInflightRequestId ++ ;
13311331 inflightRequests . set ( inflightRequestId , { prompt, allInputText } ) ;
13321332 let events : StreamEvent [ ] ;
13331333 try {
1334- events = await buildResponsesPayload ( params . body , scenarioState ) ;
1334+ events = await buildResponsesPayload ( request . body , scenarioState ) ;
13351335 } finally {
13361336 inflightRequests . delete ( inflightRequestId ) ;
13371337 }
1338- const resolvedModel = typeof params . body . model === "string" ? params . body . model : "" ;
1338+ const resolvedModel = typeof request . body . model === "string" ? request . body . model : "" ;
13391339 recordRequest ( {
1340- raw : params . raw ,
1341- body : params . body ,
1340+ raw : request . raw ,
1341+ body : request . body ,
13421342 prompt,
13431343 allInputText,
1344- instructions : extractInstructionsText ( params . body ) || undefined ,
1344+ instructions : extractInstructionsText ( request . body ) || undefined ,
13451345 toolOutput : extractToolOutput ( input ) ,
13461346 model : resolvedModel ,
13471347 providerVariant : resolveProviderVariant ( resolvedModel ) ,
0 commit comments