@@ -2785,18 +2785,17 @@ describe("SessionRunnerLLM", () => {
27852785 } ) ,
27862786 )
27872787
2788- scenarioIt ( "durably settles local tool failures before continuing " , ( scenario ) =>
2788+ scenarioIt ( "durably rejects tools unavailable for the request " , ( scenario ) =>
27892789 Effect . gen ( function * ( ) {
27902790 yield * setup
27912791 const session = yield * SessionV2 . Service
27922792 yield * session . prompt ( { sessionID, prompt : PromptInput . Prompt . make ( { text : "Call missing" } ) , resume : false } )
27932793
27942794 yield * scenario . run ( function * ( ) {
27952795 yield * ( yield * scenario . llm . next ( ) ) . respond . toolCall ( "missing" , { } , { id : "call-missing" } )
2796- yield * ( yield * scenario . llm . next ( ) ) . respond . text ( "Recovered" , { id : "text-after-error" } )
27972796 } )
27982797
2799- expect ( yield * scenario . llm . requests ) . toHaveLength ( 2 )
2798+ expect ( yield * scenario . llm . requests ) . toHaveLength ( 1 )
28002799 expect ( yield * session . context ( sessionID ) ) . toMatchObject ( [
28012800 { type : "user" , text : "Call missing" } ,
28022801 {
@@ -2805,11 +2804,10 @@ describe("SessionRunnerLLM", () => {
28052804 {
28062805 type : "tool" ,
28072806 id : "call-missing" ,
2808- state : { status : "error" , error : { message : "Unknown tool : missing" } } ,
2807+ state : { status : "error" , error : { message : "Tool is not available for this request : missing" } } ,
28092808 } ,
28102809 ] ,
28112810 } ,
2812- { type : "assistant" , finish : "stop" , content : [ { type : "text" , text : "Recovered" } ] } ,
28132811 ] )
28142812 } ) ,
28152813 )
0 commit comments