@@ -205,7 +205,7 @@ def test_create_openai_azure_client(self, mock_validate, mock_openai_client):
205205 model_config = {
206206 "model_type" : "azure_openai" ,
207207 "url" : model_url ,
208- "api_key " : auth_token ,
208+ "auth_token " : auth_token ,
209209 "api_version" : "2023-05-15" ,
210210 "model" : "gpt-4" ,
211211 "timeout" : 90 ,
@@ -216,7 +216,7 @@ def test_create_openai_azure_client(self, mock_validate, mock_openai_client):
216216
217217 # Verify the client was created with the right parameters
218218 mock_validate .assert_called_once_with (
219- ["url" , "api_key " , "api_version" , "model" ], model_config , "model"
219+ ["url" , "auth_token " , "api_version" , "model" ], model_config , "model"
220220 )
221221 self .assertIsNotNone (client )
222222 mock_openai_client .assert_called_once ()
@@ -246,7 +246,7 @@ def test_create_openai_azure_client_multi_url(self, mock_validate, mock_openai_c
246246 model_config = {
247247 "model_type" : "azure_openai" ,
248248 "url" : [model_url1 , model_url2 ],
249- "api_key " : [auth_token1 , auth_token2 ],
249+ "auth_token " : [auth_token1 , auth_token2 ],
250250 "api_version" : "2023-05-15" ,
251251 "model" : "gpt-4" ,
252252 "timeout" : 90 ,
@@ -257,7 +257,7 @@ def test_create_openai_azure_client_multi_url(self, mock_validate, mock_openai_c
257257
258258 # Verify the client was created with the right parameters
259259 mock_validate .assert_called_once_with (
260- ["url" , "api_key " , "api_version" , "model" ], model_config , "model"
260+ ["url" , "auth_token " , "api_version" , "model" ], model_config , "model"
261261 )
262262 self .assertIsNotNone (client )
263263 mock_openai_client .assert_called_once ()
@@ -288,7 +288,7 @@ def test_create_openai_azure_client_multi_url_single_auth_token(
288288 model_config = {
289289 "model_type" : "azure_openai" ,
290290 "url" : [model_url1 , model_url2 ],
291- "api_key " : auth_token ,
291+ "auth_token " : auth_token ,
292292 "api_version" : "2023-05-15" ,
293293 "model" : "gpt-4" ,
294294 "timeout" : 90 ,
@@ -299,7 +299,7 @@ def test_create_openai_azure_client_multi_url_single_auth_token(
299299
300300 # Verify the client was created with the right parameters
301301 mock_validate .assert_called_once_with (
302- ["url" , "api_key " , "api_version" , "model" ], model_config , "model"
302+ ["url" , "auth_token " , "api_version" , "model" ], model_config , "model"
303303 )
304304 self .assertIsNotNone (client )
305305 mock_openai_client .assert_called_once ()
0 commit comments