forked from phoenix/litellm-mirror
(fix) proxy raise exception when config path does not exist
This commit is contained in:
parent
b74b051385
commit
833c38edeb
1 changed files with 1 additions and 3 deletions
|
@ -205,11 +205,9 @@ def load_router_config(router: Optional[litellm.Router], config_file_path: str):
|
||||||
with open(config_file_path, 'r') as file:
|
with open(config_file_path, 'r') as file:
|
||||||
config = yaml.safe_load(file)
|
config = yaml.safe_load(file)
|
||||||
else:
|
else:
|
||||||
pass
|
raise Exception(f"Path to config does not exist, 'os.path.exists({config_file_path})' returned False")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception(f"Exception while reading Config: {e}")
|
raise Exception(f"Exception while reading Config: {e}")
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
print_verbose(f"Configs passed in, loaded config YAML\n{config}")
|
print_verbose(f"Configs passed in, loaded config YAML\n{config}")
|
||||||
## LITELLM MODULE SETTINGS (e.g. litellm.drop_params=True,..)
|
## LITELLM MODULE SETTINGS (e.g. litellm.drop_params=True,..)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue