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
docs(logging.md): add standard logging payload to docs
Krrish Dholakia3dc75dabd6f0
diff --git a/docs/my-website/docs/proxy/logging.md b/docs/my-website/docs/proxy/logging.mdindex 1be390ddd8e..84ac8dfbe48 100644--- a/docs/my-website/docs/proxy/logging.md+++ b/docs/my-website/docs/proxy/logging.md@@ -61,6 +61,51 @@ litellm_settings:Removes any field with `user_api_key_*` from metadata.+## What gets logged?++Found under `kwargs["standard_logging_payload"]`. This is a standard payload, logged for every response.++```python+class StandardLoggingPayload(TypedDict):+ id: str+ call_type: str+ response_cost: float+ total_tokens: int+ prompt_tokens: int+ completion_tokens: int+ startTime: float+ endTime: float+ completionStartTime: float+ model_map_information: StandardLoggingModelInformation+ model: str+ model_id: Optional[str]+ model_group: Optional[str]+ api_base: str+ metadata: StandardLoggingMetadata+ cache_hit: Optional[bool]+ cache_key: Optional[str]+ saved_cache_cost: Optional[float]+ request_tags: list+ end_user: Optional[str]+ requester_ip_address: Optional[str]+ messages: Optional[Union[str, list, dict]]+ response: Optional[Union[str, list, dict]]+ model_parameters: dict+ hidden_params: StandardLoggingHiddenParams++class StandardLoggingHiddenParams(TypedDict):+ model_id: Optional[str]+ cache_key: Optional[str]+ api_base: Optional[str]+ response_cost: Optional[str]+ additional_headers: Optional[dict]+++class StandardLoggingModelInformation(TypedDict):+ model_map_key: str+ model_map_value: Optional[ModelInfo]+```+## Logging Proxy Input/Output - LangfuseWe will use the `--config` to set `litellm.success_callback = ["langfuse"]` this will log all successfull LLM calls to langfuse. Make sure to set `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY` in your environment