File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,7 +257,10 @@ def tool_result_message_for(chat, tool_call)
257257 expect ( response . content ) . to include ( '15' )
258258 expect ( response . content ) . to include ( '10' )
259259 expect ( response . content ) . to include ( 'Ruby' )
260- expect ( chat . messages . count ) . to be ( 5 )
260+
261+ # Some providers may still satisfy both tool calls with an additional turn.
262+ expect ( chat . messages . count ) . to be >= 5
263+ expect ( assistant_tool_call_messages ( chat ) . sum { |message | message . tool_calls . size } ) . to be >= 2
261264 end
262265 end
263266
@@ -509,10 +512,9 @@ def tool_result_message_for(chat, tool_call)
509512 expect ( tool_call . name ) . to eq ( 'object_params' )
510513
511514 arguments = stringified_arguments ( tool_call . arguments )
512- expect ( arguments [ 'window' ] ) . to include (
513- 'start' => '2025-01-01' ,
514- 'end' => '2025-01-02'
515- )
515+ window = stringified_arguments ( arguments [ 'window' ] )
516+ expect ( window [ 'start' ] ) . to start_with ( '2025-01-01' )
517+ expect ( window [ 'end' ] ) . to start_with ( '2025-01-02' )
516518 end
517519 end
518520 end
You can’t perform that action at this time.
0 commit comments