@@ -179,7 +179,7 @@ def __init__(
179179
180180                self ._client  =  LangfuseOpenAI (
181181                    azure_endpoint = str (self ._url ),
182-                     azure_deployment = self .model_type ,
182+                     azure_deployment = str ( self .model_type ) ,
183183                    api_version = self .api_version ,
184184                    api_key = self ._api_key ,
185185                    azure_ad_token = self ._azure_ad_token ,
@@ -191,7 +191,7 @@ def __init__(
191191            else :
192192                self ._client  =  AzureOpenAI (
193193                    azure_endpoint = str (self ._url ),
194-                     azure_deployment = self .model_type ,
194+                     azure_deployment = str ( self .model_type ) ,
195195                    api_version = self .api_version ,
196196                    api_key = self ._api_key ,
197197                    azure_ad_token = self ._azure_ad_token ,
@@ -213,7 +213,7 @@ def __init__(
213213
214214                self ._async_client  =  LangfuseAsyncOpenAI (
215215                    azure_endpoint = str (self ._url ),
216-                     azure_deployment = self .model_type ,
216+                     azure_deployment = str ( self .model_type ) ,
217217                    api_version = self .api_version ,
218218                    api_key = self ._api_key ,
219219                    azure_ad_token = self ._azure_ad_token ,
@@ -225,7 +225,7 @@ def __init__(
225225            else :
226226                self ._async_client  =  AsyncAzureOpenAI (
227227                    azure_endpoint = str (self ._url ),
228-                     azure_deployment = self .model_type ,
228+                     azure_deployment = str ( self .model_type ) ,
229229                    api_version = self .api_version ,
230230                    api_key = self ._api_key ,
231231                    azure_ad_token = self ._azure_ad_token ,
@@ -376,7 +376,7 @@ def _request_chat_completion(
376376
377377        return  self ._client .chat .completions .create (
378378            messages = messages ,
379-             model = self .model_type ,
379+             model = str ( self .model_type ) ,
380380            ** request_config ,
381381        )
382382
@@ -392,7 +392,7 @@ async def _arequest_chat_completion(
392392
393393        return  await  self ._async_client .chat .completions .create (
394394            messages = messages ,
395-             model = self .model_type ,
395+             model = str ( self .model_type ) ,
396396            ** request_config ,
397397        )
398398
@@ -413,7 +413,7 @@ def _request_parse(
413413
414414        return  self ._client .beta .chat .completions .parse (
415415            messages = messages ,
416-             model = self .model_type ,
416+             model = str ( self .model_type ) ,
417417            ** request_config ,
418418        )
419419
@@ -434,7 +434,7 @@ async def _arequest_parse(
434434
435435        return  await  self ._async_client .beta .chat .completions .parse (
436436            messages = messages ,
437-             model = self .model_type ,
437+             model = str ( self .model_type ) ,
438438            ** request_config ,
439439        )
440440
@@ -460,7 +460,7 @@ def _request_stream_parse(
460460        # Use the beta streaming API for structured outputs 
461461        return  self ._client .beta .chat .completions .stream (
462462            messages = messages ,
463-             model = self .model_type ,
463+             model = str ( self .model_type ) ,
464464            response_format = response_format ,
465465            ** request_config ,
466466        )
@@ -487,7 +487,7 @@ async def _arequest_stream_parse(
487487        # Use the beta streaming API for structured outputs 
488488        return  self ._async_client .beta .chat .completions .stream (
489489            messages = messages ,
490-             model = self .model_type ,
490+             model = str ( self .model_type ) ,
491491            response_format = response_format ,
492492            ** request_config ,
493493        )
0 commit comments