From 74bfbeb439e0a0730262853ecdb3cfa41a9ec1f7 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 15 Oct 2025 08:43:29 -0700 Subject: [PATCH] fix(proxy/utils.py): support configuring db schema for non-iam auth db url --- litellm/model_prices_and_context_window_backup.json | 4 ++-- litellm/proxy/utils.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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