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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
init gcs using gcs_bucket
Ishaan Jaff88eca121d2c6
diff --git a/litellm/__init__.py b/litellm/__init__.pyindex cc03867cff2..0bbccf82719 100644--- a/litellm/__init__.py+++ b/litellm/__init__.py@@ -46,6 +46,7 @@ _custom_logger_compatible_callbacks_literal = Literal["galileo","braintrust","arize",+ "gcs_bucket",]_known_custom_logger_compatible_callbacks: List = list(get_args(_custom_logger_compatible_callbacks_literal)diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.pyindex 83a88410ea8..619b91c3a91 100644--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@ -59,6 +59,7 @@ from ..integrations.custom_logger import CustomLoggerfrom ..integrations.datadog import DataDogLoggerfrom ..integrations.dynamodb import DyanmoDBLoggerfrom ..integrations.galileo import GalileoObserve+from ..integrations.gcs_bucket import GCSBucketLoggerfrom ..integrations.greenscale import GreenscaleLoggerfrom ..integrations.helicone import HeliconeLoggerfrom ..integrations.lago import LagoLogger@@ -1987,6 +1988,14 @@ def _init_custom_logger_compatible_class(_langsmith_logger = LangsmithLogger()_in_memory_loggers.append(_langsmith_logger)return _langsmith_logger # type: ignore+ elif logging_integration == "gcs_bucket":+ for callback in _in_memory_loggers:+ if isinstance(callback, GCSBucketLogger):+ return callback # type: ignore++ _gcs_bucket_logger = GCSBucketLogger()+ _in_memory_loggers.append(_gcs_bucket_logger)+ return _gcs_bucket_logger # type: ignoreelif logging_integration == "arize":if "ARIZE_SPACE_KEY" not in os.environ:raise ValueError("ARIZE_SPACE_KEY not found in environment variables")@@ -2101,6 +2110,10 @@ def get_custom_logger_compatible_class(for callback in _in_memory_loggers:if isinstance(callback, LangsmithLogger):return callback+ elif logging_integration == "gcs_bucket":+ for callback in _in_memory_loggers:+ if isinstance(callback, GCSBucketLogger):+ return callbackelif logging_integration == "otel":from litellm.integrations.opentelemetry import OpenTelemetrydiff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yamlindex b78832a10aa..4bc9a87692b 100644--- a/litellm/proxy/proxy_config.yaml+++ b/litellm/proxy/proxy_config.yaml@@ -55,4 +55,4 @@ general_settings:max_response_size_mb: 10litellm_settings:- success_callback: ["langfuse"]\ No newline at end of file+ callbacks: ["gcs_bucket"] # 👈 KEY CHANGE\ No newline at end of file