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]

add check for logging gigachat response, add sensitive keys for removing from data

KnyazSh120f51a39d5e
diff --git a/litellm/llms/gigachat/passthrough/transformation.py b/litellm/llms/gigachat/passthrough/transformation.py
index baf287b161f..a9bc59fed0a 100644
--- a/litellm/llms/gigachat/passthrough/transformation.py
+++ b/litellm/llms/gigachat/passthrough/transformation.py
@@ -80,6 +80,10 @@ class GigaChatPassthroughConfig(BasePassthroughConfig):
from litellm.types.utils import LlmProviders, ModelResponse
from litellm.utils import ProviderConfigManager
+ # cost tracking only for completions
+ if "completions" not in endpoint:
+ return None
+
provider_chat_config = ProviderConfigManager.get_provider_chat_config(
provider=LlmProviders(custom_llm_provider),
model=model,
diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py
index ed9a4ac3028..e5eb58941ad 100644
--- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py
+++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py
@@ -2573,7 +2573,7 @@ async def handle_gigachat_passthrough_router_model(
data["custom_llm_provider"] = "gigachat"
# Remove sensitive keys from data
- keys = ["gigachat_auth_url", "gigachat_access_token", "gigachat_scope"]
+ keys = ["gigachat_auth_url", "gigachat_access_token", "gigachat_scope", "api_base", "api_key"]
for key in keys:
data.pop(key, None)