@@ -895,36 +895,44 @@ def test_default_is_error_stop(self):
895895
896896 ## WRITTEN BY AI ##
897897 """
898- from guidellm .backends .openai .http import OpenAIHTTPBackend
898+ from guidellm .backends .openai .http import (
899+ OpenAIHTTPBackend ,
900+ OpenAIHTTPBackendArgs ,
901+ )
899902
900- backend = OpenAIHTTPBackend (target = "http://localhost:8000" )
901- assert backend .tool_call_missing_behavior == "error_stop"
903+ args = OpenAIHTTPBackendArgs (target = "http://localhost:8000" )
904+ backend = OpenAIHTTPBackend (args )
905+ assert backend ._args .tool_call_missing_behavior == "error_stop"
902906
903907 @pytest .mark .sanity
904908 def test_valid_behaviors_accepted (self ):
905909 """All valid tool_call_missing_behavior values are accepted.
906910
907911 ## WRITTEN BY AI ##
908912 """
909- from guidellm .backends .openai .http import OpenAIHTTPBackend
913+ from guidellm .backends .openai .http import (
914+ OpenAIHTTPBackend ,
915+ OpenAIHTTPBackendArgs ,
916+ )
910917
911918 for behavior in ("ignore_continue" , "ignore_stop" , "error_stop" ):
912- backend = OpenAIHTTPBackend (
919+ args = OpenAIHTTPBackendArgs (
913920 target = "http://localhost:8000" ,
914921 tool_call_missing_behavior = behavior ,
915922 )
916- assert backend .tool_call_missing_behavior == behavior
923+ backend = OpenAIHTTPBackend (args )
924+ assert backend ._args .tool_call_missing_behavior == behavior
917925
918926 @pytest .mark .sanity
919927 def test_invalid_behavior_rejected (self ):
920928 """Invalid tool_call_missing_behavior is rejected by the Literal type.
921929
922930 ## WRITTEN BY AI ##
923931 """
924- from guidellm .backends .openai .http import OpenAIHttpBackendArgs
932+ from guidellm .backends .openai .http import OpenAIHTTPBackendArgs
925933
926934 with pytest .raises (ValidationError ):
927- OpenAIHttpBackendArgs (
935+ OpenAIHTTPBackendArgs (
928936 target = "http://localhost:8000" ,
929937 tool_call_missing_behavior = "invalid_mode" ,
930938 )
@@ -945,12 +953,16 @@ def _make_backend(self, behavior: str):
945953 """
946954 ## WRITTEN BY AI ##
947955 """
948- from guidellm .backends .openai .http import OpenAIHTTPBackend
956+ from guidellm .backends .openai .http import (
957+ OpenAIHTTPBackend ,
958+ OpenAIHTTPBackendArgs ,
959+ )
949960
950- return OpenAIHTTPBackend (
961+ args = OpenAIHTTPBackendArgs (
951962 target = "http://localhost:8000" ,
952963 tool_call_missing_behavior = behavior ,
953964 )
965+ return OpenAIHTTPBackend (args )
954966
955967 def _make_request (self , expects_tool_call : bool ) -> GenerationRequest :
956968 """
0 commit comments