From 844df2412ee70b4f46e052fa4b0bafab6514df09 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Sat, 17 Feb 2024 13:03:24 -0800 Subject: [PATCH 1/2] (feat) set fast api root path --- litellm/proxy/proxy_server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index b5349fffb11..a02042ab592 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -143,6 +143,9 @@ app = FastAPI( title="LiteLLM API", description=f"Proxy Server to call 100+ LLMs in the OpenAI format\n\n{ui_message}", version=version, + root_path=os.environ.get( + "SERVER_ROOT_PATH", "" + ), # check if user passed root path, FastAPI defaults this value to "" ) From 67932dccbc9190bccc2d3352d10a6418403beb57 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Sat, 17 Feb 2024 13:12:06 -0800 Subject: [PATCH 2/2] (docs) setting server root path --- docs/my-website/docs/proxy/deploy.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/proxy/deploy.md b/docs/my-website/docs/proxy/deploy.md index c3a84f1eaa0..091e106277d 100644 --- a/docs/my-website/docs/proxy/deploy.md +++ b/docs/my-website/docs/proxy/deploy.md @@ -154,7 +154,22 @@ Your OpenAI proxy server is now running on `http://0.0.0.0:4000`. -## Setting SSL Certification +## Advanced Deployment Settings + +### Customization of the server root path + +:::info + +In a Kubernetes deployment, it's possible to utilize a shared DNS to host multiple applications by modifying the virtual service + +::: + +Customize the root path to eliminate the need for employing multiple DNS configurations during deployment. + +👉 Set `SERVER_ROOT_PATH` in your .env and this will be set as your server root path + + +### Setting SSL Certification Use this, If you need to set ssl certificates for your on prem litellm proxy