mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(s3-v2): add missing log placeholder and fix stale docstrings
- the 'S3 object not found' exception call had no %s placeholder, so response.text was passed as an unused logging arg and never logged - create_s3_batch_logging_element documented an s3_path arg it does not take - get_proxy_server_request_from_cold_storage_with_object_key still documented request_id/start_time from the older request-id variant; the actual parameter is object_key
This commit is contained in:
parent
c8635ecc67
commit
fd37de10fc
1 changed files with 2 additions and 4 deletions
|
|
@ -425,7 +425,6 @@ class S3Logger(CustomBatchLogger, BaseAWSLLM):
|
|||
Args:
|
||||
start_time (datetime): The start time of the logging event.
|
||||
standard_logging_payload (Optional[StandardLoggingPayload]): The payload to be logged.
|
||||
s3_path (Optional[str]): The S3 path prefix.
|
||||
|
||||
Returns:
|
||||
Optional[s3BatchLoggingElement]: The created s3BatchLoggingElement, or None if payload is None.
|
||||
|
|
@ -605,7 +604,7 @@ class S3Logger(CustomBatchLogger, BaseAWSLLM):
|
|||
response: Final = await self.async_httpx_client.get(url, headers=signed_headers)
|
||||
|
||||
if response.status_code != 200:
|
||||
verbose_logger.exception("S3 object not found, saw response=", response.text)
|
||||
verbose_logger.exception("S3 object not found, saw response=%s", response.text)
|
||||
return None
|
||||
|
||||
# Parse JSON response
|
||||
|
|
@ -625,8 +624,7 @@ class S3Logger(CustomBatchLogger, BaseAWSLLM):
|
|||
Allows fetching a dict of the proxy server request from s3 or GCS bucket.
|
||||
|
||||
Args:
|
||||
request_id: The unique request ID to search for
|
||||
start_time: The start time of the request (datetime or ISO string)
|
||||
object_key: The object key to fetch from cold storage
|
||||
|
||||
Returns:
|
||||
Optional[dict]: The request data dictionary or None if not found
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue