mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
style(proxy): drop the docstring bullet and wrap the sanitizer test call
This commit is contained in:
parent
3dafa7aac1
commit
6a96a47e9f
2 changed files with 3 additions and 5 deletions
|
|
@ -1182,10 +1182,6 @@ def _sanitize_error_information_for_spend_logs(
|
|||
``'input'`` / ``'messages'`` / ``'prompt'`` values *and* Pydantic v2
|
||||
``input_value=...`` assignments inside both ``error_message`` and
|
||||
``traceback`` so prompts cannot leak through either field.
|
||||
- An unknown-model rejection (``ProxyModelNotFoundError``) persists its
|
||||
``spend_log_error_message``, which names the route and the rejection
|
||||
without the raw client ``model`` string, matching the ``unknown-model``
|
||||
placeholder in the row's ``model`` column.
|
||||
|
||||
Scoped to the spend-log path — OTEL/Datadog/etc. callbacks still receive
|
||||
the untruncated error per ``LITELLM_TRUNCATION_DB_SAFEGUARD_NOTE``.
|
||||
|
|
|
|||
|
|
@ -2771,7 +2771,9 @@ def test_sanitize_error_information_persists_no_raw_model_for_an_unknown_model_r
|
|||
):
|
||||
error_information: Final = StandardLoggingPayloadSetup.get_error_information(original_exception=original_exception)
|
||||
|
||||
sanitized: Final = _sanitize_error_information_for_spend_logs(error_information, original_exception=original_exception)
|
||||
sanitized: Final = _sanitize_error_information_for_spend_logs(
|
||||
error_information, original_exception=original_exception
|
||||
)
|
||||
|
||||
assert sanitized is not None
|
||||
assert sanitized["error_message"] == expected_error_message
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue