File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,20 +200,20 @@ describe('vllmProvider', () => {
200200 expect ( JSON . parse ( toolMessage . content ) ) . toMatchObject ( { error : true , tool : 'myTool' } )
201201 } )
202202
203- it ( 'preserves partial results when a follow-up model call fails mid-loop' , async ( ) => {
203+ it ( 'surfaces a ProviderError when a follow-up model call fails mid-loop' , async ( ) => {
204204 mockCreate
205205 . mockResolvedValueOnce ( chatResponse ( null , [ toolCall ( 'call_1' , 'myTool' ) ] ) )
206206 . mockRejectedValueOnce ( new Error ( 'connection reset' ) )
207207
208- const result = await vllmProvider . executeRequest ( {
209- model : 'vllm/llama-3' ,
210- messages : [ { role : 'user' , content : 'go' } ] ,
211- tools : [ makeTool ( 'myTool' ) ] ,
212- } )
208+ await expect (
209+ vllmProvider . executeRequest ( {
210+ model : 'vllm/llama-3' ,
211+ messages : [ { role : 'user' , content : 'go' } ] ,
212+ tools : [ makeTool ( 'myTool' ) ] ,
213+ } )
214+ ) . rejects . toThrow ( 'connection reset' )
213215
214216 expect ( mockExecuteTool ) . toHaveBeenCalledTimes ( 1 )
215- expect ( result . toolCalls ) . toHaveLength ( 1 )
216- expect ( result . toolResults ) . toHaveLength ( 1 )
217217 } )
218218
219219 it ( 'cycles forced tools: forces the next forced tool after the first is used' , async ( ) => {
You can’t perform that action at this time.
0 commit comments