code: def test_deprecated_keys_in_config(tmp_path):
      deprecated_config = {
          "routes": [
              {
                  "name": "model1",
                  "route_type": "llm/v1/chat",
                  "model": {
                      "name": "gpt-4",
                      "provider": "openai",
                      "config": {
                          "openai_api_key": "MY_TOKEN",
                      },
                  },
              },
              {
                  "name": "model2",
                  "route_type": "llm/v1/chat",
                  "model": {
                      "name": "gpt-4",
                      "provider": "openai",
                      "config": {
                          "openai_api_key": "MY_TOKEN",
                      },
                  },
              },
          ]
      }
      deprecated_conf_path = tmp_path.joinpath("deprecated_config.yaml")
      deprecated_conf_path.write_text(yaml.safe_dump(deprecated_config))
      with pytest.warns(
          FutureWarning,
          match="'routes' configuration key has been deprecated",
      ):
          _load_route_config(deprecated_conf_path)
  
      with pytest.warns(
          FutureWarning,
          match="'route_type' configuration key has been deprecated",
      ):
          _load_route_config(deprecated_conf_path)
  
      recommended_config = {
          "endpoints": [
              {
                  "name": "model1",
                  "endpoint_type": "llm/v1/chat",
                  "model": {
                      "name": "gpt-4",
                      "provider": "openai",
                      "config": {
                          "openai_api_key": "MY_TOKEN",
                      },
                  },
              },
              {
                  "name": "model2",
                  "endpoint_type": "llm/v1/chat",
                  "model": {
                      "name": "gpt-4",
                      "provider": "openai",
                      "config": {
                          "openai_api_key": "MY_TOKEN",
                      },
                  },
              },
          ]
      }
      recommended_conf_path = tmp_path.joinpath(
          "recommended_config.yaml"
      )
      recommended_conf_path.write_text(
          yaml.safe_dump(recommended_config)
      )
  
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always")
          _load_route_config(recommended_conf_path)
          assert not w
  
file_path: mlflow/tests/gateway/test_gateway_config_parsing.py
imports: import re
  import warnings
  import pytest
  import yaml
  from mlflow.exceptions import MlflowException
  from mlflow.gateway.config import AnthropicConfig, OpenAIConfig, RouteConfig, _load_route_config, _resolve_api_key_from_input, _save_route_config
  from mlflow.gateway.utils import assemble_uri_path
label_desc: Use image node_id 13 for calling a global function with example usage: test_deprecated_keys_in_config(tmp_path) without return types