mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(proxy_server.py): allow /model/new
feature flag to work via env
This commit is contained in:
parent
f2e34f456d
commit
009f548079
4 changed files with 17 additions and 2 deletions
9
docs/my-website/docs/proxy/demo.md
Normal file
9
docs/my-website/docs/proxy/demo.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# 🎉 Demo App
|
||||||
|
|
||||||
|
Here is a demo of the proxy. To log in do:
|
||||||
|
|
||||||
|
- Username: admin
|
||||||
|
- Password: sk-1234
|
||||||
|
|
||||||
|
|
||||||
|
<iframe src="https://litellm-production-12bb.up.railway.app/ui" width="100%" height="800px"></iframe>
|
|
@ -36,6 +36,7 @@ const sidebars = {
|
||||||
label: "📖 All Endpoints (Swagger)",
|
label: "📖 All Endpoints (Swagger)",
|
||||||
href: "https://litellm-api.up.railway.app/",
|
href: "https://litellm-api.up.railway.app/",
|
||||||
},
|
},
|
||||||
|
"proxy/demo",
|
||||||
"proxy/configs",
|
"proxy/configs",
|
||||||
"proxy/reliability",
|
"proxy/reliability",
|
||||||
"proxy/users",
|
"proxy/users",
|
||||||
|
|
|
@ -36,7 +36,7 @@ general_settings:
|
||||||
master_key: sk-1234
|
master_key: sk-1234
|
||||||
allow_user_auth: true
|
allow_user_auth: true
|
||||||
alerting: ["slack"]
|
alerting: ["slack"]
|
||||||
store_model_in_db: True
|
# store_model_in_db: True // set via environment variable - os.environ["STORE_MODEL_IN_DB"] = "True"
|
||||||
# proxy_batch_write_at: 60 # 👈 Frequency of batch writing logs to server (in seconds)
|
# proxy_batch_write_at: 60 # 👈 Frequency of batch writing logs to server (in seconds)
|
||||||
enable_jwt_auth: True
|
enable_jwt_auth: True
|
||||||
alerting: ["slack"]
|
alerting: ["slack"]
|
||||||
|
|
|
@ -2333,7 +2333,12 @@ class ProxyConfig:
|
||||||
"background_health_checks", False
|
"background_health_checks", False
|
||||||
)
|
)
|
||||||
health_check_interval = general_settings.get("health_check_interval", 300)
|
health_check_interval = general_settings.get("health_check_interval", 300)
|
||||||
|
## check env ##
|
||||||
|
_store_model_in_db = litellm.get_secret(
|
||||||
|
"STORE_MODEL_IN_DB", None
|
||||||
|
) # feature flag for `/model/new`
|
||||||
|
if _store_model_in_db is not None and _store_model_in_db == True:
|
||||||
|
general_settings["store_model_in_db"] = True
|
||||||
router_params: dict = {
|
router_params: dict = {
|
||||||
"cache_responses": litellm.cache
|
"cache_responses": litellm.cache
|
||||||
!= None, # cache if user passed in cache values
|
!= None, # cache if user passed in cache values
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue