Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(proxy/utils.py): support configuring db schema for non-iam auth db url

Krrish Dholakia74bfbeb439e0
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index c965fa2092b..91a23b7f00f 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -13197,11 +13197,11 @@
"text"
],
"supports_function_calling": true,
- "supports_native_streaming": true,
+ "supports_native_streaming": false,
"supports_parallel_function_calling": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
- "supports_reasoning": true,
+ "supports_reasoning": false,
"supports_response_schema": true,
"supports_system_messages": false,
"supports_tool_choice": true,
diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py
index 8aa2f407555..803c9c1a4ff 100644
--- a/litellm/proxy/utils.py
+++ b/litellm/proxy/utils.py
@@ -3707,6 +3707,7 @@ def construct_database_url_from_env_vars() -> Optional[str]:
database_username = os.getenv("DATABASE_USERNAME")
database_password = os.getenv("DATABASE_PASSWORD")
database_name = os.getenv("DATABASE_NAME")
+ database_schema = os.getenv("DATABASE_SCHEMA")
if database_host and database_username and database_name:
# Handle the problem of special character escaping in the database URL
@@ -3722,6 +3723,9 @@ def construct_database_url_from_env_vars() -> Optional[str]:
else:
database_url = f"postgresql://{database_username_enc}@{database_host}/{database_name_enc}"
+ if database_schema:
+ database_url += f"?schema={database_schema}"
+
return database_url
return None