Repository: confident-ai/deepeval
Issue: NameError("name 'get_llm_provider' is not defined") when using LiteLLMModel
Root cause: Validation Gap

Hi, 

I have encountered a bug, when using the LiteLLMModel.

**Describe the bug**
When running deepeval locally using the LiteLLMModel from deepeval.models I am encountering the following bug:  "NameError("name 'get_llm_provider' is not defined")". 

**To Reproduce**
Steps to reproduce the behavior:
1. Setup deepeval locally. 
2. Setup a LLMTestCase as follows: 
    test_case = LLMTestCase(
        input=req_info,
        actual_output=code,
        expected_output=req_info
    )
3. Setup the LiteLLMModel like so: 
    model = LiteLLMModel(
        model=f"openai/{settings.llm_settings.model_name}",
        api_key=settings.llm_settings.api_key,
        api_base=str(settings.llm_settings.api_url),
        temperature=0
    )
4. Try to create a metric like so: AnswerRelevancyMetric(model=model)



@TimBoleslawsky fixed in latest release (v3.1.5), can you try and let me know how it is?

@penguine-ip I think that issue is fixed now, thanks :) But now I get the following error: 

ERROR:root:Error in LiteLLM async generation: litellm.BadRequestError: OpenAIException - litellm.BadRequestError: AzureException 
BadRequestError - Unrecognized request argument supplied: json_schema. Received Model Group=azure-gpt-4o

Any idea, why that might be happening?

@TimBoleslawsky hmm that's weird, can you let us know what model string are you using?

Hi @penguine-ip , this is the model string I am using: 'openai/azure-gpt-4o'

Okay it seems that this issue was caused by the model. When I am trying a different model, it seems to work ... 

But I found another weird behavior. If I now run metric.measure(test_case) I get the following error: ValueError('not enough values to unpack (expected 2, got 1)'

test_case = LLMTestCase(
    input=req_info,
    actual_output=code
)

model = LiteLLMModel(
    model=f"openai/{settings.llm_settings.model_name}",
    api_key=settings.llm_settings.api_key,
    api_base=str(settings.llm_settings.api_url),
    temperature=0
)

metric = AnswerRelevancyMetric(model=model, verbose_mode=True)
metric.measure(test_case) <= Fails here




> [@penguine-ip](https://github.com/penguine-ip) I think that issue is fixed now, thanks :) But now I get the following error:
> 
> ERROR:root:Error in LiteLLM async generation: litellm.BadRequestError: OpenAIException - litellm.BadRequestError: AzureException BadRequestError - Unrecognized request argument supplied: json_schema. Received Model Group=azure-gpt-4o
> 
> Any idea, why that might be happening?


This is actually caused by 
```python
 completion_params["json_schema"] = schema.model_json_schema()
```
at line 144 in ```LiteLLMModel``` class of ```a_generate``` method, the ```acompletion``` function does not take a ```json_schema``` argument, removing the line removes the error.

This is also present at line 98 in generate method

@penguine-ip @TimBoleslawsky 





Hey @siesto1elemento could you please make a quick PR for this? The team doesn't use lite llm so we're pretty stuck on this integration without relying on communuity. thank you in advance

@penguine-ip please take a look

@siesto1elemento thanks really appreciate it!