mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
add check for logging gigachat response, add sensitive keys for removing from data
This commit is contained in:
parent
eff086d8e0
commit
120f51a39d
2 changed files with 5 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue