code: def test_exception_raising():
      # this tests if the router raises an exception when invalid params are set
      # in this test both deployments have bad keys - Keep this test. It validates if the router raises the most recent exception
      litellm.set_verbose = True
      import openai
  
      try:
          print("testing if router raises an exception")
          old_api_key = os.environ["AZURE_API_KEY"]
          os.environ["AZURE_API_KEY"] = ""
          model_list = [
              {
                  "model_name": "gpt-3.5-turbo",  # openai model name
                  "litellm_params": {  # params for litellm completion/embedding call
                      "model": "azure/chatgpt-v-2",
                      "api_key": "bad-key",
                      "api_version": os.getenv("AZURE_API_VERSION"),
                      "api_base": os.getenv("AZURE_API_BASE"),
                  },
                  "tpm": 240000,
                  "rpm": 1800,
              },
              {
                  "model_name": "gpt-3.5-turbo",  # openai model name
                  "litellm_params": {  #
                      "model": "gpt-3.5-turbo",
                      "api_key": "bad-key",
                  },
                  "tpm": 240000,
                  "rpm": 1800,
              },
          ]
          router = Router(
              model_list=model_list,
              redis_host=os.getenv("REDIS_HOST"),
              redis_password=os.getenv("REDIS_PASSWORD"),
              redis_port=int(os.getenv("REDIS_PORT")),
              routing_strategy="simple-shuffle",
              set_verbose=False,
              num_retries=1,
          )  # type: ignore
          response = router.completion(
              model="gpt-3.5-turbo",
              messages=[
                  {
                      "role": "user",
                      "content": "hello this request will fail",
                  }
              ],
          )
          os.environ["AZURE_API_KEY"] = old_api_key
          pytest.fail(f"Should have raised an Auth Error")
      except openai.AuthenticationError:
          print(
              "Test Passed: Caught an OPENAI AUTH Error, Good job. This is what we needed!"
          )
          os.environ["AZURE_API_KEY"] = old_api_key
          router.reset()
      except Exception as e:
          os.environ["AZURE_API_KEY"] = old_api_key
          print("Got unexpected exception on router!", e)
  
imports: import sys, os, time
  import traceback, asyncio
  import pytest
  import litellm
  from litellm import Router
  from concurrent.futures import ThreadPoolExecutor
  from collections import defaultdict
  from dotenv import load_dotenv
label_desc: Use image node_id 1 for calling a global function with example usage: test_exception_raising() without return types