code: def test_route_configuration_parsing(
      basic_config_dict, tmp_path, monkeypatch
  ):
      conf_path = tmp_path.joinpath("config.yaml")
  
      conf_path.write_text(yaml.safe_dump(basic_config_dict))
  
      loaded_config = _load_route_config(conf_path)
  
      save_path = tmp_path.joinpath("config2.yaml")
      _save_route_config(loaded_config, save_path)
      loaded_from_save = _load_route_config(save_path)
  
      completions_gpt4 = loaded_from_save.routes[0]
      assert completions_gpt4.name == "completions-gpt4"
      assert completions_gpt4.route_type == "llm/v1/completions"
      assert completions_gpt4.model.name == "gpt-4"
      assert completions_gpt4.model.provider == "openai"
      completions_conf = completions_gpt4.model.config
      assert isinstance(completions_conf, OpenAIConfig)
      assert completions_conf.openai_api_key == "mykey"
      assert (
          completions_conf.openai_api_base
          == "https://api.openai.com/v1"
      )
      assert completions_conf.openai_api_version == "2023-05-10"
      assert completions_conf.openai_api_type == "openai"
      assert completions_conf.openai_organization == "my_company"
  
      chat_gpt4 = loaded_from_save.routes[1]
      assert chat_gpt4.name == "chat-gpt4"
      assert chat_gpt4.route_type == "llm/v1/chat"
      assert chat_gpt4.model.name == "gpt-4"
      assert chat_gpt4.model.provider == "openai"
      chat_conf = chat_gpt4.model.config
      assert isinstance(chat_conf, OpenAIConfig)
      assert chat_conf.openai_api_key == "sk-openai"
      assert chat_conf.openai_api_base == "https://api.openai.com/v1"
      assert chat_conf.openai_api_type == "openai"
      assert chat_conf.openai_api_version is None
      assert chat_conf.openai_organization is None
  
      claude = loaded_from_save.routes[2]
      assert isinstance(claude.model.config, AnthropicConfig)
      assert claude.name == "claude-chat"
      assert claude.route_type == "llm/v1/chat"
      assert claude.model.name == "claude-v1"
      assert claude.model.provider == "anthropic"
      claude_conf = claude.model.config
      assert claude_conf.anthropic_api_key == "api_key"
  
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 5 for calling a global function with example usage: test_route_configuration_parsing(basic_config_dict, tmp_path, monkeypatch) without return types